Hi,
I am currently writing commands from my External MCU which is connected the CC2541 via UART. I am sending the HCI Command 'GATT_WriteCharValue' but I am receiving the Unknown HCI Command (0x01) error code on my External MCU.
My CC2541 is running the Custom GATT profile that is found in the simplePeripheral project as well as the BLE_BRDG project. I am specifically writing to the first custom characteristic 0xFFF1.
I tried simulating this using Btool and when I send the exact same hex data, it tells me that the same error code 0x01 and 'The Attribute Handle Given Was Not Valid On This Server.'
Am I sending the correct hex values? I have my suspicions that I am incorrectly writing the connhandle and the attribute handle. Here are the hex values I am sending in order for the GATT_WriteCharValue function:
0x01 // Command
0x92 // Opcode
0xFD // Opcode
0x05 // Data Length
0xFE // Connection Handle
0xFF // Connection Handle
0xF1 // Attribute Handle
0xFF // Attribute Handle
0xB1 // Value to be written
I assumed connhandle is 0xFFFE just like the default is in Btool.
Thanks,
Al