Skip to content
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

mavp2p not routing ParamExt commands #59

Open
sanderux opened this issue Dec 29, 2023 · 4 comments
Open

mavp2p not routing ParamExt commands #59

sanderux opened this issue Dec 29, 2023 · 4 comments
Labels
question Further information is requested

Comments

@sanderux
Copy link

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

@sanderux
Copy link
Author

@aler9
i dove a little deeper and it seems it does route the messages but it seems to truncate the payload.
Using an older mavp2p the message comes through with many bytes populated towards the end of the payload, on the new mavp2p on the first 20 or so are populated, the rest is 0x0

@Autonomost
Copy link

@sanderux @aler9 I have also seen that when QGC or Mission Planner does not negotiate stream rates, and mavp2p is configured with --streamreqdisable I can no longer receive parameters or send commands.

@aler9 aler9 added the question Further information is requested label Apr 26, 2024
@aler9
Copy link
Member

aler9 commented Apr 26, 2024

Hello, since #18 and #29, the router forwards messages, addressed to a certain system ID and component ID, only to the node which is broadcasting that specific system ID and component ID.

Therefore, this bug may be caused by one of the following things:

  • the router inability to route PARAM_EXT_SET messages to the desired target; this might be caused by the fact that the target doesn't broadcast its system ID or component ID and therefore the router doesn't send him the message
  • the router inability to correctly re-encode PARAM_EXT_SET messages. In order to obtain TargetSystem and TargetComponent of a message, the router has to decode the message, and then to re-encode it.

Unfortunately i don't have ready-to-use SITLs that support PARAM_EXT_SET, therefore i was not able to replicate the issue. In order to debug further, we need network dumps of the data exchanged between the control station and the router, and between the router and the drone. They can be generated in this way:

  1. Download wireshark (https://www.wireshark.org/)
  2. Start capturing on the interface used for exchanging packets (if the router and the external hardware or software are both installed on your pc, the interface is probably "loopback", otherwise it's the one of your network card)
  3. Start the router and replicate the issue
  4. Stop capturing, save the result in .pcap format
  5. Attach

@sanderux
Copy link
Author

sanderux commented May 3, 2024

024/05/03 12:34:45 mavp2p v0.0.0
2024/05/03 12:34:45 router started with 2 endpoints
2024/05/03 12:34:45 channel opened: tcp:172.20.110.10:5799
2024/05/03 12:34:45 node appeared: chan=tcp:172.20.110.10:5799 sid=2 cid=101
2024/05/03 12:34:45 node appeared: chan=tcp:172.20.110.10:5799 sid=2 cid=154
2024/05/03 12:34:45 node appeared: chan=tcp:172.20.110.10:5799 sid=2 cid=1
2024/05/03 12:34:45 node appeared: chan=tcp:172.20.110.10:5799 sid=1 cid=194
2024/05/03 12:34:45 node appeared: chan=tcp:172.20.110.10:5799 sid=1 cid=191
2024/05/03 12:34:45 node appeared: chan=tcp:172.20.110.10:5799 sid=1 cid=236
2024/05/03 12:34:46 node appeared: chan=tcp:172.20.110.10:5799 sid=1 cid=51
2024/05/03 12:34:46 node appeared: chan=tcp:172.20.110.10:5799 sid=1 cid=192
2024/05/03 12:34:46 node appeared: chan=tcp:172.20.110.10:5799 sid=1 cid=155

2024/05/03 12:32:40 &frame.V2Frame{IncompatibilityFlag:0x0, CompatibilityFlag:0x0, SequenceNumber:0xc0, SystemID:0xff, ComponentID:0xbe, Message:(*common.MessageParamExtSet)(0xc000258ba0), Checksum:0x870f, SignatureLinkID:0x0, SignatureTimestamp:0x0, Signature:(*frame.V2Signature)(nil)}, &common.MessageParamExtSet{TargetSystem:0x2, TargetComponent:0x65, ParamId:"CAM_STREAM", ParamValue:"", ParamType:0x1}

Seems like ParamValue should not be empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants