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

I want consistent timing of S132 nus packets

I have an application where I read a IMU at around 60 - 80 hertz.

How should I configure the S132 so I can send my 14 byte string packet with a constant time interval?

I need the packet to be sent immediately and not be buffered an packed with another in a notification time slot.

Is there any configuration needed of ble timer values for ble notification to get this to work?

That is one message sent for every call to the bleuart send systemcalled.

Hope this is a understandable question.

Bo-Erik

Parents
  • I'm assuming you are developing a peripheral device.

    This constant time interval would be the connection interval. It is central device that dictates the connection interval, but as a peripheral you can send a connection parameter update request to the central.

    If you want to send packets at 80 Hz you would need a connection interval no smaller than 1/80 = 0.0125 s = 12.5 ms. It depends on the central if it will accept a request for this low a connection interval or not. There are some questions discussing this in here.

    Packets are not sent immediately, packets are sent on every connection interval. So you queue one or more packets, and when a connection event begins as many as possible of the queued packets will be sent to the peer, but sometimes no data packets are sent, because of packet loss or a system packet that occupies the slot.

    You say that you don't want to buffer more than one packet, then you will have to wait for the event that tells you that the packet is sent before you queue a new one. Similar to Variant #2 here.

Reply
  • I'm assuming you are developing a peripheral device.

    This constant time interval would be the connection interval. It is central device that dictates the connection interval, but as a peripheral you can send a connection parameter update request to the central.

    If you want to send packets at 80 Hz you would need a connection interval no smaller than 1/80 = 0.0125 s = 12.5 ms. It depends on the central if it will accept a request for this low a connection interval or not. There are some questions discussing this in here.

    Packets are not sent immediately, packets are sent on every connection interval. So you queue one or more packets, and when a connection event begins as many as possible of the queued packets will be sent to the peer, but sometimes no data packets are sent, because of packet loss or a system packet that occupies the slot.

    You say that you don't want to buffer more than one packet, then you will have to wait for the event that tells you that the packet is sent before you queue a new one. Similar to Variant #2 here.

Children
No Data
Related