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

I want my BLE peripheral drop the second 20byte automatically if the Central device does not support Data length extension.

Dear Nordic community

(SDK v14.2, nRF52832)

I have a real-time application where I am sending 6 packet of 20 byte Notification per connection interval. And there is not problem with most advanced mobile devices since they all accept 6 packet. (in one world, the real time application works)

My problem arise when customer may have old mobile device that dose not accept more than 4 packet of data and also dose not support for the Data Length Extension (Like Nexus 9).

Since I have real-time application but don't have control over customer devices. I was wondering if the following scenario is possible? and if yes, how?

"""

I want to send 3 packet of 40 byte data (which is easy with Data Length Extension) BUT, I want my BLE peripheral drop the second 20byte automatically if the Central device does not support Data Length extension.

"""

(Just to let you know,  increasing the MTU size didn't helped since BLE will send it in 20 byte chunk and would still pass this 4 packet. Also, I have a complex solution , but I am not fan of that at all)

Parents
  • Hi,

    If you add nrf_ble_gatt_init() with a function callback (instead of NULL), then you can know what the size supported by the peer from the following two events:

    NRF_BLE_GATT_EVT_ATT_MTU_UPDATED = 0xA77, //!< The ATT_MTU size was updated.
    NRF_BLE_GATT_EVT_DATA_LENGTH_UPDATED = 0xDA7A, //!< The data length was updated.

    There is no way to drop packets if they are buffered with the softdevice.

    Best regards,
    Kenneth

     

Reply
  • Hi,

    If you add nrf_ble_gatt_init() with a function callback (instead of NULL), then you can know what the size supported by the peer from the following two events:

    NRF_BLE_GATT_EVT_ATT_MTU_UPDATED = 0xA77, //!< The ATT_MTU size was updated.
    NRF_BLE_GATT_EVT_DATA_LENGTH_UPDATED = 0xDA7A, //!< The data length was updated.

    There is no way to drop packets if they are buffered with the softdevice.

    Best regards,
    Kenneth

     

Children
Related