In a previous post I connected the Texas Instruments SensorTag talk to a Cypress CySmart USB Dongle and made the dongle sniff Bluetooth traffic. This time I'll switch this around. We'll turn the SensorTag into a BLE sniffer, and let it analyze the payload of the Cypress PSoc 4 / PRoC BLE kit.
The SimpleLink SensorTag is a tiny evaluation kit with an ARM Cortex controller with embedded BLE, and a number of sensors.
You typically use it to try out Bluetooth scenarios with sensors, so using it as a BLE sniffer is not its natural habitat, but it works.
Texas Instruments has two BLE traffic analysis programs, BLE Device Monitor and BTool. You normally use them with a CC2540 USB Dongle that's loaded with sniffer firmware.
The dongle talks to the device under test (some Bluetooth Low Energy device that you want to sniff). The analysis programs talk to the dongle and reveal the internals of the BLE payload.
The way it works is that the dongle's firmware exposes an API, and the tools call the API functions over USB.
Sniffer FirmWare for the SensorTag
TI has ported that CC2540 firmware to the SensorTag. It's not widely published. I stumbled on it when doing the SimpleLink Academy.
It turns out that when you install the Academy software on your computer, that ported project is part of the examples.
The only thing you have to do is navigate to the TI Resource Explorer in Code Composer Studio, find the HostTestTag example, and follow the instructions. A wizard helps you from import via build and debug config to load and execution.
Once all the steps are done, you can start sniffing. First I connected the SensorTag with the TI BLE Device Monitor,
started the Cypress PSoC 4, and made the SensorTag mate with the PSoC.
All worked perfectly. The two connected, and I could retrieve the BLE attributes.
My second test was with the TI BTool. That's another application that lets you sniff and talk at low level.
I did the same drill, and again it worked straight away.
Now that I'm able to sniff traffic with both the CyPress CySmart dongle and the TI SensorTag, I can use the analysis tools from both.
I can choose the best tool at the right moment - except when I'm developing on the SensorTag. It can't sniff itself .
|Talking BLE with the TI SensorTag CC2650 and the Cypress CySmart USB Dongle|