@RichieRich
Thank you for your excellent advice.
I will try to explain my current configuration. For local testing and configuration I'm using ADB and local WLAN. For final application I would like to use 5G network.
Of course, I need VPN (and will use OpenVPN) to provide connection between the ground station and the drone. For OpenVPN server I'm using some Mikrotik appliance configured to provide fixed, predefined IP addresses to GC and the drone.
Ground Control always receives 192.168.88.20
Drone always receives 192.168.88.21
Both are mutually "visible" and can communicate. This is working without issues.
In regard to your first question, here is the result of
sh-4.4# px4-versions
modalai-slpi/unknown,now 1.0-6 arm64 [installed]
px4-rb5-flight/unknown,now 1.4-6 arm64 [installed]
px4-support/unknown,now 1.0-4 arm64 [installed]
libfc-sensor/unknown,now 1.0-2 arm64 [installed]
1.0.5-M0052-9.1-perf
Here is the result of ifconfig on the drone. wwan0 is the 5G connection, tun0 is the OpenVPN connection tunnel.
sh-4.4# ifconfig
bond0: flags=5123<UP,BROADCAST,MASTER,MULTICAST> mtu 1500
ether 7a:19:6d:34:23:5d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
dummy0: flags=195<UP,BROADCAST,RUNNING,NOARP> mtu 1500
inet6 fe80::98d0:c594:6a01:f80a prefixlen 64 scopeid 0x20<link>
ether d6:41:ed:11:b0:d3 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13 bytes 3394 (3.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 60750 bytes 10831838 (10.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 60750 bytes 10831838 (10.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 192.168.88.21 netmask 255.255.255.0 destination 192.168.88.21
inet6 fe80::b41d:2608:5fb4:fcc5 prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 59 bytes 7414 (7.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 96 bytes 18438 (18.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:03:7f:12:a2:e9 txqueuelen 3000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wwan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1430
inet 10.194.65.175 netmask 255.255.255.224 destination 10.194.65.175
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 14127 bytes 18472229 (18.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1408 bytes 110804 (110.8 KB)
TX errors 7 dropped 0 overruns 0 carrier 0 collisions 0
I have placed following configuration in /etc/systemd/system/rb5-net-check.service
[Unit]
Description=rb5-net-check
#After=sscrpcd.service ---> this is commented
After=openvpn.service ---> I wait for openvpn to start
Requires=sscrpcd.service
[Service]
Type=oneshot
ExecStart=/usr/bin/rb5-net-check tun0 192.168
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Also I have added the IP 192.168.88.20 to the /etc/modalai/qgc-ip.cfg.
The result of
sh-4.4# rb5-net-check tun0
192.168.88.21
is as expected, ok.
But I have issue with PX4. I am not sure what to do here (also the blue LEDs do not blink, as it was before the update).
sh-4.4# systemctl status rb5-px4-start
● rb5-px4-start.service - rb5-px4-start
Loaded: loaded (/etc/systemd/system/rb5-px4-start.service; enabled; vendor pr
Active: failed (Result: exit-code) since Wed 2022-03-30 18:58:41 UTC; 4min 46
Process: 2671 ExecStart=/bin/bash -c PATH=/usr/bin m0052-px4 -d (code=exited,
Main PID: 2671 (code=exited, status=134)
sh-4.4# systemctl enable rb5-px4-start
sh-4.4# systemctl status rb5-px4-start
● rb5-px4-start.service - rb5-px4-start
Loaded: loaded (/etc/systemd/system/rb5-px4-start.service; enabled; vendor pr
Active: failed (Result: exit-code) since Wed 2022-03-30 18:58:41 UTC; 5min ag
Main PID: 2671 (code=exited, status=134)
Mar 30 18:58:33 qrb5165-rb5 systemd[1]: Started rb5-px4-start.
Mar 30 18:58:41 qrb5165-rb5 bash[2671]: terminate called after throwing an insta
Mar 30 18:58:41 qrb5165-rb5 bash[2671]: what(): FATAL: could not find sensors
Mar 30 18:58:41 qrb5165-rb5 bash[2671]: /usr/bin/m0052-px4: line 18: 2672 Abort
Mar 30 18:58:41 qrb5165-rb5 systemd[1]: rb5-px4-start.service: Main process exit
Mar 30 18:58:41 qrb5165-rb5 systemd[1]: rb5-px4-start.service: Failed with resul
When I start the QGroundControl, I can receive the video from the drone without any issues (as it is independent from CC link).
Could you provide some idea how to debug and resolve the issues with PX4? Many thanks!