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.

BloodPressure app on cc2540 mini keyfob

Other Parts Discussed in Thread: CC2540

Hi

I am currently playing around with the cc2540 mini dk set and was trying to make the bloodpressure demo app to work. I have the below setup. 

1. I have compiled the bloodpressure app and have flashed the keyfob with the hex file. 

2. My USB dongle is flashed with "CC2540_USBdongle_HostTestRelease_All" hex file.

Now when I set up the BTool and try to connect with the keyfob, I could see the connection being established successfully and the led on the keyfob blinking, followed by a disconnection. 

Now I am able to see the connection and disconnection messages in BTool but can not see the Bloodpressure data being received from the keyfob. 

After reading the swru297b.pdf (BLE sample app guide) and the BLP spec, I figured out that the sensor part looks to be ok, but the collector ( In this case the USB Dongle) should discover the bloodpressure service and configure for the same. which I think is the problem why I am not receiving anything in the BTool. 

So my question is that, whether the hex file on the USB Dongle needs to change or else some configuration that I am missing. 

Please let me know if you need any more info from my side. 

Thanks

Biswa

  • Hi 

    Has anyone made the bloodpressure demo to work with keyfob+dongle setup or smartrf setup? If yes, could you please help me ?

    Thanks

    Biswa

  • Hi,

    I did exactly the same and got the same results.  Discovering services in BTool I can't see BloodPressure service. It seems, from the code, that the service is registered to gatt correctly, but still can't see it in Btool.

    I would be also interested in any hints.

    Thanks,

  • Hi,

    Finally, I got it working. To make it happen you have to do:

    1. Press right key on the keyfob to start  advertising(red and green leds should blink when advertising)

    2. in Btool, scan for device, next establish connection (connection handle should appear in the left panel)

    3. in order to get BP Measurement (BP Intermediate Measurement) characteristic indication (notification) you have to write value  02 00 to attr handle 0x0013  (value  01 00 to handle 0x0017).  The 0x0013 and 0x0017 are handles to CCC  descriptors of mentioned characteristics.

    Notification should be visible in BTool.

    Keep in mind whatever you send to keyfob, it needs to advertise to get replay. There is a timeout which will stop advertising, so keep watch the leds.

    Thanks,

  • Hi

    I tried to follow your steps for the same but could not succeed yet 

    I could connect to the keyfob alright and I could read the characteristics value handle of 0x0013 and 0x0017 properly. But when I am trying to write 02 00 to 0x0013 I am getting a WRITE_NOT_PERMITTED error. 

    Am I missing something here?

    Thanks

    Biswa

  • Hi,

    In my case it works. I tired different combinations to get the error code you got, but I failed. Thus, I cannot figure out what you are doing wrong.

    Can you send list of characteristics you have discovered on the keyfob?

  • Hi,

    After one week reading all the documents included in the CC2540 Development Kit, finally I've managed to read the BloodPressure values in BTool. I'm going to explain how to do this.

    I suppose that you have compiled and flashed the BloodPressure project in the keyfob or SmartRF05 and you have loaded the HostTestApp hex file in your dongle or SmartRF05 (the hex file are in C:\Texas Instruments\BLE-CC254x-1.3\Accessories\HexFiles, and they are different for dongle and SmartRF).

    To know the values of the UUID of the Blood Pressure Services open the workspace bloodpressure.eww in IAR. (Is located in C:\Texas Instruments\BLE-CC254x-1.3\Projects\ble\BloodPressure\CC2540DB)

    Then open the file bpservice.h (located in PROFILES folder). Line 73:

    // BloodPressure Service UUIDs
    #define BLOODPRESSURE_SERV_UUID                 0x1810
    #define BLOODPRESSURE_MEAS_UUID                 0x2A35 //bp measurement
    #define BLOODPRESSURE_IMEAS_UUID                0x2A36 //intermediate
    #define BLOODPRESSURE_FEATURE_UUID              0x2A49 //intermediate

    Now that you know the value of the UUID of this service, you can discover the handles. To do so, do the following in BTool:

    1. Start advertising (on SmartRF05, joystick right, on keyfob click right)
    2. Click Scan
    3. Click Establish
    4. When connection is established, authenticate link in Pairing/Bonding tab by checking both Bonding Enabled and Authentication (MITM) Enabled and then clicking Send Pairing Request. After that, click Send Passkey (the default passkey, 000000, is the riht key)
    5. Now discover the handles of the UUID's by selecting Discover Characteristics by UUID, with Characteristic UUID any of the UUID above. For example, for the UUID 0x2A36 write 36:2A.
    6. Then you will see a value. For 36:2A is 10 16 00 36 2A

    Do this fast or link will terminate. Doing this you will find out the following:

    For 0x2A35, you will get 20 12 00 35 2A

    The 20 means something I still don't know. 12 00 is the handle (0x0012) and 35 2A the UUID (0x2A35)

    For 0x2A36 you will get 10 16 00 36 2A

    The 10 means notify-only (this is explained in page 21 of pdf swru301, development kit guide). The handle is 0x0016.

    For 0x2A49 you will get 02 19 00 49 2A

    The 02 means read-only. The handle is 0x0019

    So now you know that the handle 0x0016 is notify-only. To enable notifications you have to write a 01:00 at the next handle, ie 0x0017 (this is explained in swru301 and swru270c). To do so, do the steps 1-4 (connect and authenticate) and then in Characteristics Write, write the handle 0x0017 and value 01:00 and click Write.

    When done you will receive a bunch of data in BTool.

    To disable the notifications write a 00:00.

    That's all.

    Does anybody know what the 20 means??? Is there another way to obtain the UUIDs rather than looking at the header files?? I've looked at https://www.bluetooth.org/Technical/Specifications/adopted.htm but I haven't seen anything.

  • To know that the 10 means notify-only, 02 means read-only, 20 means indicate etcetera download the document Core_V4.0.pdf from https://www.bluetooth.org/Technical/Specifications/adopted.htm.There click link Core Version 4.0

    In Core_V4.0.pdf go to Volume 3 -> Part G (GATT) -> Section 3.3 (page 538)

    ( I found this in this post: http://e2e.ti.com/support/low_power_rf/f/538/t/86482.aspx )

    Apart from that, to know the UUID of the services go to http://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx

    To know the UUID of the characteristics go to http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicsHome.aspx

    Regards