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.

CC 2540

Other Parts Discussed in Thread: CC2540

I was able to establish connection between two USB CC 2540 dongles. But i am unable to write any data. Please someone guide me how i can write data. 

  • What example do you run on your two CC2540 USB dongle?
  • Hi Syed,
    You can run BTool to emulate applications on both ends, assuming you have flashed both with Host_test.
  • I am running host test release on both devices . After that i change role of one cc 2540 to peripheral. Now two usb dongles are in central and peripheral role. But i am unable to write any data.

  • i want to make a simple project. I want to send data from one 2540 dongle to another 2540 usb dongle. After establishing link using host test release program, i am unable to send data from one dongle to another. How it is possible?. I need guidance regarding this issue. When i write something, i am continuously receiving a message " Write not permitted"
  • I am already running test release on both dongles. But how can i send data from one dongle to another?
  • How do you try to send data?
  • Eirik , i was unable to write data using Host Test Release in Btool. I succeeded in connecting two 2540 usb dongles in master and slave configuration. But i always receive attribute can not be written message while writing using UUIDs.

    I am trying to send data between two  2540 usb dongles in master and slave configuration. I flashed both 2540 usb dongles with Host test Release. Is it possible to send data from one 2540 usb dongle to another 2540 usb dongle ? If yes then how i can send data from one  2540 usb dongle to other 2540 usb dongles. Please help me in this regard.

  • Hello Syed,
    You can send notifications with the GATT_Notification command. Use handle 0 when you simply send a notifications that is not targeted for a specific attribute.
    [120] : <Tx> - 01:51:39.110
    -Type : 0x01 (Command)
    -OpCode : 0xFD9B (GATT_Notification)
    -Data Length : 0x06 (6) byte(s)
    ConnHandle : 0x0000 (0)
    Authentic : 0x00 (0) (No)
    Handle : 0x0000 (0)
    Value : 00:EE
  • By using GATT Notification command, i received this:

    [19] : <Tx> - 05:38:25.628
    -Type : 0x01 (Command)
    -OpCode : 0xFD9B (GATT_Notification)
    -Data Length : 0x06 (6) byte(s)
    ConnHandle : 0xFFFE (65534)
    Authentic : 0x00 (0) (No)
    Handle : 0x0100 (256)
    Value : 00:00
    Dump(Tx):
    0000:01 9B FD 06 FE FF 00 01 00 00

    But according to the instructions written  below (in red color), i have to enable GATT notification first. When i try to complete this procedure i receive the output as shown in figure. Which means BTool is responding with success  message. But still i don't receive any value in value section which is  required for finding handle. 

     

    Before notifications can be enabled, the handle of the fourth characteristic must be found. This can be done by using the “Discover Characteristic by UUID” process , with the UUID value set to “F4:FF”. The procedure will find one instance of the characteristic with type 0xFFF4, and display “10 2B 00 F4 FF” (the value of the declaration) in the “Value” box, with “Success” displayed in the “Status” box. As per the Bluetooth specification, the first byte “10” tells us that the properties of the characteristic are notify-only. The second and third bytes “2B 00” tell us that the handle of the characteristic value is 0x002B. The fourth and fifth bytes tell the UUID of the characteristic, 0xFFF4.

  • Hello Syed,

    The hostTest project does not include the SimpleGATT Profile with those characteristics. It is included in the simpleBLEPeripheral project. To discover all services of a GATT server on a connected peer in BTool you can simply left-click on the device handle (on the left) and select "Discover UIIDs". In your case where you communicate between 2 HostTest project you can simply send GATT_Notification with handle 0 to transmit data without directing it through any characteristic value.

  • Eirik,

    "In your case where you communicate between 2 HostTest project you can simply send GATT_Notification with handle 0 to transmit data without directing it through any characteristic value".
    I am sorry. I am new to BLE. I understand how to send GATT notification. But i am facing difficulty in understanding how i can send data for example value of "9" with handle 0. Should i write 0 in characteristic value handle and 9 in value section of characteristic write section ?.
  • Thank you very much for your help and patience Eirik. At last i was able to send data.
    Now i want to ask you another question. Is it possible to communicate between two 2540 usb dongles in such a way that we send data from one 2540 dongle and read the same data which we sent at other dongle?
  • The notification with data will show up in the BTool log on the recipient. I tested this and it worked.