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

sd_ble_gatts_hvx() returns BLE_ERROR_NO_TX_BUFFERS, but lightblue in IOS still can receive the package

Hi experts,

I want to send 20 packages from nrf51822 to phone, so I tried to call sd_ble_gatts_hvx() repeatedly until BLE_ERROR_NO_TX_BUFFERS returns, then sent left packages in BLE_EVT_TX_COMPLETE event.

However, it's very odd that lightblue in IOS can see 21 packages: one package is duplicated. I traced the code, and found that sd_ble_gatts_hvx() was called twice for the duplicated package: the first one returned BLE_ERROR_NO_TX_BUFFERS, the second one returned NRF_SUCCESS. I think it runs all right, but why lightblue can see the duplication? MasterControlPanel in Android can receive 20 package correctly.

Parents
  • Thanks, RK. I traced the packets with sniffer, and found nrf51 didn't re-send the packet. The problem is lightblue will send a read request by itself. The duped packet is the read result displayed in lightblue's log. I did an other experiment, which closed the read permission of nrf51. lightblue still showed the duped packet, while in sniffer, only a no-permission respond could be found. so, it should not be a problem of nrf51. I think I can close this question. Thanks.

Reply
  • Thanks, RK. I traced the packets with sniffer, and found nrf51 didn't re-send the packet. The problem is lightblue will send a read request by itself. The duped packet is the read result displayed in lightblue's log. I did an other experiment, which closed the read permission of nrf51. lightblue still showed the duped packet, while in sniffer, only a no-permission respond could be found. so, it should not be a problem of nrf51. I think I can close this question. Thanks.

Children
No Data
Related