Hi,
I am using CC2540 USB BLE Dongle with PC Application implemented in .Net.
I am trying to delete the already registered service and its characteristics in the BLE stack.
I have executed the GATT_AddService command for adding a new service and GATT_AddAttribute command for characteristics. When I try to deleted the newly added service and characteristics unless I find the handle for the service the GATT_DelService command getting failure.
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> - 04:14:10.584
-Type : 0x01 (Command)
-OpCode : 0xFDFD (GATT_DelService)
-Data Length : 0x02 (2) byte(s)
Handle : 0x0001 (1)
Dump(Tx):
0000:01 FD FD 02 01 00 ......
--------------------------------------------------------------------
[18] : <Rx> - 04:14:10.600
-Type : 0x04 (Event)
-EventCode : 0x00FF (Event)
-Data Length : 0x06 (6) bytes(s)
Event : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
Status : 0x01 (1) (Failure)
OpCode : 0xFDFD (GATT_DelService)
DataLength : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 01 FD FD 00 .........
--------------------------------------------------------------------
--------------------------------------------------------------------
[29] : <Tx> - 04:18:27.998
-Type : 0x01 (Command)
-OpCode : 0xFDFD (GATT_DelService)
-Data Length : 0x02 (2) byte(s)
Handle : 0x0003 (3)
Dump(Tx):
0000:01 FD FD 02 03 00 ......
--------------------------------------------------------------------
[30] : <Rx> - 04:18:28.029
-Type : 0x04 (Event)
-EventCode : 0x00FF (Event)
-Data Length : 0x06 (6) bytes(s)
Event : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
Status : 0x00 (0) (Success)
OpCode : 0xFDFD (GATT_DelService)
DataLength : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 FD FD 00 .........
--------------------------------------------------------------------
I can able to list the handle of services and characteristics of the connected BLE device (Server) in cleint side of BLE stack using GATT_DescAllCharsDescs command. Similarly is there any HCI command to get the handle of the existing services/characteristics from the Server BLE stack itslef.
Kindly guide me to retrieve the handle of the Services, or how to delete the exisiting services in the Server BLE Stack.
Thanks in advance.
Regards,
Ramesh Kumar