Real-time monitoring BLE advertisements using tshark
I have a peripheral sensor transmitting data embedded in BLE advertisements and I'd like to plot the sensor data in real time. My idea is to use a Bluefruit LE Sniffer and a combination of tshark and python to plot the advertisement data.
I'm having problems getting the advertisement data from tshark in real-time, which I'm guessing is something to do with buffering (based on the Stack Overflow question Python subprocess does not return real time tshark output and the associated Wireshark question How to pipe tshark output in realtime?)
The only tshark option I am using is -i
. I don't think -l
is doing anything (but that looks like it is specifically for Wi-Fi). (python code).
Thank you.
Is this something I can do to get around this problem or should I be using a different approach without tshark?