This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

sd_ble_gatts_hvx() return error :0x3401

Hi all,

I am trying to send data(rssi+MAC address) from GATT server to GATT client using sd_ble_gatts_hvx(). I added the service and the characteristic into the ATT table. I want to send data just when the client establish a connection. So in the BLE_EVT_CONNECTED of the on_ble_evt() I call sd_ble_gatts_hvx(). In debug, this call return 0x3401. Here is my configurations:

rssi_mac_service.rar

I am not able to find the problem yet.

Parents
  • This code looks just like mine that works on multiple products. I would only point out that your Central may need to be configured to accept async messages (indications, notifications) though you haven't told us what that program is.

    Also, you do mean to send 4 bytes back, right? Because that is what this bit of code compiles to when data_to_send is a pointer:

     uint16_t len = sizeof(data_to_send); 
    

    Best, Dan

  • Hi Dan, in fact the GATT server (peripheral)needs to send rssi+MAC to a GATT client(central).When testing, I use the Dongle as a GATT client(with MCP).I dont know if the dongle is configured to accept async messages. The new problem is, as I edited in the question is the 0x3001 error.It is a BLE_ERROR_INVALID_CONN_HANDLE .I am using s130 in the GATT server.

Reply Children
No Data
Related