Other Parts Discussed in Thread: CC2540
Hi,
I am using CC2540 USB BLE Dongle with PC Application implemented in .Net.
I am trying to add and register a new service and its characteristics in the BLE stack.
When I execute the GATT_AddService command for adding a new service (0x3432), failure is received stating the service has not registered.
PC Environment:
- CC2540 USB Dongle used (In this dongle flashed the image “HostTestReleaseCC2540Usb.hex” which is available as part of BLE Stack for CC254x-1.4.0)
- PC Application is built on Microsoft Visual Studio 2010 - C# .Net
Below is the command sequence executed and its response from the stack.
--------------------------------------------------------------------
[17] : <Tx> - 08:02:14.196
-Type : 0x01 (Command)
-OpCode : 0xFDFC (GATT_AddService)
-Data Length : 0x04 (4) byte(s)
UUID : 0x3532 (13618)
NumAttrs : 0x0002 (2)
Dump(Tx):
0000:01 FC FD 04 32 35 02 00 .....(..
--------------------------------------------------------------------
[18] : <Rx> - 08:02:14.228
-Type : 0x04 (Event)
-EventCode : 0x00FF (Event)
-Data Length : 0x06 (6) bytes(s)
Event : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
Status : 0x01 (1) (Failure)
OpCode : 0xFDFC (GATT_AddService)
DataLength : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 01 FC FD 00 .........
--------------------------------------------------------------------
Also, I didn’t find any command to add new characteristic to the service.
When I try to update the permission of the existing characteristics, the stack gives a failure.
Below is the command sequence executed and its response from the stack.
--------------------------------------------------------------------
[19] : <Tx> - 08:02:24.749
-Type : 0x01 (Command)
-OpCode : 0xFDFE (GATT_AddAttribute)
-Data Length : 0x03 (3) byte(s)
UUID : 35:34
Permissions : 0x01 (1) (GATT_PERMIT_READ)
Dump(Tx):
0000:01 FE FD 03 34 35 01 .....*.
--------------------------------------------------------------------
[20] : <Rx> - 08:02:24.771
-Type : 0x04 (Event)
-EventCode : 0x00FF (Event)
-Data Length : 0x06 (6) bytes(s)
Event : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
Status : 0x01 (1) (Failure)
OpCode : 0xFDFE (GATT_AddAttribute)
DataLength : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 01 FE FD 00 .........
--------------------------------------------------------------------
Kindly let me know the how to add a new service and its characteristic in CC2540 BLE Stack. How to update the existing characteristics permission.
Thanks and Regards,
Ramesh Kumar