In case you are creating a thread about an issue it is necessary to provide following information to get help:
- Image and ArduPilot version.
- Detailed problem description. How does observed behavior differ from the expected one?
- Your step by step actions.
- Picture of the setup and connection scheme.
- If using any additional hardware please provide exact make and model.
I am using Navio2 and my image version is Linux navio 4.19.83-emlid-v7+ #1 SMP PREEMPT Thu Nov 28 12:44:40 MSK 2019 armv7l and I am using ArduCopter V3.6
Sorry for resurrecting an old topic but I am interested in making Wifibroadcast work on Raspberry Pi (companion of Navio2) running the Ardupilot. I followed the most recent instructions I could find on this topic provided at this link https://github.com/svpcom/wifibroadcast/wiki/Navio2-Setup to setup Wifibroadcast on the drone Raspberry Pi and on a laptop running Ubuntu 16.04 working as a ground station.
My Setup and issue:
- I am using AWUS036NHA wireless adapter (with Atheros AR9271 chipset) on both TX and RX side.
- On TX side I am providing 5V, 2A power from a separate source to AWUS036NHA wireless adapter. On RX side I am simply plugging the wireless adapter into an USB port on my laptop
- I am running Raspberry Pi Camera using
raspivid --nopreview --awb auto -ih -t 0 -w 640 -h 360 -fps 49 -b 4000000 -g 147 -pf high -o - | gst-launch-1.0 fdsrc ! h264parse ! rtph264pay ! udpsink host=127.0.0.1 port=5602
- I am receiving video on my ground station using
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
- On my laptop running Ubuntu I see a window pop up with grey background at first and a timer at bottom left which runs smoothly in the beginning, then the image shows up but gets stuck and unstucks every few seconds and repeats (timer gets stuck and unstuck along with the video). When it is not stuck I don’t see a huge amount of lag in the video.
What I have tried so far:
- I tried all the troubleshooting tips provided for a similar project at https://github.com/rodizio1/EZ-WifiBroadcast/wiki/Known-Issues but no luck.
- I reduced the bit rate and fps of the Raspberry Pi camera, no luck.
- I checked the CPU usage during video streaming but nothing unusual there.
- I have my RC turned off during these tests.
- I have my Raspberry Pi Camera inside a 3D printed box with copper tape around it for EMI shielding.
Only thing that comes to my mind is that the power I am providing to the TX wireless adapter is not enough. However, there might be other issues or gaps in my process that might be causing the issue. I would really appreciate if anyone has any suggestions on how to fix this. I would really hate to have to attach a second Raspberry Pi on my drone to stream video.
Edit: In case anyone stumbles on upon the same problem I was finally able to get decent video by
- Bumping the power source from 5V, 2A to 5V, 4A.
- Using 400,000 and 60 for bitrate and fps value for Raspberry Pi camera.
- In /etc/wifibroadcast.cfg adding these values to
short_gi = True # use short GI or not
stbc = 3 # stbc streams: 1, 2, 3 or 0 if unused
ldpc = 0
mcs_index = 23 # mcs index
It seems TX side doesn't have enough throughput to transmit video at a higher bit rate. May be using 5.8GHz system will improve the performance