Giter Site home page Giter Site logo

mavp2p's Issues

channel closed/open over and over

/usr/bin/mavp2p udps:127.0.0.1:8852 udps:0.0.0.0:14660 udpc:192.168.2.1:14550 udps:0.0.0.0:14550 udpc:127.0.0.1:14000 tcps:127.0.0.1:5777 --streamreq-frequency=10

I'm getting the following output:ยจ

2024/07/09 22:49:00 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:49:19 node disappeared: chan=udp:127.0.0.1:14000 sid=255 cid=0
2024/07/09 22:49:29 channel closed: tcp:127.0.0.1:60364
2024/07/09 22:49:30 channel closed: udp:192.168.2.1:14550
2024/07/09 22:49:30 channel opened: udp:192.168.2.1:14550
2024/07/09 22:49:30 node appeared: chan=udp:192.168.2.1:14550 sid=255 cid=190
2024/07/09 22:49:30 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:49:31 channel opened: tcp:127.0.0.1:33062
2024/07/09 22:50:01 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:50:31 channel closed: tcp:127.0.0.1:33062
2024/07/09 22:50:31 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:50:32 channel opened: tcp:127.0.0.1:33464
2024/07/09 22:51:01 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:51:31 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:51:32 channel closed: tcp:127.0.0.1:33464
2024/07/09 22:51:33 channel opened: tcp:127.0.0.1:33874
2024/07/09 22:52:02 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:52:33 channel closed: tcp:127.0.0.1:33874
2024/07/09 22:52:33 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:52:34 channel opened: tcp:127.0.0.1:34274
2024/07/09 22:52:39 node disappeared: chan=udp:192.168.1.24:14550 sid=255 cid=190
2024/07/09 22:53:04 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:53:06 channel closed: udp:192.168.1.24:14550
2024/07/09 22:53:34 channel closed: tcp:127.0.0.1:34274
2024/07/09 22:53:34 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:53:35 channel opened: tcp:127.0.0.1:34646
2024/07/09 22:54:04 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:54:34 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:54:35 channel closed: tcp:127.0.0.1:34646
2024/07/09 22:54:36 channel opened: tcp:127.0.0.1:35022
2024/07/09 22:54:37 channel opened: udp:192.168.1.24:14550
2024/07/09 22:54:37 node appeared: chan=udp:192.168.1.24:14550 sid=255 cid=190
2024/07/09 22:55:05 stream requested to chan=udp:127.0.0.1:42306 sid=1 cid=1
2024/07/09 22:55:13 channel closed: udp:192.168.2.1:14550
2024/07/09 22:55:13 node disappeared: chan=udp:192.168.2.1:14550 sid=255 cid=190
2024/07/09 22:55:13 channel opened: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel closed: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel opened: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel closed: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel opened: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel closed: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel opened: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel closed: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel opened: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel closed: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel opened: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel closed: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel opened: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel closed: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel opened: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel closed: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel opened: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel closed: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel opened: udp:192.168.2.1:14550
2024/07/09 22:55:13 channel closed: udp:192.168.2.1:14550

And the opened/closed goes on forever

Restart mavp2p on serial autopilot restart

Hey Alessandro. First of all, this software is awesome! Great work!

When initiating a restart command of the autopilot from a gcs, mavp2p doesn't try to re-establish the serial connection.
As a workaround I've created two services: one to run mavp2p and one to detect the disconnection and restart the mavp2p service. I'm not familiar with programming in go, but I'm more than happy to help get this code mod added if you're able to point me in the right direction.

Thanks!

Featurerequest: TLOG logging endpoint

Hi, i just found this really nicely written routing application, and i really like it due to its flexibility.

One additional idea for your lib is to have a tlogging endpoint for (automatic) tlogging of connected drones.

Just like something which was also proposed in mavlink-router, but sadly never made it upstream: mavlink-router/mavlink-router#269

Do you think something like this is possible? Thanks!

mavp2p not routing ParamExt commands

Hi @aler9

When testing a newer version of mavp2p we found that it seems to not route ParamExt commands

[E] at D:\a\auterion-qgroundcontrol\auterion-qgroundcontrol\src\FactSystem\ParameterExt.cc:207 - "No response for param set: "CAM_NEUTRAL""
[D] at D:\a\auterion-qgroundcontrol\auterion-qgroundcontrol\src\FactSystem\ParameterExt.cc:211 - "Param set retry: "CAM_STREAM" 2"
[D] at D:\a\auterion-qgroundcontrol\auterion-qgroundcontrol\src\FactSystem\ParameterExt.cc:211 - "Param set retry: "CAM_STREAM" 3"
[E] at D:\a\auterion-qgroundcontrol\auterion-qgroundcontrol\src\FactSystem\ParameterExt.cc:207 - "No response for param set: "CAM_STREAM""
So AMC is sending out the parameter change to switch between EO/IR and to set the gimbal mode. Payload manager doesn't receive any param change. Looking at the mavp2p configurations sounds like a good next step

Could that be related to this commit?
217a5ca

FeatureRequest: Enable dynamic use of mavp2p

Hello - first off, thank you for developing this project, I'm finding it very useful for some research I'm undertaking.
I'm running into a use case where I'd like to use mavp2p functionality dynamically instead of starting the process from the command line.

For this use case, I have slightly modified mavp2p on my own fork to make certain primitives public to external clients.
It's then possible for mavp2p to be used as a module, and new routers can be created on the fly.
The CLI would remain unchanged, of course.

If this is a feature you'd be interested in, I'm happy to share, and integrate any feedback you may have re: the implementation and the do a PR. If not, that's ok too, but it could be nice to share this functionality instead of me maintaining a fork.

Q: Custom routing to a specific channel/endpoint

Thank you for a great example of the mavlink router on Go. I really like it.

I have a question. I'm routing messages between all endpoints as it is presented in an example (https://github.com/aler9/mavp2p/blob/main/main.go#L220). But for one endpoint (microcontroller which runs on serial) I want to route just some specific messages to do not overload it with all incoming traffic.

When creating a node, I need to pass endpoints (https://github.com/aler9/mavp2p/blob/main/main.go#L153) but later we need to operate with channels (https://github.com/aler9/mavp2p/blob/main/main.go#L220). Is it possible to get a channel from an endpoint? Or any other ideas on how to implement the following logic:

  • Send a message to all channels except my specific endpoint
  • Send a message to my specific endpoint only if the message ID is X.

I would be very thankful for ideas here.

Close channel after all nodes dissappear

Hi there,

I noticed when you disconnect a UDP server (ip = 0.0.0.0) endpoint and we get a node disappeared message for the device(s) at that endpoint the channel never closes.

This has the effect that mavp2p will continue sending messages to that channel indefinitely, i confirmed this with wireshark. In our case it keeps sending UDP messages out into the void over cellular, so its a quite expensive issue! ๐Ÿ˜…

So it would be good to close a UDP server channel when all known nodes on it disappear.

What are your thoughts?

Thanks, Kester

Routing to Target Systems/Components

Hi there! I really like this router as it can handle N server connections very well on the server enpoint!

However, it doesn't route messages based upon the target_system and target_component as is described in the mavlink routing standard - https://mavlink.io/en/guide/routing.html.

We found in testing that if there are multiple GCS's connected to the mavp2p service, all commands/command_acks will be forwarded to all nodes regardless of the target_system of the message. Now, in theory this isn't a problem for us as we discard commands which are not intended for us on our GCSs, but it is still risky if someone's software doesn't do this. Plus also it congests the network.

So my question - are there any plans/value to implement this on the roadmap?

Thank you :)

Hardware flow control support

Hi again!

I noticed recently when testing mavp2p with a pixhawk flight controller (with px4 firmware) that mavp2p does not support serial hardware flow control. Some PX4/pixhawk versions uses flow control for it's telemetry serial ports - https://docs.px4.io/main/en/flight_controller/pixhawk4.html#serial-port-mapping - so I was unable to connect.

I had a look at the mavp2p code base to see if i could enable it, but you seem to use the https://github.com/tarm/serial library which does not support flow control I think (I saw this ticket tarm/serial#68).

So I was wondering if you would consider changing serial library to one which can support flow control, and then presumably to add an argument to the mavp2p serial port selection to enable/disable flow control?

Thanks!
Kester

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.