shamuproject / mavtables Goto Github PK
View Code? Open in Web Editor NEWMAVLink router and firewall.
License: GNU General Public License v2.0
MAVLink router and firewall.
License: GNU General Public License v2.0
If a packet is received over a connection it will be echoed back over that same connection if that connection contains a system/component combination different from the originating system/component. This causes connections to use more bandwidth than necessary as they bounce packets back and forth.
This was partially fixed in 029a07d which prevents packets from being echoed back when only the originating system/component can be reached on the connection.
0x0D bytes (carriage return) received over the serial port are translated to 0x0A (line feed). Therefore, the serial port is not in raw binary mode.
This was discovered because the PARAM_VALUE
packet is returned to the ground control software from the autopilot with parameters 13, 269, 522, and 781 listed as 10, 266, 522, and 778.
To fix this the ICRNL
bit should be cleared in the c_iflag
of the termios
structure.
The serial port write performance is very slow and it causes connection queue buildups.
Add a preload option to the configuration file for serial ports to add an address to the connection before a heartbeat is sent. This is required when the other end of the serial port is attached to another instance of mavtables. Without this, mavtables will not forward heartbeats to the other instance of mavtables and therefore, they cannot discover systems attached to the other mavtables's instance.
Adding this feature will allow the user to have preset addresses and thus allow heartbeat messages to be transmitted between two connected instances of mavtables (over serial port) and allow discovery of systems across mavtables's instances.
One example where this is necessary is when mavtables is used on both the ground control station and one or more UAVs.
When a packet has an invalid ID mavtables crashes. This is usually undesirable for a long-term running process like a router. It would be better to print to standard error, clear the input buffer, and continue parsing packets.
Because the most common users of MAVLink are ArduPilot and PX4 and the ArduPilot is a superset of the common dialect used by PX4 the default dialect should be changed to ArduPilot as it works for both systems.
This would correspond to how both QGroundControl and APM Planner support both ArduPilot and PX4 by compiling against the ardupilotmega MAVLink dialect.
Components of ID 190 should always be forwarded because this is the special MAV_COMP_ID_MISSIONPLANNER
component ID used for waypoint messages by some ground control software. See mavlink/qgroundcontrol#2907.
Add logging of packets and/or connections list.
One possible solution is to periodically print a summary of packets received from all addresses. Such as
192.168: 50 packets
172.128: 4 packets
10.10: 4560 packets
Another option is to print every received packet:
2018-04-13 15:37:23 HEARTBEAT (#0) from 127.1 (v2.0)
2018-04-13 15:37:23 PARAM_EXT_REQUEST_LIST (#321) from 0.255 to 32.64 (v2.0)
2018-04-13 15:37:23 ENCAPSULATED_DATA (#131) from 224.255 (v2.0)
2018-04-13 15:37:24 MISSION_SET_CURRENT (#41) from 255.0 to 0.0 (v2.0)
2018-04-13 15:37:25 PING (#4) from 192.168 to 127.1 (v2.0)
A final option, the most verbose, is to print every packet recieved and sent.
2018-04-13 15:37:23 ACCEPT HEARTBEAT (#0) from 127.1 (v2.0) source 127.0.0.1:14550 dest /dev/ttyUSB0
2018-04-13 15:37:23 ACCEPT HEARTBEAT (#0) from 127.1 (v2.0) source 127.0.0.1:14550 dest 127.0.0.1:14500
2018-04-13 15:37:23 ACCEPT PARAM_EXT_REQUEST_LIST (#321) from 0.255 to 32.64 (v2.0) source /dev/ttyUSB0 dest /dev/ttyUSB1
2018-04-13 15:37:23 REJECT ENCAPSULATED_DATA (#131) from 224.255 (v2.0) source 127.0.0.1:14550 dest /dev/ttyUSB0
2018-04-13 15:37:23 ACCEPT ENCAPSULATED_DATA (#131) from 224.255 (v2.0) source 127.0.0.1:14550 dest 127.0.0.1:14500
Or better, yet. Make this three seperate levels of verbosity, such as -v
, -vv
and -vvv
.
The SET_MODE
packet should be removed from the unit tests because it is deprecated and may eventually be removed from the MAVLink protocol.
The files this effects are:
src/If.cpp
test/unit_tests/common_Packet.hpp
test/unit_tests/test_Accept.cpp
test/unit_tests/test_Call.cpp
test/unit_tests/test_Chain.cpp
test/unit_tests/test_Connection.cpp
test/unit_tests/test_GoTo.cpp
test/unit_tests/test_If.cpp
test/unit_tests/test_mavlink.cpp
test/unit_tests/test_PacketQueue.cpp
test/unit_tests/test_PacketVersion1.cpp
test/unit_tests/test_PacketVersion2.cpp
test/unit_tests/test_Reject.cpp
test/unit_tests/test_Rule.cpp
Running the coverage
make target when using clang gives
gcno:version '402*', prefer 'A72*'
errors and out of memory errors.
The codecov git submodule is not pulled down when building.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.