BluEye-Robotics / ProtocolDefinitions

Collection of protocol definitions for the Blueye underwater drones
GNU Lesser General Public License v3.0
2 stars 3 forks source link

Define a connection procedure for the protocol #5

Closed follesoe closed 3 years ago

follesoe commented 6 years ago

Today we have a couple issues with how connections are established. The current implementation will publish UDP telemetry data to the IP of the currently connected client. If a second client connects, the first client will be disconnected without warning. The first client will then try to reconnect, which in turn will kick the second client out. This will result in an endless connect-disconnect loop.

We need a more structured protocol to deal with multiple clients.

The second issue is to return some information about the drone you connected to, as part of the connection procedure. This can be implemented as a simple service call, that the drone calls once the connection is established (similar to how we always set the clock on connection).

The key information to get back is the version number of the protocol. This is key, to solve the challenge of version compatibility, where an old client (App) connected to a new Drone. In this case, the drone could potentially use a v3 of the protocol, while the app only supports v2. In such a case, the app should issue a warning saying that the app is incompatible.

Could this flag also potentially be set in the avahi file as an alternative?

johannesschrimpf commented 3 years ago

Will be solved with new protocol. https://github.com/BluEye-Robotics/ProtocolDefinitions/pull/14