Wifibroadcast on Android SBS

Hi all,

I am super late to the party but I have been tracking the wifibroadcast stuff for about a year trying to get a FPV setup using google daydream. It has been a rough journey, but in the end it comes down to some pretty simple steps IF your phone is supported by Nethunter. If its not, you have to custom build a kernel and get firmware loaded which is a massive pain.

Easy way (I have a Nexus6P):

  1. Install Nethunter on your phone/tablet. It actually acts like a giant patch, so in theory you can slap it on top of what you are running right now. That being said - you always have the chance of blowing away all your data, so, be careful.

https://www.offensive-security.com/kali-linux-nethunter-download/

  1. Build a linux box on your Android device. I use linuxdeploy, but there are a lot of options.
  1. Download the necessary things inside the linux box to build wifibroadcast and use basic net tools:

usbutils
net-tools
gcc
make
iw
wireshark
socat

  1. Pull down wifibroadcast and build it. @emlid Do you guys have a repo somewhere that is getting updated? I am currently using mine:
  1. Do a simple rx -> socat handoff inside the linux box on the android and pipe the data to the port you want:

sudo ./rx -b 8 -r 4 -f 1024 ${CARD} | socat -b 1024 - udp4-datagram:127.0.0.1:5000

  1. Back in normal android land, build and run an app to display the h264 stream. I am forked from constantins:
  1. Fly!

OK - now the hard way, which is semi incomplete: try and follow my blog post. Essentially you have to build a custom kernel, which requires the full AOSP project (60+gigs) and its VERY easy to build a phone that crashes. often.

Here’s the Linux kernel that is in use. We’ve tried to split the big kernel patch in pieces before applying.

And here are the scripts.

Take a look at this. You’ll barely learn anything new, though. But it’d be awesome to collaborate rather than going different directions.

Sweet! I made some mods to the rx status piece that automatically calculates bandwidth. Since it doesnt know the block size (and I havent put a lot of effort into finding it) it is currently some hardcoded math, but it does give you an easy number to compare. Ill pull down your copy and use it from now on (there are too many copies of befinitiv’s code).

That being said - have you guys been able to get 24Mbit out of your current setup? I was getting ~10Mbit and it wouldnt go any higher. I see the mcs3 firmware is being used, but something is acting weird. I am using a AWUS036NHA for tx and rx. Rx is being done on android, but I dont think that should effect the rate.

I was able to build your kernel but I ran into RCIO kernel header mismatch issues trying to load it into the newest image you guys have. Do you have any tips?

Thanks for the reply!

Chris

Could you please elaborate on this one? What kind of errors did you run into? Unfortunately, if you use a custom kernel you’ll need custom headers or kernel source.

That makes sense, I just need to dive in a little bit more. I am on travel all week and havent been around my quad. When I get back to it I will look at what I had done previously and what wasnt working.

Do you have any ideas on the bandwidth problem? Were you guys able to see 24MBit bandwidth with the stock image on an Alfa NHA?

Did you try using the 5Ghz preset? I noticed significantly better results with these Wi-Fi dongles whilst running them on 5Ghz but unfortunately I haven’t used bandwidth benchmarks. How did you test your setup?

I dont have any 5ghz cards right now, and I was hoping to keep my setup with the ATH_9K opensource firmware since we could change a lot around in the future.

I added a line that calculates bandwidth based on blocks received and block size in rx_status_test. It looks like your version is a little newer than mine, but I can add that line in with the understanding that changing block size (currently using 512 instead of 1024) changes your bandwidth calc. Ill put it in a #define at the top.

I also have several scripts that kick off rpi camera -> wbctx and wbcrx -> socat (udp passthrough). Are you guys interested in those?