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.

Get/Set Variable

Other Parts Discussed in Thread: CC2540

Hi,

I'm starting to make anything with my cc2540 Mini DK and I have a question that maybe it's simple but I'm a little noob so I just ask you.

I want to create a variable on usb dongle and another on keyfob, and my question is how I create them and if it's any way to read/write the keyfob variable from usb dongle and vice-versa?

Thanks,

Jorge Mendes

  • Hello Jorge,

    There is a way to read and write from the KeyFob to the USB dongle using the hostTestRelease.hex on the dongle and running BTool on your PC.

    if you haven't gone through the documentation, then your first read should be the BLE 2540 MINIDK User's Guide swru270C.pdf.  This will allow you to familiarize yourself with some of the basic concepts of using BLE on the CC2540.

    Thanks,

  • Hi greenja,

    I have gone through this documentation but my doubt is another, I want to set a variable and know exactly what is the characteristic handle or UUID. I don't know how to map the attributtes to this handles and this is what I want.

    Thanks,

  • It sounds like you want to use the USB dongle in the same way you would use BTool to read the characteristics and UUIDs etc.  That would require the HCI commands.

    The HCI commands and the response to the commands are displayed in the BTool communication view.  You can put these commands in your code to perform the same operation.  There is a HCI Vendor PDF in the documents folder that you can use as a reference. 

    If you wish to take on the challenge, rather than setting up known services and UUIDs on the Keyfob as peripheral and USB or iOS device as central, then you are in for a lot of work.  You will also need to go through the documentation for HCI, Core Bluetooth, etc.  It is not what I would recommend for a person just starting out tries.  I would recommend modifying the peripheral and central examples so that when they communicate, they know ahead of time what they can say to each other.

    Thanks,