Can't figure out transmission problems (WiFi) #101
Replies: 29 comments
-
Receiver:
First try it without WFB, then change udp port (it use 5602 by default) to fit to your wifibroadcast settings. |
Beta Was this translation helpful? Give feedback.
-
I set up latest WFB following:
I did not configure mavlink (at least for now, for now I'm trying to get video stream working) I set both rx and tx in a suggested way. Before I've been using developement compilation ( IP tunnel works - I can ping tx from rx, ~20ms and there are no dropped packets (at least I haven't seen any). Because I'm on RPi (tx side), there are no
I used:
When I go pretty low with transmission bandwidth, like:
so with default small test image and 100kbps of stream, I can see color pattern but it turns gray as well, FPS is better but even under those conditions still well below expected one. There's also delay, so all that suggests some issues with bandwidth. I also tried to stream A video from RPi camera:
And sadly it looks exactly the same as before. Any additional ideas what I might check? I also think I found a bug (should I fill an issue?) - ON my laptop with Ubuntu 18.04 LTS installed, when I ran |
Beta Was this translation helpful? Give feedback.
-
Run wfb-cli on the laptop (rx side). What packet rate and loss it reported? |
Beta Was this translation helpful? Give feedback.
-
I'm having the same issue, running a very similar setup. I set both rx and tx in a suggested way. I've tried streaming video over LAN and I can get good video, but over WFB I'm getting a lot of gray and noise, <2 FPS most of the time, and very delayed. Laptop running Ubuntu 18.04 LTS, Raspberry Pi 3, 2x Alfa AWUS036NHA. |
Beta Was this translation helpful? Give feedback.
-
@svpcom Since you asked, here is a pretty good sample of the packet rate and loss reported: |
Beta Was this translation helpful? Give feedback.
-
@daniel-kukiela Just noticed this guy seems to be having a similar problem, if you haven't seen this already: #47 |
Beta Was this translation helpful? Give feedback.
-
@Mysnomer0 First of all try without RPI - i.e. connect both wifi adapters to PC or laptop. And try with debug video stream (using gst-launch videotestsrc ...) |
Beta Was this translation helpful? Give feedback.
-
@Mysnomer0 I haven't and I did not solve my problem yet. I had to put it on-hold for a while, but I'm going to look at that again soon. Thank you. |
Beta Was this translation helpful? Give feedback.
-
@svpcom Will do, thanks for the advice. @daniel-kukiela No problem. I tried turning down the bitrate to 200000, fps to 30, and increasing the bandwidth from 20 to 40 mhz on the video stream, and I managed to get some acceptable video with color and little delay. |
Beta Was this translation helpful? Give feedback.
-
I'm just tweaking my 2.4GHz setup too. |
Beta Was this translation helpful? Give feedback.
-
Try to increase "mcs_index". It is 1 by default which give you ~6mbit/s. It your radio channel is busy (which is true for 2.4 ghz band in urban area) you will get less bandwidth due to collisions. |
Beta Was this translation helpful? Give feedback.
-
You're right, i've acheived the best results turning off my (2.4ghz) wifi home network. |
Beta Was this translation helpful? Give feedback.
-
No, you can use
|
Beta Was this translation helpful? Give feedback.
-
Ok many thanks! I've already read this in the Wiki, but i've never try It. I'll give It a try 👍👍 |
Beta Was this translation helpful? Give feedback.
-
Thanks for the info, that would explain a few things. I've been doing my testing right next to my home router also on 2.4ghz. :) |
Beta Was this translation helpful? Give feedback.
-
Last night i've spent a copule of hours intesting and tweaking following svpcom suggestions. Tx string: At the end of those tests, i've reached a maximum video_bitrate=550000 which gives me, looking at the system monitor, 100KB/s. One last stange think to mention: during my tests, tweaking the bitrate and the parameters, looking at the system monitor for a precise data about the network speed i have noticed a sort of strong cut, a limit at 124KB/s. |
Beta Was this translation helpful? Give feedback.
-
Fascinating, thanks for sharing your work! For practical uses on a drone with this kind of setup, I've been trying to answer the question of 2.4ghz or 5.8ghz, and what you've shared is very helpful. I'd love to hear what svpcoms has to say about the possible bitrate limit you've observed. |
Beta Was this translation helpful? Give feedback.
-
@Mysnomer0 many thanks!! |
Beta Was this translation helpful? Give feedback.
-
Right, there are a lot of factors. Not too concerned about interferences with RC radio, I'll either run my 900 mhz Crossfire or have the RC control sent via the wifibroadcast datalink. With the right antennas, I can get 5.8ghz to do the range, but it just isn't as robust of a link being higher frequency. Then again, 3x the bandwidth would make for some pretty nice video... No, I haven't observed that limit, but then again, I wasn't really looking. I've tried the EZ-OSD on the same hardware and got very similar video results, if that helps. I'll let you know if I do see it in my further testing. |
Beta Was this translation helpful? Give feedback.
-
Hi. Using a raspberry pi 3b on tx side and have the same problem. Cant use higher bitrate than ~500 000 before picture gets gray. The video stream works with higher bitrate for the first 2 seconds of the stream though it seems. As I understand it @svpcom is using a nanopi to actually run wfb, so I am thinking if maybe it could be the memory bandwidth or something like that could be the bottle neck. If it isnt memory bandwidth or some code bug and @svpcom can run it fine on his setup with a bitrate of 4000 000 without problem I'm kinda clueless. Would very much appreciate some insight from @svpcom. |
Beta Was this translation helpful? Give feedback.
-
@Launchpad-McQ What wifi card and driver do you use? |
Beta Was this translation helpful? Give feedback.
-
Hi. I'm using TL-WN722N on both rx and tx. Ive used these very wifi cards with the befinitiv wifibroadcast a while back. I have new os installations on both rx and tx so I dont know if the driver are the same used back then. I found on the manual setup guide by befinitiv (https://befinitiv.wordpress.com/wifibroadcast-analog-like-transmission-of-live-video-data/wifibroadcast-fpv-manual-setup/) how to patch the firmware. Will give it a try and get back to you. Thank you for your reply :) |
Beta Was this translation helpful? Give feedback.
-
Hi, I also have a testing setup with 2 AWUS036NHA (i.e. AR9271) and investigated low bandwith problems. The issue is, that AR9271 (or any driver module of the kernel or the device firmware itself) does obviously not support to set the mcs index via the radiotap header. This is why changing the mcs_index in the configuration (or setting it directly via the -M switch of wfb_tx) does not have any effect. You always stick to mcs index 0 (1MBit). As much as I found out, it is also not possible, to set the bitrate somehow else when the device is in monitoring mode (iw iwconfig, etc). One more note for AWUS036NHA: I found out, that the transimission has much less packet losses and fec corrections (in fact nearly none at all) if you remove the antenna from the receiver side device (at least for my indoor low-distance tests). I guess that (maybe) the signal is too strong and causes distortions on the receiver side on very low distance!? |
Beta Was this translation helpful? Give feedback.
-
@pasdVn Settings mcs index via radiotap header is in kernel since early 4.x.x. (i need patches only for old 3.x.x kernels). I've test it with rt2x00 (ralink card) which has driver inside of mainline kernel. What kernel version do you have? But maybe injection in ath9k is broken - I don't use these card in my setup. My primary cards now are rtl8812au and previous were rt2x00. Yes. It is known issue for rtl8812au - you need to reduce tx power (via driver patch or via |
Beta Was this translation helpful? Give feedback.
-
Yes - I think this is just an issue with ath9k (kernel modules or the device firmware). |
Beta Was this translation helpful? Give feedback.
-
Try ath9k patches from here: https://github.com/rodizio1/EZ-WifiBroadcast/tree/develop/kernel |
Beta Was this translation helpful? Give feedback.
-
Already had a look at those patches. I think, that they do not address this issue. From what I see the firmware patch is just as mentioned above, and the kernel patches are the modifications for allowing 2,3GHz, and 30dbm, as well as some kernel parameters to ard override some settings in at9k (e.g. setting the txpower, which indedd would be interesting). Btw.: Is there some way to hack wfb_rx code a bit, to dump out the mcs indexed of a received packet? |
Beta Was this translation helpful? Give feedback.
-
The easiest way is to run wireshark or tcpdump in parallel to wfb_rx. It shows mcs index for captured packets |
Beta Was this translation helpful? Give feedback.
-
Ah great, thank you! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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:
iw dev wlan0 set bitrates legacy-2.4 18
EZ-WifiBroadcast
's image and settingwifibroadcast
up there as it includes various patches and things (no luck here as well)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.
Beta Was this translation helpful? Give feedback.
All reactions