How to deal with dropped packets?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KevinR_91
Employee
Employee
25 replies posted 10 likes received 10 replies posted

Dropped packets happen, but in an application where you are controlling machinery and there are safety concerns is there anything in the BLE component, or just general good practice guidelines to follow so that critical commands are not missed, or if they are missed that is handled properly?

A phone will send commands to the PSoC over BLE, PSoC will control some actuators.  We want to avoid a situation where say a "START" commands is sent, and a subsequent "STOP" command is missed, causing the system to stay on for longer than intended.

Is there anything in the BLE stack that could help keep track of events, like missed packets, or missed responses?  Is there any other good practice guidance we have here?

We could send repeated commands for an event, with a timeout where if the command is not repeated then we know we missed a command.  In general if we start missing packets we would like to shut the system off for safety.

Regards,

Kevin

0 Likes
1 Solution

Hello,

In case of extreme range there will be a chance of dropped packets so that there will be a connection break down. In the Peripheral Preferred Connection Parameters if we define the Connection supervision timeout ( which is a parameter that defines the maximum time between two received Data Packet PDUs before the connection is considered lost) to certain value. And if the devices does not receive a BLE packet for a time equal to Connection supervision timeout value, then the link will lost the connection. This will conclude the missing of packets.

Thanks,

P Yugandhar.

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

I guess you're using the write without response (aka write command) writes to send commands, notifications to get responses.

What about uisng a normal write?

The normal write is reliable, so ble stack take care of packet loss and re-send procedure.

To get reliable notifications, you can use indications, that are reliable notifications. The ble peripheral will teuto send indications to the ble Central until it has been received.o

0 Likes

We are using write with response, but the issue occurs at extreme range, and if the command and control is becoming unstable we want to terminate control with an ALL OFF command at the device, because of the command instability.  We looked at using RSSI, but when the machine fires we get lots of interference in the first few seconds, so RSSI cannot be used, as it will kill the system during operation, no matter how low with set the RSSI trigger threshold.

We are hoping that there is service that could give us a QOS number, or number of dropped packets, if so we could use that as a kill signal.  Our only other concept is to use a repeated command, with timeout if the repeat does not arrive, or a rolling number, with a timeout if the number does not change soon enough.

Herb

0 Likes

Hello,

In case of extreme range there will be a chance of dropped packets so that there will be a connection break down. In the Peripheral Preferred Connection Parameters if we define the Connection supervision timeout ( which is a parameter that defines the maximum time between two received Data Packet PDUs before the connection is considered lost) to certain value. And if the devices does not receive a BLE packet for a time equal to Connection supervision timeout value, then the link will lost the connection. This will conclude the missing of packets.

Thanks,

P Yugandhar.

0 Likes