Giter VIP home page Giter VIP logo

svpcom / wfb-ng Goto Github PK

View Code? Open in Web Editor NEW
902.0 52.0 220.0 2 MB

WFB-NG - the next generation of long-range packet radio link based on raw WiFi radio

Home Page: https://docs.px4.io/main/en/tutorials/video_streaming_wifi_broadcast.html

License: GNU General Public License v3.0

Makefile 0.15% C 2.69% C++ 4.39% Shell 1.81% Python 90.95% Dockerfile 0.02%
fpv telemetry video px4 mavlink wifibroadcast camera raspberry-pi rtp wfb-ng

wfb-ng's Introduction

WFB-NG

This is the next generation of long-range packet radio link based on raw WiFi radio

Main features:

  • 1:1 map of RTP to IEEE80211 packets for minimum latency (doesn't serialize to byte stream)
  • Smart FEC support (immediately yield packet to video decoder if FEC pipeline without gaps)
  • Bidirectional mavlink telemetry. You can use it for mavlink up/down and video down link.
  • IP-over-WFB tunnel support. You can transmit ordinary ip packets over WFB link. Note, don't use ip tunnel for high-bandwidth transfers like video or mavlink. It uses less efficient FEC coding and doesn't aggregate small packets.
  • Automatic TX diversity (select TX card based on RX RSSI)
  • Stream encryption and authentication (libsodium)
  • Distributed operation. It can gather data from cards on different hosts. So you don't limited to bandwidth of single USB bus.
  • Aggregation of mavlink packets. Doesn't send wifi packet for every mavlink packet.
  • Enhanced OSD for Raspberry PI (consume 10% CPU on PI Zero) or any other system which supports gstreamer (Linux X11, etc). Compatible with any screen resolution. Supports aspect correction for PAL to HD scaling.
  • Provides IPv4 tunnel for generic usage

⚠️ Warranty/Disclaimer
This is free software and comes with no warranty, as stated in parts 15 and 16 of the GPLv3 license. The creators and contributors of the software are not responsible for how it is used. See License and Support for details.

Support project

If you like WFB-ng you can support author via:

Getting Started

For detailed instructions on how to get started read through PX4-Guide and follow the Setup HowTo

Quick start using Raspberry Pi

  • Under Releases download the latest image file (*.img.gz).
  • Unpack the *.img file and flash it to 2-SD Cards.
  • Plug the WiFi Adapters into the Raspberry Pis
  • Boot the Pis and ssh into them using the following command (replace 192.168.0.111 with their IP-Address). Password: raspberry

For putty users don't forget to select: Settings -> Window -> Translation -> Enable VT100 line drawing checkbox before connect.

  • On the Pi used as ground station:
sudo systemctl enable wifibroadcast@gs
sudo systemctl enable rtsp
sudo systemctl enable fpv-video
sudo systemctl enable osd
sudo reboot
  • On the Pi used on the drone:
sudo systemctl enable wifibroadcast@drone
sudo systemctl enable fpv-camera
sudo reboot
  • Done! You should be able to see the video from the FPV camera. To monitor the link use the following command on the ground station:
wfb-cli gs

Quick start using Ubuntu Ground Station

  • Install patched RTL8812AUdriver:
sudo apt-get install dkms
git clone -b v5.2.20 https://github.com/svpcom/rtl8812au.git
cd rtl8812au/
sudo ./dkms-install.sh
  • Make sure the driver is correctly installed by running the following command. You should see the WiFi card in an unmanaged state.
nmcli
  • Get the name of the WiFi card by running:
ifconfig
  • You should see output similar to:
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 2312
        ether 0c:91:60:0a:5a:8b  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
  • Copy the name of the RTL8812AU WiFi card.
  • Install wfb-ng. Replace wifi0with the previously copied name of the WiFi card.
git clone -b stable https://github.com/svpcom/wfb-ng.git
cd wfb-ng
sudo ./scripts/install_gs.sh wifi0
  • Done! To monitor the link use the following command on the ground station:
wfb-cli gs

Failing to get connection?

Make sure the WiFi channel on the ground and on the drone are the same. To check, use:

head /etc/wifibroadcast.cfg

You should see output similar to:

[common]
wifi_channel = 161     # 161 -- radio channel @5825 MHz, range: 5815–5835 MHz, width 20MHz
                       # 1 -- radio channel @2412 Mhz, 
                       # see https://en.wikipedia.org/wiki/List_of_WLAN_channels for reference

Ensure the WiFi channel selected is the same on the ground and on the drone.


FAQ

Q: What type of data can be transmitted using WFB-NG?

A: Any UDP with packet size <= 1445. For example x264 inside RTP or Mavlink.

Q: What are transmission guarantees?

A: Wifibrodcast uses FEC (forward error correction) which can recover 4 lost packets from 12 packets block with default settings. You can tune it (both TX and RX simultaneously!) to fit your needs.

Q: Is only Raspberry PI supported?

A: WFB-NG is not tied to any GPU - it operates with UDP packets. But to get RTP stream you need a video encoder (which encodes raw data from camera to x264 stream). In my case RPI is only used for video encoding (because RPI Zero is too slow to do anything else) and all other tasks (including WFB-NG) are done by other board (NanoPI NEO2).

Q: What is a difference from original wifibroadcast?

A: Original version of wifibroadcast uses a byte-stream as input and splits it to packets of fixed size (1024 by default). If radio packets were lost and this is not corrected by FEC you'll get a hole at random (unexpected) place of stream. This is especially bad if data protocol is not resistant to (was not desired for) such random erasures. So i've rewritten it to use UDP as data source and pack one source UDP packet into one radio packet. Radio packets now have variable size depending on payload size. This reduces video latency a lot.

Theory

WFB-NG puts the wifi cards into monitor mode. This mode allows to send and receive arbitrary packets without association and waiting for ACK packets.

Sample usage chain:

Camera -> gstreamer --[RTP stream (UDP)]--> wfb_tx --//--[ RADIO ]--//--> wfb_rx --[RTP stream (UDP)]--> gstreamer --> Display

For encoding logitech c920 camera:

gst-launch-1.0 uvch264src device=/dev/video0 initial-bitrate=6000000 average-bitrate=6000000 iframe-period=1000 name=src auto-start=true \
               src.vidsrc ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! rtph264pay ! udpsink host=localhost port=5600

To encode a Raspberry Pi Camera V2:

raspivid -n  -ex fixedfps -w 960 -h 540 -b 4000000 -fps 30 -vf -hf -t 0 -o - | \
               gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=35 ! udpsink sync=false host=127.0.0.1 port=5600

To decode:

 gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' \
               ! rtph264depay ! avdec_h264 ! clockoverlay valignment=bottom ! autovideosink fps-update-interval=1000 sync=false

HOWTO build:

For development (inline build)

make

For binary distribution RHEL or Fedora

make rpm

For binary distribution Debian or Ubuntu

sudo apt install python3-all libpcap-dev libsodium-dev python3-pip python3-pyroute2 \
            python3-future python3-twisted python3-serial python3-all-dev iw virtualenv \
            debhelper dh-python build-essential -y
sudo make deb

For binary distribution (tar.gz)

make bdist

You need to generate encryption keys for gs(ground station) and drone:

wfb_keygen

Leave them in place for development build or copy to /etc for binary install. Put drone.key to drone and gs.key to gs.

Supported WiFi hardware:

Wiki:

See https://github.com/svpcom/wfb-ng/wiki for additional info

Community support:

Telegram group: (wfb-ng support) https://t.me/wfb_ng Please note, that it is only one official group.

wfb-ng's People

Contributors

alexanderyastrebov avatar alexshmelev avatar doreapp avatar ju-leon avatar lida2003 avatar lucasgrelaud avatar mariofpvdev avatar onkarsb avatar roboschmied avatar standmit avatar svpcom avatar windfisch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wfb-ng's Issues

Too many UDP packets dropped during the streaming

Hello everyone,

I'm working on a image streaming project in my drone and I had a trouble:
too many packets dropped during the streaming.
Unfortunately, I tested the same wifibroadcast setup on my friend PC and the streaming worked well (literally I copied the same wifibroadcast directory to my friend PC)
The image quality on my friend PC is a lot better than my PC. We noticed the quality was improved on his PC when we added the wlp3s0 internal antenna on the transmission script. But the same doesn't occur on my PC, when I add the internal antenna (wlp2s0) to the transmission (further the external antenna that I'm using to stream).

The HW setup is:

TX: alfa AWUS036NH with 9dB antenna
RX: alfa AWUS036NH with 9dB antenna

Both computers running Ubuntu 16.04

WiFi card specs on my PC:

            description: Wireless interface
            product: QCA6174 802.11ac Wireless Network Adapter
            vendor: Qualcomm Atheros
            physical id: 0
            bus info: pci@0000:02:00.0
            logical name: wlp2s0
            version: 32
            serial: d8:0f:99:bf:ee:dd
            width: 64 bits
            clock: 33MHz
            capabilities: bus_master cap_list logical wireless
            configuration: broadcast=yes driver=ath10k_pci driverversion=4.15.0-46-generic firmware=WLAN.RM.4.4.1-00079-QCARMSWPZ-1 latency=0 link=yes multicast=yes wireless=IEEE 802.11

WiFi card specs on my friend PC:

*-network
description: Wireless interface
product: QCA9377 802.11ac Wireless Network Adapter
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:03:00.0
logical name: wlp3s0
version: 31
serial: 98:83:89:94:46:31
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=ath10k_pci driverversion=4.15.0-46-generic firmware=WLAN.TF.1.0-00267-1 ip=192.168.42.28 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:127 memory:ef200000-ef3fffff

Output during the streaming on my PC:

8 packets lost
13 packets lost
1086331 ANT 1 102:-55:-48:-45
1086331 PKT 103:0:103:50:44:0
13 packets lost
8 packets lost
12 packets lost
16 packets lost
1087331 ANT 1 136:-47:-45:-43
1087331 PKT 137:0:137:64:49:0
14 packets lost
8 packets lost
8 packets lost
8 packets lost
1088331 ANT 1 128:-47:-45:-45
1088331 PKT 128:0:128:74:38:0
30 packets lost
7 packets lost
10 packets lost
7 packets lost
2 packets lost
7 packets lost
1089331 ANT 1 132:-47:-45:-45
1089331 PKT 133:0:133:57:63:0
8 packets lost
8 packets lost
24 packets lost
16 packets lost
1090331 ANT 1 123:-47:-44:-43
1090331 PKT 124:0:124:55:56:0
15 packets lost
6 packets lost
16 packets lost
33 packets lost
1091331 ANT 1 105:-49:-46:-43
1091331 PKT 105:0:105:35:70:0
23 packets lost
8 packets lost
15 packets lost
1092331 ANT 1 113:-51:-47:-45
1092331 PKT 114:0:114:57:46:0
15 packets lost
7 packets lost
17 packets lost
16 packets lost
1093331 ANT 1 129:-49:-46:-45
1093331 PKT 130:0:130:47:55:0

Sorry for this generic question, but I didn't understand what is happening with my wifibroadcast streaming.

Can not arm vehicle through Mavlink in monitor mode

Ive finally got everything tweaked and running great but for some reason vehicle did not respond to command Arm/Disarm when trying to arm the copter. Any idea what causes this? I can arm fine when connected IP direct via UDP but not in monitor mode.

Using PX4 and Pixhawk with SYS_COMPANION set it to 921600.

some times, fec recovery wrong packet

hi, some times, after do fec,
the recoveryed packet is wrong, and the log : fprintf(stderr, "corrupted packet %u\n", seq);
is dumpt.

void LocalAggregator::send_packet(int ring_idx, int fragment_idx)
{
wpacket_hdr_t* packet_hdr = (wpacket_hdr_t*)(rx_ring[ring_idx].fragments[fragment_idx]);
uint8_t *payload = (rx_ring[ring_idx].fragments[fragment_idx]) + sizeof(wpacket_hdr_t);

if (packet_hdr->seq > seq + 1)
{
    fprintf(stderr, "%u packets lost\n", packet_hdr->seq - seq - 1);
}

seq = packet_hdr->seq;

if(packet_hdr->packet_size > MAX_PAYLOAD_SIZE)
{
    fprintf(stderr, "corrupted packet %u\n", seq);
}else{
    send(sockfd, payload, packet_hdr->packet_size, 0);
}

}

missing libpcap.so libsodium

The release version missing libpcap and libsodium if using directly.
Please add libpcap-dev and libsodium-dev as dependecy. And change libsodium link location.

premade images

could you provide some pre made SD images to make trying your system easer?

Base Image

Hello. I have been having real problems with making all of this work.

Can anyone who has made it work help with a rough guide.

What base image did you use? What hardware?

I am having real trouble getting everything to work. Can anyone help at all?

failed to build

following the instructions on https://dev.px4.io/en/qgc/video_streaming_wifi_broadcast.html i cant seem to get the build successful.

I got an error about sodium.h so i installed libsodium-dev but when trying to make this is the output

cc -c -o fec.o fec.c -Wall -g
fec.c:175:31: error: expected ‘;’, ‘,’ or ‘)’ before ‘dst’
_addmul1(register gfrestrict dst, const register gfrestrict src, gf c, size_t sz) {
^
fec.c: In function ‘_invert_mat’:
fec.c:250:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t i = 0; i < k; i++)
^
fec.c:250:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
fec.c:253:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t col = 0; col < k; col++) {
^
fec.c:264:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t row = 0; row < k; row++) {
^
fec.c:266:17: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t ix = 0; ix < k; ix++) {
^
fec.c:286:13: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t ix = 0; ix < k; ix++)
^
fec.c:300:13: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t ix = 0; ix < k; ix++)
^
fec.c:313:13: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t ix = 0; ix < k; ix++, p += k) {
^
fec.c:317:21: warning: implicit declaration of function ‘_addmul1’ [-Wimplicit-function-declaration]
addmul (p, pivot_row, c, k);
^
fec.c:323:17: error: redefinition of ‘col’
for (size_t col = k; col > 0; col--)
^
fec.c:253:17: note: previous definition of ‘col’ was here
for (size_t col = 0; col < k; col++) {
^
fec.c:323:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t col = k; col > 0; col--)
^
fec.c:325:13: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t row = 0; row < k; row++)
^
fec.c: At top level:
fec.c:499:53: error: expected ‘;’, ‘,’ or ‘)’ before ‘const’
build_decode_matrix_into_space(const fec_trestrict const code, const unsignedconst restrict index, const unsigned k, gfrestrict const matrix) {
^
fec.c: In function ‘fec_decode’:
fec.c:519:5: warning: implicit declaration of function ‘build_decode_matrix_into_space’ [-Wimplicit-function-declaration]
build_decode_matrix_into_space(code, index, code->k, m_dec);
^
fec.c: At top level:
fec.c:236:1: warning: ‘_invert_mat’ defined but not used [-Wunused-function]
_invert_mat(gf
src, size_t k) {
^
Makefile:8: recipe for target 'fec.o' failed
make: *** [fec.o] Error 1

name clash

Hi, great to see this project take up from and improve on the old befinitiv project. It's a bit confusing to have the same name, particularly for systems that want to offer both as an option. Might be an idea to rename the project to avoid confusion?

Help setting up

Hello

I have setup two raspberry pis with AWUS036ACH. I have the cards working and in monitor mode. When running the TX side shows this

[email protected] - WFB profile drone
Loaded: loaded (/lib/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-03-29 08:18:41 UTC; 19s ago
Main PID: 1205 (python)
CGroup: /system.slice/system-wifibroadcast.slice/[email protected]
├─1205 /usr/bin/python -m telemetry.server drone wlx00c0ca961470
├─1269 /usr/bin/wfb_rx -p 1 -u 14601 -K /etc/drone.key wlx00c0ca961470
├─1271 /usr/bin/wfb_tx -p 2 -u 14600 -K /etc/drone.key -B 20 -G long -S 1 -L 0 -M 1 wlx00c0ca961470
└─1273 /usr/bin/wfb_tx -p 3 -u 5602 -K /etc/drone.key -B 20 -G long -S 1 -L 0 -M 1 wlx00c0ca961470

Mar 29 08:18:45 navio python[1205]: 2019-03-29 08:18:45+0000 [-] Telem RX: /usr/bin/wfb_rx -p 1 -u 14601 -K /etc/drone.key wlx00c0ca961470
Mar 29 08:18:45 navio python[1205]: 2019-03-29 08:18:45+0000 [-] Telem TX: /usr/bin/wfb_tx -p 2 -u 14600 -K /etc/drone.key -B 20 -G long -S 1 -L 0 -M 1 wlx00c0ca961470
Mar 29 08:18:45 navio python[1205]: 2019-03-29 08:18:45+0000 [-] Started telem rx
Mar 29 08:18:45 navio python[1205]: 2019-03-29 08:18:45+0000 [-] Started telem tx
Mar 29 08:18:45 navio python[1205]: 2019-03-29 08:18:45+0000 [-] Listen for video stream 3 on 0.0.0.0:5602
Mar 29 08:18:45 navio python[1205]: 2019-03-29 08:18:45+0000 [-] Started video tx
Mar 29 08:18:45 navio python[1205]: 2019-03-29 08:18:45+0000 [-] Video: /usr/bin/wfb_tx -p 3 -u 5602 -K /etc/drone.key -B 20 -G long -S 1 -L 0 -M 1 wlx00c0ca961470
Mar 29 08:18:45 navio python[1205]: 2019-03-29 08:18:45+0000 [-] telem tx: Listen on 14600 for wlx00c0ca961470
Mar 29 08:18:45 navio python[1205]: 2019-03-29 08:18:45+0000 [-] video tx: Listen on 5602 for wlx00c0ca961470
Mar 29 08:18:45 navio python[1205]: 2019-03-29 08:18:45+0000 [-] telem rx: wlx00c0ca961470 has DLT_IEEE802_11_RADIO Encap

the RX side

[email protected] - WFB profile gs
Loaded: loaded (/lib/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-03-29 08:08:48 UTC; 15s ago
Main PID: 1005 (python)
CGroup: /system.slice/system-wifibroadcast.slice/[email protected]
├─1005 /usr/bin/python -m telemetry.server gs wlx00c0ca96146c
├─1052 /usr/bin/wfb_rx -p 2 -u 14600 -K /etc/gs.key wlx00c0ca96146c
├─1054 /usr/bin/wfb_tx -p 1 -u 14601 -K /etc/gs.key -B 20 -G long -S 1 -L 0 -M 1 wlx00c0ca96146c
└─1060 /usr/bin/wfb_rx -p 3 -c 127.0.0.1 -u 5600 -K /etc/gs.key wlx00c0ca96146c

Mar 29 08:08:51 navio python[1005]: 2019-03-29 08:08:51+0000 [-] AntennaFactory starting on 8001
Mar 29 08:08:51 navio python[1005]: 2019-03-29 08:08:51+0000 [-] Started telem rx
Mar 29 08:08:51 navio python[1005]: 2019-03-29 08:08:51+0000 [-] Started telem tx
Mar 29 08:08:51 navio python[1005]: 2019-03-29 08:08:51+0000 [-] Send video stream 3 to 127.0.0.1:5600
Mar 29 08:08:51 navio python[1005]: 2019-03-29 08:08:51+0000 [-] AntennaFactory starting on 8002
Mar 29 08:08:51 navio python[1005]: 2019-03-29 08:08:51+0000 [-] Started video rx
Mar 29 08:08:51 navio python[1005]: 2019-03-29 08:08:51+0000 [-] Video: /usr/bin/wfb_rx -p 3 -c 127.0.0.1 -u 5600 -K /etc/gs.key wlx00c0ca96
Mar 29 08:08:51 navio python[1005]: 2019-03-29 08:08:51+0000 [-] telem tx: Listen on 14601 for wlx00c0ca96146c
Mar 29 08:08:51 navio python[1005]: 2019-03-29 08:08:51+0000 [-] video rx: wlx00c0ca96146c has DLT_IEEE802_11_RADIO Encap
Mar 29 08:08:51 navio python[1005]: 2019-03-29 08:08:51+0000 [-] telem rx: wlx00c0ca96146c has DLT_IEEE802_11_RADIO Encap

i have data from each modem showing on Wireshark and kismet. But they are not talking. No data is flowing so to speak.

wfb-cli gs shows this
xRX PKT: recv 0 d_ok 0 fec_r 0 lost 0 d_err 0 bad 0
xRX PKT/s: recv 0 d_ok 0 fec_r 0 lost 0 d_err 0 bad 0

I have the autopilot outputting data on 127.0.0.1:14550 its a navio 2 so outputs direct IP data.

What am i doing wrong??

Config Parse Error after adding UDP Endpoint

Fresh build and install, on two Raspberry Pi 3Bs.

I get this error after adding the UdpEndpoint to the config file:

pi@sparky-gcs:~ $ wfb-cli
Config parse error: [UdpEndpoint wifibroadcast] mode = Normal
Traceback (most recent call last):
  File "/usr/bin/wfb-cli", line 11, in <module>
    load_entry_point('wifibroadcast==19.12.4.85045', 'console_scripts', 'wfb-cli')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/dist-packages/telemetry/cli.py", line 40, in <module>
    from telemetry.common import abort_on_crash, exit_status
  File "/usr/lib/python2.7/dist-packages/telemetry/common.py", line 33, in <module>
    from telemetry.conf import settings
  File "/usr/lib/python2.7/dist-packages/telemetry/conf/__init__.py", line 25, in <module>
    settings, cfg_files = _parse_config()
  File "/usr/lib/python2.7/dist-packages/telemetry/conf/__init__.py", line 22, in _parse_config
    return config_parser.parse_config(os.path.join(os.getcwd(), os.path.dirname(__file__)), telemetry_cfg or _cfg_files)
  File "/usr/lib/python2.7/dist-packages/telemetry/config_parser.py", line 106, in parse_config
    raise ConfigError('Parse error: %s' % (err,))
telemetry.config_parser.ConfigError: Parse error: [UdpEndpoint wifibroadcast] mode = Normal

Here's my /etc/wifibroadcast.cfg:

[common]
wifi_channel = 161     # 161 -- radio channel @5825 MHz, range: 5815–5835 MHz, width 20MHz
                       # 1 -- radio channel @2412 Mhz, 
                       # see https://en.wikipedia.org/wiki/List_of_WLAN_channels for reference
wifi_region = 'US'     # Your country for CRDA (use BO or GY if you want max tx power)  

[gs_mavlink]
peer = 'connect://127.0.0.1:14550'  # outgoing connection
# peer = 'listen://0.0.0.0:14550'   # incoming connection

[gs_video]
peer = 'connect://127.0.0.1:5600'  # outgoing connection for
                                   # video sink (QGroundControl on GS)


[UdpEndpoint wifibroadcast]
Mode = Normal
Address = 127.0.0.1
Port = 14550

Any ideas why I'm getting this? I followed the instructions exactly.

Thanks for reading!

Rx Tx Wifi Hardware

Hello,
I have some questions regarding to the hardware setup:
As the ALFA AWUS051NH v2 has reached EOL is there any way to use the Alfa Network AWUS036ACH?
Due to the weak performance the Rasperry Pi Zero does not seem to work as standalone Tx setup (USB cam / RPI cam -> RPI -> Wifi). Furthermore the Raspberry Pi 3 his very huge and heavy, which means it is no opportunity (about 44g).
So what about these boards:
NanoPi-NEO2 http://nanopi.org/NanoPi-NEO2_Feature.html
Banana Pi M2 Zero http://www.banana-pi.org/bpi-zero.html
NanoPi-NEO-Air http://nanopi.org/NanoPi-NEO-air_Feature.html
Nanopi-Duo http://nanopi.org/NanoPi-Duo_Feature.html
Nanopi-NEO-Plus2 http://nanopi.org/NanoPi-NEO-Plus2_Feature.html
NanoPi-NEO http://nanopi.org/NanoPi-NEO_Feature.html
NanoPi-NEO2 http://nanopi.org/NanoPi-NEO2_Feature.html
Nanopi-NEO-Core2 http://nanopi.org/NanoPi-NEO-Core2_Feature.html
Is there something usable as Tx or do you have any other low price and low weight boards that could be used?
I am very new to the Rasperry Pi world so you have to help me out a little bit. :)
Regards
David

RTL8723BE wifi card working

Hi,

Just to let you know that RTL8723BE is working. I have quite a few packet loss, but I don't think it is software related.
I will let you know about further test.
regards

What's involved in 'patching the kernel'?

@svpcom I note in installation instructions contained here, in "Software Setup" bullet (3) I have to "Patch your kernel". I am not a software developer but am a quick study and I understand that this means downloading the kernel source code from the www.raspberrypi.org github repository, using the "patch" application to modify that source code, then building the kernel, presumably to end up with a new "kernel.img" file.

  • Firstly, have I understood the 4.75 million web pages I've had to read to to be able to say all that! ;)
  • Secondly, building the entire kernel for some minor changes seems like a lot of effort (and processor time), is there an easier way, for example, just "make"ing the files that are changing?

Appreciate you helping out a noob here.

Can't figure out transmission problems (WiFi)

Hi there.

I've been trying to setup video transmission in April then left it for a while as I could not figure things out, but now I'm back to this topic.

So what I have is Raspberry Pi 2, 2x Alfa AWUS036NHA (AR9271), 2x Alfa AWUS036ACH.

The problem I have is like bandwidth is very narrow. I can get any video stream only if I set bitrate to like 100 and very low resolution. And even then there is big delay and some packet loss and key frames are not being still sent (received?) quite often.

I tried to read whatever is possible, apply patches, use modded drivers when possible (everything according to docs) and nothing works for me. What does work is changing TX power but that's only by setting up limits by rules (none of commands worked for me iirc).

Anyway what I have tried:

  • different channels
  • 2G/5G
  • different drivers
  • both WiFi cards (in pairs and in different combinations) along with some random cards
  • powering up WiFi card from external source
  • setting up things like iw dev wlan0 set bitrates legacy-2.4 18
  • different commands found across internet that supposed to change something
  • I saw a suggestion of using EZ-WifiBroadcast's image and setting wifibroadcast up there as it includes various patches and things (no luck here as well)
  • different antennas - stock, bigger ones, no antennas
  • different antenna connectors
  • disabling managing interfaces by OS

And what I constantly see are dropped packets or when I test it today also override block 0xabcd with n fragments.

When I connect my RPi and a Laptop (receiver) to the same wired network and I set gst-launch-1.0 to stream to a wired network, I can send high quality video without any problem, so the problem is somewhere in the WiFi setup or within the thing I did not think of.

Any tips are going to be very appreciated as I have no idea what else I might try. I know that this works for people, so I don't know why it doesn't for me. I'm open to test any ideas.

Patched Nanopi neo2 Image

Hello,
you said that you have a patched nanopi neo2 kernel, Could you create and upload an image of it because I have difficulties with patching the Kernel for the Neo2?

That would be great :)
David

RTL8814 (AWUS1900) No link

The only two adapters I have are a TP-Link T4U (RTL8812AU) and an Alfa AWUS1900 (RTL8814AU). I am testing on two Raspberry Pi 3B's, both using @svpcom's https://github.com/svpcom/rtl8812au driver. I was getting "No link" in wfb-cli so I followed the troubleshooting steps with no luck. echo test | nc -u 127.0.0.1 5600 blocks on the transmitter, and tcpdump only seems to be picking up probe requests from nearby access points. I've tried both devices acting as transmitter and receiver, as well as both on the same machine and on different machines.

Do you have any additional steps I could try, or code modifications that might need to be done?

Ralink RT3572 support?

Im using two AWUS052NH v2 usb adapters but cant seem to get them to connect. I got the the tx, rx and keygen from the build ok and created the tx.key and rx.key and copied both to my desktop running ubuntu 16.04 and a RPI3. I have tried running tx and rx on both but never seem to get a connection. When they are connected with no video streaming should i still see text being passed from the command line?

iwconfig outputs this on both devices:
wlan1 IEEE 802.11abgn Mode:Monitor Frequency:5.745 GHz Tx-Power=30 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off

2 way communication

Hi! Is 2 way communication possible? I want to send MSP messages from the air to the ground and vice versa. Is that possible?
Also, what's the difference between Radio Port and UDP port?

security issue

The following warning points to a security issue with printf in linux. Google printf exploit for details.

wifibroadcast.hpp: In instantiation of ‘std::__cxx11::string string_format(const char*, Args ...) [with Args = {}; std::__cxx11::string = std::__cxx11::basic_string]’:
tx.cpp:137:68: required from here
wifibroadcast.hpp:46:27: warning: format not a string literal and no format arguments [-Wformat-security]
size_t size = snprintf(nullptr, 0, format, args ...) + 1; // Extra space fo
^
wifibroadcast.hpp:46:27: warning: format not a string literal and no format arguments [-Wformat-security]
wifibroadcast.hpp:48:13: warning: format not a string literal and no format arguments [-Wformat-security]
snprintf(buf.get(), size, format, args ...);
^
wifibroadcast.hpp:48:13: warning: format not a string literal and no format arguments [-Wformat-security]

Raspbian version

Hey svpcom, which version of rasbian should i use to apply patches/build the kernel?

Не приходят данные.

Привет.
Пытаюсь настроить передачу видео и телеметрии с одноплатного ПК на ноутбук с Ubuntu.
После установки по этому гайду не получаю данных.
$ wfb-cli gs показывает Connection failed.
После прочтения Troubleshooting попробовал использовать скрипты и обнаружил интересную деталь. При передаче с ноутбука данные передаются, echo test приходит. В обратную сторону не работает.
Думал что у меня что-то не так с портами, везде поменял 5600 на 5606, не помогло.

Вывод sudo scripts/rx_standalone.sh wlx30144a0024e0

Setting wlx30144a0024e0 to channel 9
wlx30144a0024e0 has DLT_IEEE802_11_RADIO Encap
8037130	PKT	0:0:0:0:0:0
8038132	PKT	0:0:0:0:0:0
8039132	PKT	0:0:0:0:0:0
8040134	PKT	0:0:0:0:0:0
8041135	PKT	0:0:0:0:0:0
8042136	PKT	0:0:0:0:0:0
8043138	PKT	0:0:0:0:0:0
8044139	PKT	0:0:0:0:0:0

Пакеты от echo test | nc -u 127.0.0.1 5606 не доходят.
$ tcpdump на стороне tx в момент отправки $ echo test выдаёт такое:

11:30:17.345399 [bit 15] 13:22:33:44:55:01 Unknown SSAP 0x84 > 13:22:33:44:55:01 802.1B I Supervisory, Reject, rcv seq 73, Flags [Final], length 73
11:30:17.345494 [bit 15] 13:22:33:44:55:01 > 13:22:33:44:55:01 Null Information, send seq 0, rcv seq 0, Flags [Command], length 32
	0x0000:  0100 0000 0000 0000 002c df6f b238 3c07  .........,.o.8<.
	0x0010:  eab8 4a18 901c d77a 5eea fe86 9dcb 43e5  ..J....z^.....C.

С обеих сторон в /etc/NetworkManager/NetworkManager.conf
tx:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[keyfile]
unmanaged-devices=interface-name:wlx30144a002943

rx:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

[keyfile]
unmanaged-devices=interface-name:wlx30144a0024e0

Вывод strace tx:

rock64@rock64:~$ ps uaxw | grep tx
root      3566  0.0  0.0   8148  3320 pts/1    S+   11:29   0:00 sudo scripts/tx_standalone.sh wlx30144a002943
root      3567  0.0  0.0   5924  2800 pts/1    S+   11:29   0:00 /bin/bash scripts/tx_standalone.sh wlx30144a002943
root      3622  0.0  0.0   7288  1452 pts/1    S+   11:29   0:00 ./wfb_tx -p 1 -u 5606 -K drone.key wlx30144a002943
rock64    4314  0.0  0.0   5524   564 pts/3    S+   11:49   0:00 grep tx
rock64@rock64:~$ sudo strace -ff -p 3622

strace: Process 3622 attached
ppoll([{fd=3, events=POLLIN}], 1, NULL, NULL, 0) = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "test\n", 1446, 0, NULL, NULL) = 5
sendto(4, "\0\0\r\0\0\200\10\0\10\0007\0\1\10\1\0\0\377\377\377\377\377\377\23\"3DU\1\23\"3"..., 110, 0, NULL, 0) = 110
sendto(4, "\0\0\r\0\0\200\10\0\10\0007\0\1\10\1\0\0\377\377\377\377\377\377\23\"3DU\1\23\"3"..., 69, 0, NULL, 0) = 69
recvfrom(3, 0x7ffda48ba8, 1446, 0, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
ppoll([{fd=3, events=POLLIN}], 1, NULL, NULL, 0

Что бы я не делал данные не доходят.
На tx стороне Rock64 Debian stretch
На rx ноутбук Ubuntu 18.4.2
С обеих сторон используется китайский адаптер на AR9271.

Кстати, при использовании wifibroadcast от befinitiv передача видео работает, что наталкивает меня на мысль что с железом проблем у меня нету.

Буду очень рад любой помощи.

Snow picture on new repo updates (SOLVED) bitrate issue

Not sure why i have rebuilt a few times now and I have connection and I can see video if i send to ip directly with gst-launch but using wfb i get connection but snowy picture. Ive tried multiple wifi channels with same result. Any insight?

large packet loss

Hi,

Your project seems really amazing! Great work! :)

I tried to use it but I'm facing some issues. When I tried to stream video, Video stream are totally corrupted (ex: almost all grey or Y data almost not existing, depending on the method use).

However, basic tests seems to work properly, I can send messages without issues between the drone and the GS. But when I tried to send large data it seems it is mostly lost, which could explain my issue. For instance I did a for loop to count till 1000000 on TX side, that I netcat to WFB, and I redirected the RX output to a file to count how many were recieved: I had almost 90% of the messages lost. I did similar tests with video files and had also big loss.

Do you have any idea on what could cause this issue?

I'm using raspberry pi 4 with TPLink w722n wifi adapter.

Thank you for all your work!

Possible to send Mavlink telem communication to RX with QGroundControl?

I am curious if it is possible to send mavlink from tx to rx into qgroundcontrol? I have everything up and running and I can see the ncurses telemerty screen and video screen and i do get video from my tx.

I am running Nvidia Jetson TX1 redtail project on my flight computer which sends mavlink also through port 14550 just curious if it is possible to send the uplink to rx with same protocol. Thanks in advance for any input or explanation on how to accomplish this with out wifi association.

Maybe I am missing something on tx end...

Why is there a need for the "TX rate lock" patch ?

I understand that in AP mode, the minstrel_ht (or the Atheros one) rate selection algorithm will change the rate/modulation dynamically based on the STA RSSI. But in monitor/injection mode, why should the rate change dynamically ? Shouldn't calling "iw dev wlan0 set bitrates... ht-mcs-5 ..." be enough to set the bitrates and MCS ? Also I have some difficulties finding out what the patch is really doing.

Different information about latency of UDP over WFB

Please let me know what information is correct?

  1. In the px4 documentation

The new version was rewritten to use UDP as data source and pack one source UDP packet into one radio packet. Radio packets now have variable size that depends on payload size. This significantly reduces a video latency.

  1. Or in this repo's wiki

For IPoverWB (IPv4 over Wifibroadcast tunnel) you need only tun/tap kernel driver (tun.ko). Tunnel will be configured and work out of box. Drone side will have 10.5.0.2/24 address and GS - 10.5.0.1/24. Please note that tunnel use less efficient coding rate (to minimize latency) than video and mavlink streams and use it only for low-bandwidth traffic (like ssh), not as general link for video and telemetry streams.

Maybe did you mean (in px4 documentation) that small UDP packages in summary takes less from common bandwidth and due to that video packages arrive faster?


And how it will be better to transmit large files (like 8MB JPEG images or 1GB video files) over WFB.

Thanks!

Some trouble setting up the system

Hello, I've read all the information I could find about setting up this project, and I have tried many times to set it up, from the prebuilt binaries, building them myself, but I am still doing something wrong, and I would really appreciate some help.

I am using 2 raspberry pi 3b hardware, with another pi for video encoding ( I plan to make some video processing on the encoding pi, that is why I separate them ). Those are the steps I am taking:

1-I take the /boot folder from ezwifibroadcast and merge it on to a fresh raspbian image. That should change the kernel with the appropriate drivers right?

2-I install the python stuff, and untar the prebuilt binaries as stated on the release notes.

3- Then I generate encryption keys on my desktop ubuntu, and I place them as acorded on HOW TO page on the wiki, on /etc/ of each rpi3

4-I create /etc/wifibroadcast.cfg on each rpi3, according to the HOW TO page of the wiki.

5-I run systemctl daemon-reload and start each module on each pi, and seems to be all right. I put on .bashrc the comands for starting the modules on both pi.

6-wfb-cli throws this:
Usage: /usr/bin/wfb-cli
I don't know if it seems right. This should throw debug information about the working state of the system right?

Maybe what I am missing is trivial but my knowledge on linux embedded is not as good as I would like it to be.

I wouldn't mind to write a step by step guide for beginners for setting up this system, and upload some ready to burn images. I could as well complete the documentation of the project, I just need a few hints on how to set it up.

Thank you very much in advance.

Best regards.

Other SOC compatability

Hey svpcom, hope all is well and your projects have been going well. Will your version of Wifibroadcast work with any other devices that raspberry pi? I am looking into something that has usb 3.0 like the beagleboard x15.

Thanks.

Difference between this implementation and Ez-wifibroadcast

Hello Developers,

Can you please tell me what is the difference between your version and Ez-wifibroadcast implementations?
I want to use for longer range and need encryption as well. As per my understanding Ez-wifibroadcast is widely tested for range of over 20 Kms? Can that be achieved with your implementation as well?

Please specify the differences between two implementations. It would be of great help. Thanks!

Porting to Hi3516/3518 IP Camera - is it possible ?

Hi svpcom,
is it possible to port your solution to HiSilicon Ethernet IP camera board ?

Typically it is Hi3516 / Hi3518 / XM530AI SoC single board cam, capable of H264 or H265 RTSP stream 1080p 25fps 2000...8000 kbps with 200ms latency on GStreamer, sample - https://yadi.sk/d/cq1j5vs-Bw3HKQ

Typical specs are :
Two core ARM Cortex A7 440 MHz,
64M DDR RAM,
8M flash for firmware image,
Ethernet, UART, USB 2.0, some GPIO, audio in/out
Linux (don't know version, sorry),
single app "Sofia" doing all the video related tasks, from image grabbinng to RTSP streaming.

Firmware supplied in very readable form (set of cramfs images wrapped into u-boot images ), look at the unpack/repack sequence - https://habr.com/ru/post/213411/

SDK and toolchain are available, here is the sample of custom firmwares with support for additional USB adapters too - https://zftlab.org/pages/2018010700.html

We discuss it for last couple of days on RCDesign - http://forum.rcdesign.ru/f90/thread515083-64.html , maybe you rejoin the thread ?

can't decrypt error

I was able to start the process but somehow RX reported error as:
...
379062 PKT 0:0:0:0:0:0
380063 PKT 0:0:0:0:0:0
381064 PKT 0:0:0:0:0:0
382065 PKT 0:0:0:0:0:0
unable to decrypt packet #0xd801
unable to decrypt packet #0xd802
unable to decrypt packet #0xd803
unable to decrypt packet #0xd804
unable to decrypt packet #0xd805
unable to decrypt packet #0xd806
383065 PKT 6:6:0:0:0:0
384067 PKT 0:0:0:0:0:0
385068 PKT 0:0:0:0:0:0
386069 PKT 0:0:0:0:0:0
387070 PKT 0:0:0:0:0:0
unable to decrypt packet #0x1c30a
unable to decrypt packet #0x1c30b
unable to decrypt packet #0x1c400
unable to decrypt packet #0x1c401
unable to decrypt packet #0x1c402
unable to decrypt packet #0x1c403
unable to decrypt packet #0x1c404
388070 PKT 7:7:0:0:0:0
389071 PKT 0:0:0:0:0:0
390073 PKT 0:0:0:0:0:0
391074 PKT 0:0:0:0:0:0
392075 PKT 0:0:0:0:0:0
393076 PKT 0:0:0:0:0:0
394077 PKT 0:0:0:0:0:0
395078 PKT 0:0:0:0:0:0
396079 PKT 0:0:0:0:0:0
...
I'm using the both keys generated on TX (copied gs.key from TX to RX)
So how can I debug for next step?

OSError: [Errno 8] Exec format error

Hello. I have some issues trying to run on Nanopi NEO2, on linux mint everything works perfectly, but when starting on Nanopi NEO2 I'm getting following errors:

Dec 17 17:42:36 NanoPi-NEO2 systemd[1]: Started WFB profile drone.
Dec 17 17:42:37 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:37+0000 [-] Log opened.
Dec 17 17:42:37 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:37+0000 [-] # iw reg set BO
Dec 17 17:42:37 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:37+0000 [-] # ifconfig wlan0 down
Dec 17 17:42:37 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:37+0000 [-] # iw dev wlan0 set monitor otherbss
Dec 17 17:42:37 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:37+0000 [-] # ifconfig wlan0 up
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] # iw dev wlan0 set channel 161 HT20
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Listen for telem stream 1(RX), 2(TX) on 0.0.0.0:14560
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] UDPProxyProtocol starting on 14560
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] UDPProxyProtocol starting on 14700
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] UDPProxyProtocol starting on 46656
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Telem RX: /usr/bin/wfb_rx -p 1 -u 14700 -K /etc/drone.key -k 1 -n 2 wlan0
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Telem TX: /usr/bin/wfb_tx -p 2 -u 14701 -K /etc/drone.key -B 20 -G long -S 1 -L 0 -M 1 -k 1 -n 2 wlan0
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Started telem rx
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Started telem tx
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Listen for video stream 3 on 0.0.0.0:5602
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Started video tx
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Video: /usr/bin/wfb_tx -p 3 -u 5602 -K /etc/drone.key -B 20 -G long -S 1 -L 0 -M 1 -k 8 -n 12 wlan0
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] UDPProxyProtocol starting on 14900
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] UDPProxyProtocol starting on 35328
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Tunnel RX: /usr/bin/wfb_rx -p 4 -u 14900 -K /etc/drone.key -k 1 -n 2 wlan0
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Tunnel TX: /usr/bin/wfb_tx -p 5 -u 14901 -K /etc/drone.key -B 20 -G long -S 1 -L 0 -M 1 -k 1 -n 2 wlan0
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Started tunnel rx
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Started tunnel tx
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem rx: Upon execvpe /usr/bin/wfb_rx ['/usr/bin/wfb_rx', '-p', '1', '-u', '14700', '-K', '/etc/drone.key', '-k', '1', '-n', '2', 'wlan0'] in environment id 6982432
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem rx: :Traceback (most recent call last):
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem rx:   File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 430, in _fork
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem rx:     environment)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem rx:   File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 508, in _execChild
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem rx:     os.execvpe(executable, args, environment)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem rx:   File "/usr/lib/python2.7/os.py", line 355, in execvpe
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem rx:     _execvpe(file, args, env)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem rx:   File "/usr/lib/python2.7/os.py", line 370, in _execvpe
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem rx:     func(file, *argrest)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem rx: OSError: [Errno 8] Exec format error
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem tx: Upon execvpe /usr/bin/wfb_tx ['/usr/bin/wfb_tx', '-p', '2', '-u', '14701', '-K', '/etc/drone.key', '-B', '20', '-G', 'long', '-S', '1', '-L', '0', '-M', '1', '-k', '1', '-n', '2', 'wlan0'] in environment id 6982432
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem tx: :Traceback (most recent call last):
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem tx:   File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 430, in _fork
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem tx:     environment)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem tx:   File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 508, in _execChild
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem tx:     os.execvpe(executable, args, environment)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem tx:   File "/usr/lib/python2.7/os.py", line 355, in execvpe
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem tx:     _execvpe(file, args, env)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem tx:   File "/usr/lib/python2.7/os.py", line 370, in _execvpe
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem tx:     func(file, *argrest)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] telem tx: OSError: [Errno 8] Exec format error
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] video tx: Upon execvpe /usr/bin/wfb_tx ['/usr/bin/wfb_tx', '-p', '3', '-u', '5602', '-K', '/etc/drone.key', '-B', '20', '-G', 'long', '-S', '1', '-L', '0', '-M', '1', '-k', '8', '-n', '12', 'wlan0'] in environment id 6982432
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] video tx: :Traceback (most recent call last):
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] video tx:   File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 430, in _fork
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] video tx:     environment)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] video tx:   File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 508, in _execChild
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] video tx:     os.execvpe(executable, args, environment)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] video tx:   File "/usr/lib/python2.7/os.py", line 355, in execvpe
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] video tx:     _execvpe(file, args, env)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] video tx:   File "/usr/lib/python2.7/os.py", line 370, in _execvpe
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] video tx:     func(file, *argrest)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] video tx: OSError: [Errno 8] Exec format error
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel rx: Upon execvpe /usr/bin/wfb_rx ['/usr/bin/wfb_rx', '-p', '4', '-u', '14900', '-K', '/etc/drone.key', '-k', '1', '-n', '2', 'wlan0'] in environment id 6982432
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel rx: :Traceback (most recent call last):
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel rx:   File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 430, in _fork
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel rx:     environment)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel rx:   File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 508, in _execChild
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel rx:     os.execvpe(executable, args, environment)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel rx:   File "/usr/lib/python2.7/os.py", line 355, in execvpe
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel rx:     _execvpe(file, args, env)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel rx:   File "/usr/lib/python2.7/os.py", line 370, in _execvpe
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel rx:     func(file, *argrest)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel rx: OSError: [Errno 8] Exec format error
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Stopped RX telem rx with code 1
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Stopping reactor due to fatal error: A process has ended with a probable error condition: process ended with exit code 1.
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Stopped TX telem tx with code 1
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Stopped TX video tx with code 1
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Stopped RX tunnel rx with code 1
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Unhandled error in Deferred:
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Unhandled Error
Dec 17 17:42:38 NanoPi-NEO2 python[12908]:         Traceback (most recent call last):
Dec 17 17:42:38 NanoPi-NEO2 python[12908]:         Failure: twisted.internet.error.ProcessTerminated: A process has ended with a probable error condition: process ended with exit code 1.
Dec 17 17:42:38 NanoPi-NEO2 python[12908]:         
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Unhandled error in Deferred:
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Unhandled Error
Dec 17 17:42:38 NanoPi-NEO2 python[12908]:         Traceback (most recent call last):
Dec 17 17:42:38 NanoPi-NEO2 python[12908]:         Failure: twisted.internet.error.ProcessTerminated: A process has ended with a probable error condition: process ended with exit code 1.
Dec 17 17:42:38 NanoPi-NEO2 python[12908]:         
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel tx: Upon execvpe /usr/bin/wfb_tx ['/usr/bin/wfb_tx', '-p', '5', '-u', '14901', '-K', '/etc/drone.key', '-B', '20', '-G', 'long', '-S', '1', '-L', '0', '-M', '1', '-k', '1', '-n', '2', 'wlan0'] in environment id 6982432
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel tx: :Traceback (most recent call last):
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel tx:   File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 430, in _fork
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel tx:     environment)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel tx:   File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py", line 508, in _execChild
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel tx:     os.execvpe(executable, args, environment)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel tx:   File "/usr/lib/python2.7/os.py", line 355, in execvpe
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel tx:     _execvpe(file, args, env)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel tx:   File "/usr/lib/python2.7/os.py", line 370, in _execvpe
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel tx:     func(file, *argrest)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] tunnel tx: OSError: [Errno 8] Exec format error
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] (UDP Port 14560 Closed)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] (UDP Port 14700 Closed)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] (UDP Port 46656 Closed)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] (UDP Port 14900 Closed)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] (UDP Port 35328 Closed)
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Stopped TX tunnel tx with code 1
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Unhandled error in Deferred:
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Unhandled Error
Dec 17 17:42:38 NanoPi-NEO2 python[12908]:         Traceback (most recent call last):
Dec 17 17:42:38 NanoPi-NEO2 python[12908]:         Failure: twisted.internet.error.ProcessTerminated: A process has ended with a probable error condition: process ended with exit code 1.
Dec 17 17:42:38 NanoPi-NEO2 python[12908]:         
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Main loop terminated.
Dec 17 17:42:38 NanoPi-NEO2 python[12908]: 2019-12-17 17:42:38+0000 [-] Exiting with code 1
Dec 17 17:42:38 NanoPi-NEO2 systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Dec 17 17:42:38 NanoPi-NEO2 systemd[1]: [email protected]: Unit entered failed state.
Dec 17 17:42:38 NanoPi-NEO2 systemd[1]: [email protected]: Failed with result 'exit-code'.
Dec 17 17:42:43 NanoPi-NEO2 systemd[1]: [email protected]: Service hold-off time over, scheduling restart.
Dec 17 17:42:43 NanoPi-NEO2 systemd[1]: Stopped WFB profile drone.
Dec 17 17:42:43 NanoPi-NEO2 systemd[1]: Started WFB profile drone.

Limit time packet is held for CCA?

Any way to limit the time the packet is held in the cards buffer as it waited for CCA?

I would like to be able to set an upper limit say of 100ms and if the frame cant be sent in that time then it should be dropped(sender side).

Im not 100% sure on how 802.11 deals with this but im sure that the card would drop packets if the buffer is full so maybe so maybe it can do it on a time limit.

I would rather drop the packet then have it come in late.

Comparison between projects

Dear Sirs,
I'm looking around for a way to transmit both video and RC Mavlink data over 2.4 Ghz, found many projects about this but cannot get a starting point:

From this document https://dronebridge.gitbook.io/docs/comparison they put comparison on:

svpcoms WifiBroadcast (basic TX-RX)
DroneBridge (system design with library)
OpenHD (follow-up on EZ-WifiBroadcast)
EZ-Wifibroadcast (not under development)

But looking at code the most updated seems that svpcoms WifiBroadcast and is able to manage both video and Mavlink.
Can please someone confirm that will run on a pizero please?

Support of BananaPi

I remember I saw you listed hardware comparison but I couldn't find it right now. The impression is that this project doesn't really care too much about computer hardware?

I was wondering if you could support BPI? You'll have some advanced/expensive choice regarding computing power which could be better fit when needed.

8812au driver

Either use EZWIFI's version .
Or change the platform setting in Makefile. Also, bc should be installed.

telemetry data not available

So now I have finished the testing with video and it works with manual debugging mode as well as daemon mode.
I moved to telemetry data. Notice I'm using 9271 cards and made necessary changes before I finally sold the 8821 cards.
Currently video works but wfb-cli gs shows no telemetry data. I'm wondering if it's the port setting somewhere is not correct. Pasted the log here and some help needed:

TX:
-- The start-up result is done.
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] Log opened.
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] # iw reg set BO
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] # ifconfig wlan1 down
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] # iw dev wlan1 set monitor otherbss
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] # ifconfig wlan1 up
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] # iw dev wlan1 set channel 6 HT20
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] Listen for telem stream 1(RX), 2(TX) on 0.0.0.0:14550
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] UDPProxyProtocol starting on 14550
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] UDPProxyProtocol starting on 14700
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] UDPProxyProtocol starting on 34531
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] Telem RX: /usr/bin/wfb_rx -p 1 -u 14700 -K /etc/drone.key wlan1
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] Telem TX: /usr/bin/wfb_tx -p 2 -u 14701 -K /etc/drone.key -B 20 -G long -S 1 -M 1
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] Started telem rx
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] Started telem tx
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] Listen for video stream 3 on 0.0.0.0:5600
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] Started video tx
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] Video: /usr/bin/wfb_tx -p 3 -u 5600 -K /etc/drone.key -B 20 -G long -S 1 -M 1 wla
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] telem tx: Listen on 14701 for wlan1
Jan 28 18:22:25 raspberrypi python[14687]: 2019-01-28 18:22:25+0800 [-] video tx: Listen on 5600 for wlan1
Jan 28 18:22:26 raspberrypi python[14687]: 2019-01-28 18:22:26+0800 [-] telem rx: wlan1 has DLT_IEEE802_11_RADIO Encap


TX Mavlink Router:
Open UDP [4] 127.0.0.1:14550
Open TCP [5] 0.0.0.0:5790 *


RX:
-- The start-up result is done.
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] Log opened.
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] # iw reg set BO
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] # ifconfig wlan1 down
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] # iw dev wlan1 set monitor otherbss
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] # ifconfig wlan1 up
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] # iw dev wlan1 set channel 6 HT20
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] Connect telem stream 2(RX), 1(TX) to 127.0.0.1:14550
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] UDPProxyProtocol starting on 54177
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] UDPProxyProtocol starting on 14600
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] UDPProxyProtocol starting on 35354
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] Telem RX: /usr/bin/wfb_rx -p 2 -u 14600 -K /etc/gs.key wlan1
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] Telem TX: /usr/bin/wfb_tx -p 1 -u 14601 -K /etc/gs.key -B 20 -G long -S 1 -M 1 wlan1
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] AntennaFactory starting on 8001
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] Started telem rx
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] Started telem tx
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] Send video stream 3 to 127.0.0.1:5600
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] AntennaFactory starting on 8002
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] Started video rx
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] Video: /usr/bin/wfb_rx -p 3 -c 127.0.0.1 -u 5600 -K /etc/gs.key wlan1
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] telem tx: Listen on 14601 for wlan1
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] video rx: wlan1 has DLT_IEEE802_11_RADIO Encap
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] video rx: unable to decrypt packet #0x7b00
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] video rx: unable to decrypt packet #0x7b01
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] video rx: unable to decrypt packet #0x7b02
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] telem rx: wlan1 has DLT_IEEE802_11_RADIO Encap
Jan 28 18:22:42 raspberrypi python[23438]: 2019-01-28 18:22:42+0800 [-] video rx: unable to decrypt packet #0x7b03


RX wfb-cli:
──[video]─────────────────────────────────────────────────────────────────────┐
│NO TX │
│RX PKT: recv 187015 d_ok 186988 fec_r 5460 lost 1028 d_err 27 bad 0 │
│RX PKT/s: recv 87 d_ok 87 fec_r 6 lost 0 d_err 0 bad 0 │
│ │
│0000: 86 pkt/s, rssi -38 < -36 < -35 │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
┌──[telem]─────────────────────────────────────────────────────────────────────┐
│TX ANT 00** │
│RX PKT: recv 0 d_ok 0 fec_r 0 lost 0 d_err 0 bad 0 │
│RX PKT/s: recv 0 d_ok 0 fec_r 0 lost 0 d_err 0 bad 0 │
│ │
│Link lost!

Any idea which setting is wrong?

There's no data in RX computer

Hello everyone,

I'm developing a drone and i'm working on image transmission. I'm trying to solve this problem using the wifibroadcast, as recommended by PX4 Developer Guide. However, the PX4 Wifibroadcast Tutorial is not much understandable in my opinion and I have some doubts.

On TX I did the following steps:

$ gst-launch-1.0 uvch264src device=/dev/video0 initial-bitrate=6000000 average-bitrate=6000000 iframe-period=1000 name=src auto-start=true \ src.vidsrc ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! rtph264pay ! udpsink host=localhost port=5600
$ git clone https://github.com/svpcom/wifibroadcast
$ cd wifibroadcast
$ make
$ ./keygen
##Then, i copied the rx.key file to the RX computer
$ sudo ./scripts/tx_standalone.sh wlx00c0ca4aaeec  # where wlx00c0ca4aaeec is your WiFi TX interface

The output on TX is:

Setting wlx00c0ca4aaeec to channel 6

On RX I did the following steps:

$ git clone https://github.com/svpcom/wifibroadcast
$ cd wifibroadcast
$ make
##I pasted here the rx.key generated on UAV computer
$ sudo ./scripts/rx_standalone.sh wlx803f5d2217c9  # where wlx803f5d2217c9 is your WiFi TX interface

The output on RX is:

Setting wlx803f5d2217c9 to channel 6
wlx803f5d2217c9 has DLT_IEEE802_11_RADIO Encap
17753362 PKT 0:0:0:0:0:0
17754363 PKT 0:0:0:0:0:0
17755364 PKT 0:0:0:0:0:0
17756365 PKT 0:0:0:0:0:0
17757366 PKT 0:0:0:0:0:0
17758367 PKT 0:0:0:0:0:0
17759368 PKT 0:0:0:0:0:0
17760369 PKT 0:0:0:0:0:0
17761370 PKT 0:0:0:0:0:0
17762371 PKT 0:0:0:0:0:0
17763372 PKT 0:0:0:0:0:0
17764373 PKT 0:0:0:0:0:0
17765374 PKT 0:0:0:0:0:0
17766375 PKT 0:0:0:0:0:0
17767376 PKT 0:0:0:0:0:0 (...)

Finally, due to the RX output I suppose i'm not receiving data from UAV. Could you explain me how I must proceed in order to solve this? The PX4 Developer Guide was not enough didactic for me.

The Hardware Setup is:

On TX:

  • Alfa AWUSO36NH (2.4Ghz) - Note: in both scripts (rx_standalone and tx_standalone) I changed the band option: 5G to 2G
  • Logitech C920 Camera
  • Dragonboard 410c (UAV computer) (Debian 10.5)

On RX:

  • Norion Wirelles N (2.4GHz)
  • Computer running Ubuntu 16.04

If there's missing information, please tell me.
Thanks for the help!

Reference: https://dev.px4.io/en/qgc/video_streaming_wifi_broadcast.html

More details on IPoverWB (IPv4 over Wifibroadcast tunnel)?

Hi @svpcom ,

I'm confused on how to setup IPoverWB mentioned at the end of the Setup HOWTO wiki page. After doing some research, I'm still confused on how to setup and install a tun/tap kernel driver for Ubuntu. I understand what a tun/tap kernel driver does in theory, but how to install and use it in this application is still unclear. Do you have some references you could point me to? Or, perhaps, a list of commands to run? If I'm able to set it up, I'll try to contribute to the wiki a more detailed guide on setting it up.

Thanks,

Milan

Failed to build wifibroadcast-18.12

pi@raspberrypi:~/wifibroadcast $ make
PYTHONPATH=`pwd` trial telemetry.tests
telemetry
  tests
    test_proxy ...                                                      [ERROR]

===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/trial/runner.py", line 498, in loadPackage
    module = modinfo.load()
  File "/usr/lib/python2.7/dist-packages/twisted/python/modules.py", line 383, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/usr/lib/python2.7/dist-packages/twisted/python/reflect.py", line 303, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/usr/lib/python2.7/dist-packages/twisted/python/reflect.py", line 250, in _importAndCheckStack
    reraise(excValue, excTraceback)
  File "/home/pi/wifibroadcast/telemetry/tests/test_proxy.py", line 8, in <module>
    from telemetry.proxy import UDPProxyProtocol
  File "/home/pi/wifibroadcast/telemetry/proxy.py", line 21, in <module>
    import mavlink
  File "/home/pi/wifibroadcast/telemetry/mavlink.py", line 9, in <module>
    from builtins import range
exceptions.ImportError: No module named builtins

telemetry.tests.test_proxy
-------------------------------------------------------------------------------
Ran 1 tests in 0.023s

FAILED (errors=1)
Makefile:43: recipe for target 'test' failed
make: *** [test] Error 1

I am new to python, so I don’t know what to do with it.
C ++ part of the project is building fine.

distributed operations

How to implement distributed operation, what is the module “wifibroadcast_agg” in the figure? There are no more detailed documentation. thank you for your reply!

android support possible (cmake/cross-compile)

Just wondering if you have ever tried to build wifibroadcast/libsodium/libpcap for running inside android with iw and iwconfig.

Seems this would be possible running QgroundControl and udp video on android device. Probably no python so no telem but video should be feasible.

Collect video from different hosts.

Dear Sirs. In main features you mentioned "Distributed operation. It can gather data from cards on different hosts"
We working on video translation for orienteering project. And we are looking for solution which will make possible gathering one video stream from more then one RX host.
We need it because some times forest is not radio transparent. Our idea is to create wired network of controller on some area where operator can move. So we need some re-transmitter from WiFi to wired network and then some kind
RX program which will get data from wired interface and give us picture (or RTP ...)
Is "Distributed operation" is feature we need? And if it is how we can configure it.

Best Regards.
Denis
P.S. I already try classic wifibroadcasting and re-transmitter using tcpdump ->netcat ->netcat -> tcpreplay
I can't say it doesn't work at all but I'v got lot of artifacts and some time stream fail. Seems that tcpreplay take to much processor time.

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.