I sell on Tindie
Map
Grand Prize Winner
(Dec 2012)
Second Prize Winner
(July 2012)












Adding HM-10 Support to Arduino-Based CC-Debugger

After numerous reports of failures to flash HM-10 Bluetooth modules with the Arduino CC-Debugger we were lucky enough to get the module for experimentation and troubleshooting.

HM-10 BLE Module

HM-10 BLE Module

To our surprise the tool indeed was refusing to communicate with the HM-10. Even 'Info' button kept reporting 0 Kb of flash memory which was clearly wrong. It has been quickly established that the actual pitfall was in communication protocol between the Arduino and PC application, only one byte was dedicated for that which obviously couldn’t hold the value ‘256’. Fixing this fixed the values retrived by the 'Info' button but 'Read' operation kept failing. It turned out the be the similar problem again – as the transmission was packetized into 1 Kb blocks there was only one byte dedicated to a block number and given that the chip has 256 Kb it was destined to fail. The third and final issue was with uploading binary files which were smaller than the total size of a chip and which size was not the exact integer number in kilobytes. In other words, an image of 8192 bytes in size would be flashed correctly while, say, 89751 bytes would not. This has to do with different buffer sizes for the protocol exchange and internal buffer on Arduino which is used for DMA transfers when the actual flashing is performed. So, as a result, the last block of data was incomplete which didn’t trigger DMA operation and remaining portion of the image was simply not flashed. This is why attempts to flash v1_1.bin by bjoerke rendered the module non-functional. This has also been fixed. And finally, the physical interface between CC24XX chip and the debugger has been simplified to just three wires as shown on the picture below:

Arduino BLE112 Level Converter Simplified Interface

Arduino BLE112 Level Converter Simplified Interface

The HM-10 module wired to Arduino board and ready for flashing is shown on the picture below. Please note that there are only three signal wires now for communication plus VCC and GND, five in total:

Arduino with HM-10 Module

Arduino with HM-10 Module

The following screenshot below shows CCLibFrontend app successfully detected HM-10 module. Note, that the chip ID represents CC2541 with 256Kb of flash memory. No license, BT address or HW revision are retrieved – they are properties of BLE122, BLE113 modules and not applicable to HM-10. IEEE address value in case of HM-10 is the actual Bluetooth address.

Arduino CC-Debugger with HM-10 Detected as CC2541

Arduino CC-Debugger with HM-10 Detected as CC2541

Downloads:

1. Arduino CC-Debugger sketch & library Rev1.1
2. Arduino CC-Debugger Frontend Rev1.1