Re: BLE Connection Maintenance
Re: BLE Connection Maintenance
- Subject: Re: BLE Connection Maintenance
- From: Spero Koulouras <email@hidden>
- Date: Tue, 17 Dec 2013 00:39:54 -0800
Install the TI Packet Sniffer and then Click on Help -> User Manual. It will walk you through getting a dongle set up. Too many options to repeat here. Skim the manual, play with the analyzer and then re-read the manual. The packet sniffer code is Windows only AFAIK. I run it in a Virtual Box VM running WinXP.
Get the hang of the analyzer in a controlled environment, preferably with just a single BLE peripheral and an app such as Light Blue. Start with the central/Light Blue turned off. Start the analyzer and make sure to hit the "down arrows" to allow the display to scroll. Turn on your peripheral and make sure you see it advertising. Turn on the central or Light Blue. You should see a SCAN_REQ in response to and ADV_IND and then a SCAN_RESP in response to the SCAN_REQ. Have the central connect to the peripheral. You should see a CONNECT_REQ and then the link layer will kick in, spitting control packets every connection interval so the display may scroll quickly. The link layer packets all appear in yellow on my machine. If a service/characteristic discovery process gets started you should see some ATT packets with recognizable operations in them appear in an orange-ish color.
If you are going to be looking at the air traces then I suggest having the Bluetooth Core Spec 4.0 handy and possibly a copy of Heydon's Bluetooth Low Energy: The Developer’s Handbook (available through safaribooksonline).
NOTES:
The analyzer can only look at one advertising channel. The default configuration allows it to follow a connection as it channel hops, but if you are watching for advertising on channel 37 and a connection gets started on 38, you can't follow it. When debugging I set my peripheral to advertise only on Ch 37 and can then observe all the traffic that follows.
Following an encrypted conversation appears possible from reading the manual, but requires a static long term key entered in a text file.
Sometimes the analyzer gets stuck and needs to be restarted. When in doubt, quit and restart.