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

BLE_SEND_DATA In blocking state

Hi ,

I am working on a project where i need to publish wifi scans over ble , issue is that when ever we try to send data over it either send or not sent to avoid data loss, using ble_app_uart example used do while loop for trying until data is sent. Product is based on FreeRTOS where data to be published is read on event from serial uarte0 and then published to ble . this blocking state is causing fatal error and causing data loss

Parents Reply
  • when you are only connected to one android device, then most likely the conn_handle is always 0 (while in connection)

    Ahtasham Baig said:
    i tried to debug the code and found the conn_handle >= BLE_CONN_STATE_MAX_CONNECTIONS, which is cause causing connection state invalid

     The above failure can only happen 

    1. If you pass wrong (uninitialized  conn_handle as argument
    2. you are trying to send data even before the connection is established.
Children
Related