Skip to main content
grzegorz
Associate III
February 23, 2017
Solved

BlueNRG-MS write to remote characteristic

  • February 23, 2017
  • 1 reply
  • 718 views
Posted on February 23, 2017 at 16:21

I try to write to a characteristic on a remote device, BlueNRG-MS works as peripheral client. I call aci_gatt_write_charac_value() and it returns SUCCESS. But then EVT_BLUE_GATT_PROCEDURE_COMPLETE comes and it is sometimes 0x00 (BLE_STATUS_SUCCESS) and sometimes it's 0x41 (BLE_STATUS_FAILED). What could be the reason and how to solve this? Stack is 7.2.c.

#ancs #iphone #ble #bluenrg-ms #client
This topic has been closed for replies.
Best answer by Andrea Palmieri
Posted on February 24, 2017 at 12:44

Hi,

could you catch the event 'EVT_BLUE_GATT_ERROR_RESP'? The error code parameter should provide the reason of failure according to table 3.3 of BLUETOOTH SPECIFICATION Version 5.0  Vol 3, Part F, Section 3.4

Regards.

1 reply

Andrea Palmieri
ST Employee
February 24, 2017
Posted on February 24, 2017 at 12:44

Hi,

could you catch the event 'EVT_BLUE_GATT_ERROR_RESP'? The error code parameter should provide the reason of failure according to table 3.3 of BLUETOOTH SPECIFICATION Version 5.0  Vol 3, Part F, Section 3.4

Regards.

grzegorz
grzegorzAuthor
Associate III
February 25, 2017
Posted on February 25, 2017 at 23:11

The error code is 0xA2 which means this is an application level error. So I looked at ANCS documentation and it says this error code is for invalid parameter. So it turns out I was sending incorrect data to iPhone and it was rejecting it. Thank you very much for suggesting EVT_BLUE_GATT_ERROR_RESP