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

Bluetooth: Master initiates the data transmission in Slave Notify mode. Multiple transmissions in single connection event

I am trying to understand better the Bluetooth communication based on some data logs.

Master connection params:

int_min: 1000ms
int_max: 1005ms
lat: 0
timeout: 4000ms

Slave is calling function bt_gatt_notify every 20ms with new values provided. Master is subscribed to the notifications.

Here is the view from Wireshark in particular moment:

Wireshark.log

What I find strange:

  1. Whenever the slave should transmit the new data, its actually Master who is sending the request first, then the slave responds.
  2. No ACKs from the master after that
  3. In single connection event there are 3 new values that are being sent to Master(you can understand by looking the log times). After 3 are sent, the Master is waiting for the beginning of the next connection interval.

I was expecting that there will be asynchronous data transmission initiated by the Slave as soon as the data is updated. Also what I found strange is that for some reason in one connection event there are 3 new values. How can we clarify this?

Best,

Parents
  • I would like to add that your conn parameters are strange - you're trying to send a notification every 20ms knowing that an exchange will occur not frequently than once a second - so 47 messages of 50 are lost. If you would like to save power, configure 20-ms conn interval and set slave latency to 50 (to skip events while no data is ready).

Reply
  • I would like to add that your conn parameters are strange - you're trying to send a notification every 20ms knowing that an exchange will occur not frequently than once a second - so 47 messages of 50 are lost. If you would like to save power, configure 20-ms conn interval and set slave latency to 50 (to skip events while no data is ready).

Children
Related