Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USING BTOOL (OR MORE?) TO SERVE AS BLE PERIPHERAL

Other Parts Discussed in Thread: CC2540

I've been tasked with developing a BLE app for the iPhone 4S. A colleague (who lives and works about an hour away) will be using the TI CC2540 kit to develop the peripherals with which the iPhone will interact. I'd like to be able to use BTool and the CC2540 USBDongle to serve as a test peripheral, just to validate that the app under development can do the most elementary things. I have an old Windows XP system, bought the Dongle (and a CC Debugger to reflash it)  and have installed what I think is all the necessary support, though not without a struggle (being a tyro here). At this point, BTool sees the Dongle, but I'm unclear as to how to get it to (1) tell the Dongle to be a slave and (2) advertise something (Generic Access would be fine).

Some stale advice on this general subject seems to be out of date, for instance referencing hex files other than cc2540_usbdongle_hosttestrelease_all.hex, which seemed to be the only really plausible candidate (assuming that cc2540minidkdemoslave.hex isn't suitable) when I used the CC Debugger to reflash the Dongle. In it (the older advice) mention was made of ways to use BTool to tell the Dongle to be a slave, but the ways mentioned don't seem to be applicable now.

If anyone at TI aspires to be a true benefactor to mankind (or at least to a subset of its geek subset), my recommendation would be to compose a Windows program (runnable on XP and up) which would, like BTool, use the CC2540 USBDongle, and, in addition, would automatically put it into slave mode, and then would use it to advertise a BLE Service, the hex string for which would be enterable (in the full standard form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). It would not be required to actually provide any Characteristics, only advertise the Service (since Core Bluetooth uses that to filter out candidates when it scans). However, it could usefully provide some simple Services, with Characteristics as described at https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx, and I'd recommend Generic Access, Device Information, Battery Service and Tx Power.

Making a case for such a tool, I offer the following: My colleague who is developing for the peripheral with the TI kit does not have as warm a feeling communicating ONLY with a master developed by TI, as he would were he to see communication with something else entirely, no easy task in itself. However, with Mountain Lion and a late-model Mac Mini, there is hope that he can now do so. My predicament isn't the mirror image of his, since I don't have anything at all with which to communicate, but my need for a warm feeling equally strong.

  • Hi Michael,

    You will find the steps you are looking for in this post: http://e2e.ti.com/support/low_power_rf/f/538/p/187762/732079.aspx#732079. Essentially you need to issue three commands from the Adv. commands tab of BTool:

    • GAP_DeviceInit, set profileRole to Peripheral and hit Send Command
    • GAP_UpdateAdvertisingData, set adType toGAPADVERT_ADVERTISEMENT_DATA and set dataLen to 3 and hit Send Command.
    • GAP_MakeDiscoverable, make sure that you see the available options for it (no need to make changes) and hit Send Command.

    I hope that work things out for ya.

    Best Regards

  • Hi Nick,

    Thanks!

    It did the trick. As evidence, I'll offer the image below (if I can get it in).

    At some point, I'll try to put a reply on this thread that describes how an idiot (and I feel no shame about it) managed to get to the point where (without buying a Wahoo Heart Monitor for $80, but, instead, only spending $100 on the TI Dongle and CC Debugger) he managed to get his iPhone 4S to see something BLE.

    Warm Regards,

    Mike