**pycatsniffer**'s main role it to read packets captured from the CatSniffer board and pipe the packets in PCAP format to a named pipe (by default "/tmp/ccsniffpiper").
27
+
**pycatsniffer**'s main role it to read packets captured from the CatSniffer board and pipe the packets in PCAP format to a named pipe (by default `/tmp/ccsniffpiper`).
28
+
29
+
Default mode starts with Bluetooth Low Energy configuration.
30
+
For BLE, the advertising channel (`37`, `38` or `39`) must be selected, the deafult is `37`.
31
+
32
+
The capture device can be configured to follow a data connection between a specific Bluetooth Low Energy Master (Initiator) and Slave device. Type `-a` in the options menu and write the address of the Initiator (Master) device next. If this option is not setted, the capture device will start to follow the first data connection that appears on the selected advertising channel.
28
33
29
34
To get this default behaviour, just run the command:
30
35
`python pycatsniffer.py`
31
36
32
-
To see further information, run the help command:
33
-
`python pycatsniffer.py -h`
37
+
The following options will be available
34
38
35
-
To run in headless mode and pipe using /tmp/ccsniffpiper
* `n: Trigger new pcap header before the next frame`
42
+
* `h,?: Print this message`
43
+
* `[37,39]: Change RF channel`
44
+
* `s: Start/stop the packet capture`
45
+
* `q: Quit`
37
46
47
+
In this mode the output of captured packets will only be displayed on the terminal.
48
+
49
+
You can start packet capture by pressing the `s` key followed by the `Enter` key.
50
+
To stop, press the `s` key again followed by the `Enter` key again.
51
+
52
+
To run in normal mode and pipe using `/tmp/ccsniffpiper` type `sudo python pycatsniffer.py -f /tmp/ccsniffpiper` in the terminal
53
+
54
+
Start the packet capture by pressing the `s` key and then the `Enter` key in the terminal where pycatsniffer is running.
55
+
In headless mode use `sudo python pycatsniffer.py -d -f /tmp/ccsniffpiper`
56
+
57
+
To see further information, run the help command:
58
+
`python pycatsniffer.py -h`
38
59
39
60
Run Wireshark
40
61
-------------
41
62
To receive the packets from **pycatsniffer** you need to use Wireshark to start a capture using a FIFO file as the 'interface'. By default, **pycatsniffer** will use `/tmp/ccsniffpiper`.
42
63
43
64
To setup Wireshark correctly, perform the following steps:
44
-
* Go to Capture -> options -> Manage Interfaces -> New (under Pipes) -> type `/tmp/ccsniffpiper` and save.
45
-
* The pipe will then appear as an interface. Start a capture on it.
46
65
66
+
* Start Wireshark using sudo wireshark (linux)
67
+
* Add new pipe interface: Capture -> Options -> Manage Interfaces -> Pipes-> click on + to add new pipe -> type `/tmp/ccsniffpiper` and apply.
68
+
Note - The capture interface will not be saved.
69
+
* Click the start button to start a capture.
70
+
* The pipe will then appear as an interface.
47
71
48
72
General packet format
49
73
======================================
50
-
This is just ***[documentation](https://software-dl.ti.com/lprf/packet_sniffer_2/docs/user_guide/html/sniffer_fw/firmware/command_interface.html)** of the packet format from the TI firmware on CatSniffer.
74
+
This is just **[documentation](https://software-dl.ti.com/lprf/packet_sniffer_2/docs/user_guide/html/sniffer_fw/firmware/command_interface.html)** of the packet format from the TI firmware on CatSniffer.
51
75
52
76
The UART packet format is shown in the table below.
53
77
skipped 9 lines
63
87
64
88
* Check that the sniffer is sniffing in the correct channel.
65
89
* Check that you have opened the named pipe that is being piped to.
66
-
*In particular, I would recommend reading the "Run Wireshark" section carefully.*
90
+
*In particular, I would recommend reading the "Run Wireshark" section carefully.*