Bluetooth 4.0 development, and now the Heat are true, but many of my friends bought our duced cc2540 usb-dongle, they all did not know how to capture feedback, and even though many of my friends went to TI's official website forum of information, a lot of friends still without success, in fact, with cc2540 usb-dongle ble to capture the data, not as computer software used wireshark to capture ip packets as simple.
We need to understand is, ble broadcast can specify a broadcast channel, a broadcast channel 38, 39, respectively, but TI's tocol stack official routines already set by default together simultaneously broadcast three channels in the broadcast stage, but Once with the host connection, it is only in one channel to transmit data, so we want to specify one channel appalling is that this channel connection is random, we can crawl to the connection packet after , fill Started?That is the host?The address and the channel can be.
Here we use the TI official routine SimpleBLEPeripheral binding cc2540 usb-dongle and SmartRF Packet Sniffer software to achieve packet crawl and read
1To let the board ran SimpleBLEPeripheral, this is not the point, I will not speak Kazakh.
2Then, burn the sniffer_fw_cc2540_usb.hex firmware usb-dongle inserted into the pc, if not install the driver, the driver to be installed, but if you have installed SmartRF Packet Sniffer software, the drive has been installed by default.
3Run SmartRF Packet Sniffer. As shown below:
On the map, the description is, once the master and slave connected to the last line on the map, do not get caught in the show, and this time, fill in the address as shown above, and the selected channel number, and then reset from machine, the host is reconnected, the time is not necessarily SmartRF packet Sniffer can be displayed to the packet after the connection, if you can not connect, try to change the channel number 38, 39, etc., Try a few more?it is necessary? Will appear below the diagram.
?The chart below shows a ble to fetch data packets?
Here with lightblue read operation of a char1, lightblue read to 0x04.?lightblue is a very cattle on ios software.
Here with lightblue write a char1 of lightblue write 0x01.
In the actual development, the capture or seemed more ant, such as the android4.3 ble, is not yet very stable, you can not determine at this time is not an issue from your code or machine blems, we crawled through the air packet delivery, we can determine in the end is the master or a slave issue.
|Cash on Delivery||No|