ArduPilot / ArduRemoteID

RemoteID support using OpenDroneID
GNU General Public License v2.0
100 stars 49 forks source link

bugfix BLE legacy advertisements broken #74

Closed BluemarkInnovations closed 1 year ago

BluemarkInnovations commented 2 years ago

In the current implementation, BLE4 legacy transmission work for about 30 seconds. Then it crashes and no BT4 legacy packets can be received anymore.

The "issue" seems to be caused the separate BLE legacy advertisement service for the BLE device name. This was also solved in this PR https://github.com/ArduPilot/ArduRemoteID/pull/26 but due to parallel code development at that time, this part wasn't included. The solution is to incorporate the BLE device name broadcast into the regular BT4 transmissions. Not sure what the underlying issue is, perhaps it is just a bug in the ESP/Arduino environment.

BluemarkInnovations commented 2 years ago

@tridge I tested it again with the last master build. It fails detecting the Remote ID signals very soon. With my professional receiver it keeps receiving signals. So I guess it has to do with the BT4/5 stack of the phone that doesn't seem to be able to handle multiple BT4 advertisements (crashes). Your Samsung S10 does a better job. This PR is basically a work-around for phones with buggy BT4 implementation. As most phones don't have BT5 support, having a BT4 implementation that can be received my most phones is important.

tridge commented 1 year ago

I've fixed conflicts with previous PRs, and tested