-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple systems on the network #149
Comments
The problem is that MAVSDK-Java expects exactly one system on the port it listens to (here udp://:14550). It is the same with all the language bindings (e.g. MAVSDK-Swift, MAVSDK-Python). What you have to do is demultiplex the MAVLink stream, and send it to different instances of mavsdk_server. Say you have two drones, both broadcasting on udp://:14550. You can run a mavlink-router that listens on 14550 and forwards to 14551 and 14552. Then you can run on mavsdk_server with Does that make sense? |
I'm experiencing this same issue when trying to deconflict multiple drones on the same network, such as when there is a residual drone still sending data to my Java instance's IP address. Is there any hope on the horizon to be able to filter by System ID, or to even get the System ID from any received messages? |
If they have a different system id, then it should not conflict 🤔: MAVSDK-Java will just connect to the first one it encounters, right? My last comment is still valid, though: you can demultiplex based on the source IP 👍. |
They conflict when it comes to receiving
When I start the new connection via a new
And then I create a new
I only have problems when a second drone is up and broadcasting to my device's IP address on port
|
You are correct about it latching onto the first connection it receives, thanks for pointing that out! |
@JonasVautherin Does MAVSDK-Java support passing IP addresses other than |
MAVSDK-Java passes the string to the C++ mavsdk_server. So if the underlying |
This will come with MAVSDK v3, any time now. |
Great, looking forward to it. Thank you both! |
MAVSDK-Java Version:
2.0.1
MavSDK-Server Version:
2.0.0
I am running into an issue when there are multiple Systems detected on a network. My implementation looks like the following:
Where
ipAddress = "0.0.0.0"
andport
is the port of the system I am trying to connect to.If only 1 system is on the network, I am able to connect perfectly fine. If 2 systems are on the network, I am connected to both Systems with no way to discern between the two. Logcat looks like the following:
If I change
ipAddress
(mentioned above) to the IP of the desired system, MavSDK Server never finishes booting up. What can I do differently?The text was updated successfully, but these errors were encountered: