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

Tweaks on receiver side to receive more messages

Hello, we are using SDK 5.2.0, SoftDevice 6.2.1 S110 on the peripheral side and S130 on the central side.

We have implemented a serial data link between the two, the central sends ASCII queries to the peripheral along the lines of "[Q5]" and the peripheral replies with [Q5=723]".  The peripheral will internally queue up the message characters, and when the message is complete ']' or if the attribute is full (17 chars) it will send the data via the softdevice using 

sd_ble_gatts_hvx(p_sys->conn_handle, &params)

then the central receives an event BLE_GATTC_EVT_HVX from the softdevice, and it extracts the data and processes it.  This all works great.

On a recent build this queuing system may have been broken, and it is sending a message via sd_ble_gatts_hvx on every character.  So on the receiver side we get one character per BLE_GATTC_EVT_HVX.  This would work fine except we are losing some of the characters; in other words we are receiving events for the '[', 'Q', '5', '=', '7', and the rest are apparently lost.

It is very desirable for us to fix this issue on the receiver/central side rather than the sender/peripheral side.  Obviously we should fix the queuing system on the sender, but in the meantime is there anything we can tweak on the receiver end to allow us to receive more events??  Any buffer sizes or timing parameters that would increase our chances of handling ten quick events in succession (I understand the lost characters may not actually be transmitted, but they might also be lost after receipt, it's unclear at this point)

Any levers we can pull on the receiver side to allow complete messages?  Thanks very much for any help!

Parents Reply Children
No Data
Related