Skip to content

Wifibroadcast RPI FPV image v0.4

December 31, 2015

I have a small timeslot until my new year’s eve party begins so I thought I could use it to upload the newest Wifibroadcast RPI FPV image: https://github.com/befinitiv/rpi_wifibroadcast_image_builder/releases/tag/v0.4.

The changes are:

  • Merged TX and RX images. You can write this image file onto the SD cards for both RX and TX Raspberries. The devices change their roles accordingly depending on whether a camera is connected or not. In short: Raspberry with camera behaves like a TX device, Raspberry without camera behaves like a RX device.
  • Removed message floodย of TX to systemd journal to avoid growth of log files. This allows for long running TX devices.

 

The most important change is point 1: This means for you that you only have to download one image instead of two. Also, there is no need to mark the SD cards with TX and RX since they are all the same. This makes things much easier.

I wish you a happy new year! Hopefully with lots of HD FPV fun ๐Ÿ™‚

 

Advertisements

From → Uncategorized

68 Comments
  1. Pete permalink

    Happy New Year. Thank you for all your hard work on this project. Really like the idea of a single image to make it all run from and auto sense whats connected in order for it to run.

    Is there a list of commands to change stuff, I’ve no idea what commands do what.

    Also on how to make any changes, if this is connected via an ethernet to the route/switch can I then access it via SSH and make changes?

    Just downloading the new image and will try it asap. I’ve my test rig ready, just need the weather now

  2. Pete permalink

    Download speed still sucks and I’ve a 10GB connection.

    Nice only to have use one image for both Pi. Installed and working. I’d say it boots faster.

    Will try it out in day light. Need 2 UBEC’s to get this airborne and testing.

  3. musicman permalink

    Excellent project!! I have read through a good bit of the blog posts as well as some material on DIYDRONES (where I found the link). I have a spare model B (soon to be two!) and am exited to try this out. Couple questions:

    1. Is the latest build image designed for permanent headless use (i.e. for TX once operating, do I need to worry about graceful shutdown)?

    2. Any recommendations for a 5GHz card with external antenna connection in the USA (CSL300 not available here)?

    3. I already have a Microsoft webcam, and was considering the Logitech C920 (onboard h264 encoding). Any latency penalties using one of these cameras vice a RPI camera module?

    4. Has MAVLINK been added to the main branch or do I still need to follow DAGA’s instructions on the telemetry page?

    5. Are there any complications for using a laptop as the RX (for groundstation) assuming USB wifi cards and manual setup?

    • Hi musicman

      Thanks! I’ll answer your questions directly:

      1. Yes, the TX should be ok with cutting the power. I do it all the time and never had a corrupted SD card. I also use it headless. I just connect power and after a brief delay it starts transmitting automatically.

      2. An alternative might be the AWUS036NH. This card seems to work fine as a TX and it should also be ok for RX. But I have never tested it this way around. Another alternative would be to modify the WND3200 and solder an external antenna jack onto it. I saw some people doing this successfully.

      3. Using a standard webcam would only allow small resolutions since the USB speed is a limiting factor. But I did not yet test this. I once had a C920 to test on my bench and was quite disappointed with its latency. It was approximately around 300ms on my PC. Ok for Skype but not for FPV.
      4. I have not worked on Mavlink support. So the answer is no. But you could check out the alternative OSD projects (see the external links on the wifibroadcast page).
      5. Yes, absolutely destructive complications: The screensaver ๐Ÿ™‚ But other than that a Linux PC works very well. However, all the OSDs I’ve seen so far do only work on Raspberries.

      • musicman permalink

        Thanks for the super quick feedback!

        1. Yeah, I’ve had the same experience running RaspBMC. I found a power switch guide online that should work as I don’t want any unhappy surprises (corrupted cards) at the flying field:

        http://www.instructables.com/id/Simple-Raspberry-Pi-Shutdown-Button/?ALLSTEPS

        2. Darn, I was hoping for something cheaper… I just ordered some 722s to play with for now, but for use in flight I’ll need to either change RC to 433 or the WIFI link to 5.8 or even 900mhz.

        3. Thanks for the advice. Ordered a OV5427 CSI board camera.

        4&5. I poked around and it looks like it is possible to install APM Planner on Linux, which should be able to handle the OSD functionality once I get the MAVLINK data pipeline working. I’ll take a look at DAGA’s guide that I mentioned earlier…

        The next trick would be to get bidirectional linkages working via this link. Then I’d have a simpler GCS setup than I do now (glitchy USB vid capture, 5.8 analog vRX, and 900mhz telemetry), operating on fewer frequencies! I’ll have to dig into your code and 3DR’s DroneKIT as well.

  4. Hello, I am making a very tiny robot, so I was using a nano factor usb wifi dongle, “Wireless N USB Adapter EP-N8531” which is said to have Rtl8188 chipset. When I prepared the system following instructions, I get some errors recurringly:

    “unknown wifi driver on wlan0: rtl8192cu” – and wbctx will restart.

    now I understand this chipset might not support the injection mode – so my question is:

    is there any nano sized usb wifi dongle, that will work with wbctxd – I understand having no external antenna is not a desired thing with this system, but I will be using it for short ranges.

    best regards,
    c.

    • Hi

      You can check wikidevi.com to find wifi sticks that use the supported chips but have a smaller size.

  5. Prossal permalink

    Hi Befinitiv,
    Great job so far on the project, you really have come a long way!
    I have a question about implementation of the system for a cinematographers setup.
    Would it be possible to receive the stream on the raspberry pi and have the pilot view the image directly on a attached monitor (low latency), while the rest of the crew can watch the stream via VNC on for example an Ipad, that is connected to the Pi via a (normal) WiFi network that the Pi hosts using a second WiFi dongle and hostapd etc.?
    I know that if this is possible, the extra WiFi, VNC protocol and processing will add delay, but this is not a huge problem for me.
    Some resources for the access point and VNC stuff are here:
    https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/overview
    https://www.raspberrypi.org/documentation/remote-access/vnc/

    Hope you see the same potential for a system like this as me!
    With regards, prossal

    • Hi Prossal

      This would be possible. You could for example convert the stream on the receiving raspberry into a standard protocol like RTSP and use already existing apps to display it on a mobile device. The issue with VNC will most likely be that it requires a lot of processing power and also degrades the video quality.

  6. Thanks for setting this up, I’m running into issues with one of my alfa’s but have ordered another hopefully I will get it going. Someone uploaded a case on thingiverse for the Raspberry and an alfa bare board it looks pretty neat.
    I found this banana pro computer board, it has wireless built in! on amazon unfortunately it doesn’t seem like the wireless chip can do monitor mode otherwise it would’ve been perfect!

    http://www.amazon.com/Banana-Pi–Banana-Mainboard-Cortex-A7-Dual-core/dp/B00RD86QPA/ref=sr_1_2?ie=UTF8&qid=1452569431&sr=8-2&keywords=Banana+pro

  7. Dylan permalink

    This is a really cool project! Thanks for posting so much information about it! I have ordered a couple of TP-LINK TL-WN722N dongles and I already have a couple of RPi’s and a RPi camera so I will be giving it a shot.

    Even though I am going to try the RPi version first, I can’t help but fantasize about a different way of doing it, specifically on the transmitter side. I have an old Galaxy S2 phone and I found somewhere that I can put linux on it. I also found somewhere that somebody made an android driver for the broadcom BCM4330 wifi chip that this phone has to put it in monitor mode, so I assume it would somehow be possible to do that linux also.

    So my question is, will any WIFI chipset that supports monitor mode work for wifi broadcast or does your software require the ATHEROS AR9172 chipset specifically?

    Do you think it would be possible for me, who admittedly isn’t a programmer, to somehow set my S2 up as a transmitter either in linux or android using the built in camera, video encoder and/or wifi card?

    • Chris permalink

      Hey, if you want to use the phone as TX it requires adjusted code. I see huge potential, especially thinking of cheap chinese phones (like Xiaomi). It would be very interesting to see how much delay it would erase. I did some short testing, my internal camera + encoding seems faster using media codec. I got around 30ms cam->written frame on storage! Phone is Redmi Note 2.
      Imagine we could save 5-10ms on RX side aswell.. Might get the whole setup below 100ms ^-^

      • Hi Chris

        That sounds great! Would you share the code of that? I would be interested to test that as well.

      • Chris permalink

        Hey,
        I would love to share.. but I used bigvencoder which is closed source ๐Ÿ˜ฆ

    • There are many boards that can run Linux. However, there are not so many that can encode video as h264. And my guess would be that on the Linux for the S2 there would be a lot of work to do to use the video compression. If you try it please post back here your results. Thanks!

  8. @befinitiv: great project. Thank’s and greetings from Transylvania.
    I use this setup on my 250 class quad, with a A+ on TX with a 722, and a pi2 with a 722 on the RX (and or a Macbook Pro running Ubuntu). Everything is working great. I want to get the OSD working, but I have a question.
    What kind of message can / should I transmit (TX->RX)? Do you know what is the message?

    I would like to send the data from an Arduino, towards the rPi, but I need to know what kind of message to create before sending it through serial to the Pi. As of now I have an Arduino that is monitoring my battery, and flashes the led’s from the quad according to the battery state, but it would be very easy to modify the code to send this info (battery state), and other in, like temperatures, etc…Arduino -> Serial -> rPi -> Wifibroadcast TX ———-> Wifibroadcast RX -> HDMI + OSD

    one more thing.
    How could I save the stream I get on my Ubuntu machine?

  9. Tom on Cincinnati permalink

    I have set up a Naze32 with gps for OSD. It is connected to pin 10 of the gpio.
    Running version .4 how do I enable the telemetry on the transmitter ?
    Hooking the Naze32 to pin 10 & 9 (gnd) seems to lock up the board.
    The receiver displays all zeros except for the signal strength.

    • Hi Tom

      A bit late so you might have already figured it out. My images have only enabled the OSD on the RX side so the user gets the RSSI values displayed. The TX side is disabled because it depends a lot on the actual quad you use the system on (what kind of telemetry protocol it provides, to which pin it is connected). Therefore, you have to configure this by hand.

      For using the RPI UART you need to disable the console of that port.

  10. Thor permalink

    Hi there!
    I am experimenting with wifibroadcast for some time now and I am realy impressed! Currently I am using a C920 as capture device. The lag is noticeable longer but that seems not to be the cameras fault because using gstreamer launcher the lag of the pi cam is about the same. Unfortunately I am not that experienced with V4L coding but I think some latency could be eliminated there.

    Further more I would like to know what would be needed to get wifibroadcast tx on an intel edison. I noticed several apparently successful attempts to use the C920 with an edison. Getting wifibroadcast to cooperate would be wonderful! ๐Ÿ™‚

    Thor

    • Hi

      Did you use the h264 mode of the c920 with gstreamer? AFAIK this is not the default setting. And the other modes (raw or MJPEG) have much lower latency than h264.

      Wifibroadcast might work on the Edison. You have to try it to be sure. But the fact that it uses a Broadcom WIFI card worries me a bit. Broadcom is known to me to suck pretty bad at FOSS…

      • Thor permalink

        That is correct. I used the onboard encoder of the cam (aka h264 mode) and that was what I wanted to point out: I could not find a significant difference in latency between raw and h264 mode. What technique did you use to get h264 video from the cam when you tested it? I got a gst-launch centipede to work. Something like that:

        gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! filesink location=/dev/stdout | tx …

        Using the SOCs encoder is more flexible camerawise (no need for h264 capable camera) but the Pi is fixed on a single camera option anyway (thanks to closed hardware policy).

        It is too sad that the Edisons IGP is disabled. Having a coin sized Intel CPU with hardware encoder would be the ultimate win. I remember a thread on the intel communities where this was a topic. Ahhh! There it is:

        https://communities.intel.com/thread/55040?start=0&tstart=0

        This took of some time ago and since a intel employee responded by saying it is not that unlikely that we see IGP enabled products in the future if the community demands it. What really catched my eye was a guy from Khronos Group that posted a strong statement pro OpenCL and GL and invited everyone for his upcoming talk in London^^ The discussion is still ongoing so take part and raise your voice. ๐Ÿ™‚

        Thor

  11. Tom Para permalink

    Hi Befinitiv…
    I have disabled the serial port in raspi-config and hooked the softserial port of the Naze32 flight controller board to pin 10 of the gpio on the RPi board. I am sending to the RPi at 9600 baud and have tried both LTM and FrSky modes with no success.
    Could you post instructions on how to enable the telemetry. We are using your V.4 image file.
    Thank you for all your help..
    Tom

    • Please take a look at https://befinitiv.wordpress.com/2015/07/06/telemetry-osd-for-wifibroadcast/

      There I describe everything that is needed for telemetry transmission. This of course assumes that you receive valid data on the serial input pin (which depends on your FC & serial adapter).

      If this does not work as expected, you’ll need to test the pipeline step by step to find the cause of the problem.
      Questions which you should test and answer with “yes” are for example:

      1) Is the telemetry data received correctly by the serial port?
      2) Is the telemetry data transmitted correctly over wifibroadcast
      3) Is the data forwarded correctly to the OSD application?

      Sorry, but telemetry is not yet plug and play. Hopefully this will change soon ๐Ÿ™‚

      • Tom Para permalink

        Thank you for your response. I will try that.
        Yes, plug and play image with telemetry is what I need. ๐Ÿ™‚
        I am not a programmer so I have to rely on smart people.

  12. befinitiv this is awesome work and I’ve been following it for a while. I was wondering if you would be interested in joining the DIYDrones Companion Computer group to include this into the work there with the other developers. Please email me for more details if you can. Regards.

    • Thanks! ๐Ÿ™‚ Since I do not have your mail address please send me a mail. You’ll find my address on the “About” page.

  13. Alejandro garcia permalink

    first thank you for all the effort you’re doing with this issue , I have many weeks reading about this kind of video link .I am currently using the last image you uploaded in January with two sticks wn raspberry 2 and 722 and it works fine.Now I would like to try with 2 alpha 036nha to improve range . They would function automatically with your image q January without changes?I mean I am advised to issue as do bats 722n that just turn work and no need to configure anything. thanks and keep it up , you’re doing a great job

    • Hi Alejandro

      Thank you for the kind words! The AWUS036NHA works out of the box with my images. I also use the NHA on my quad.
      Since wifibroadcast is strictly unidirectional you only need one NHA on the quad. The 722s work on the ground equally (if not better) well. You could even recycle your TX 722 to do diversity on the RX side (which improves stability of the transmission a lot). Diversity also works out of the box: Just plug the two 722s into the RX pi and they will be automatically used in diversity mode.

  14. paulmocan permalink

    I have the system working on my quad,with a pi A on the tx, and a pi2 on the rx, both with 722. The system is great. I have been using a 7″ display, but now, I would like to use the analog out of the pi, in order to connect my fatsharks (until I get the headplays) and not the hdmi out. I hooked everything up and I get no image out of the Pi. (Not on the fatsharks, not on a tv).
    Is the analog out disabled?
    Thank’s for all the effort you put into this.

    • Hi paul

      Glad to hear that things are working well! I have never used the composite signal. I guess you would need to change some lines in config.txt. This should be a common problem. Did a websearch lead to anything?

  15. Harasi permalink

    A great project thanks for all your work and knowledge sharing.

    I have a small question is the wifibrodcast transmission secured for example if someone has similar RX will he be able to receive signal and watch the video just like analog transmission anyone in the same channel can see? or is it locked between the Tx and Rx configured together only

  16. Johnny permalink

    anyone have some suggestions for good usb dongles / routers for 5.8ghz for two sets of pies ?

    im reading different suggestions for it

  17. Nate permalink

    Hi Befinitiv

    Is there a way to safely shut off your system,

    is your image read-only?

    Thanks

    Nate

  18. I am using Navio2 autopilot based on raspberry pi2. the flight controller is working fine even sending telemetry via Wi-Fi. I want to use the same raspberry pi board with navio2 for writing the image files you have created for video transmission tx and rx. is it possible to write the images to the same SD card.

  19. the raspian i am using is custom modified for use with Navio2 autopilot board.

  20. Jose permalink

    Hi , I need to rotate the image 180 degrees. How do I do it ?

    Thank you

    • There is an option for raspivid. If you use my images you can take a look under /root/wifibroadcast_fpv_scripts/tx.sh you’ll find the place where it is called.

  21. Would Raspberry Pi 3 Model B work?

  22. First, it’s awesome, thank you @befinitiv

    I am trying to replicate the system with Tx (Rpi A +) and Rx (Rpi 3) and two dongle RT5572 (http://bit.ly/1TPNsII)
    I quickly realized that version 0.4 was not compile for RPI3

    I tried the manual configuration, several times, nothing.
    I tried to build with rpi_wifibroadcast_image_builder for RPI3, but the boot did not go well, and .. nothing.

    An advice ?
    You think make an image supporting the RPI3?

    • Hi Erwin

      Thanks! I currently do not own a RPI3 so I am afraid that I am of no help to you on that matter. Sorry ๐Ÿ˜ฆ Maybe you could describe where the manual setup failed?

  23. Blobman permalink

    Hi there,
    Can this system be used as the transmitter as well? You said it interferes with 2.4GHz, so I wonder would it be possible to send data from ground to the aircraft via the same hardware?
    Thanks for sharing your work!

    • In theory it should be possible. But I have never tried it. But it is really easy to do so: Start a rx/tx pair in the reverse direction and on a different port and you should be able to send data from ground to the air.

  24. Would be awesome if we could have a telemetry Uplink on the same radio, would only need to be like 100 kbps if that, just for the mavlink control! It’s an issue for me because I’m planning a really high gain system with a parabolic reflector and having two radios doesn’t work too well on a dish.

    A mavlink version of wifibroadcast would be AWESOME!

    befinitiv, – you don’t use mavlink or any autopilot right? So you’re probably not going to implement anything for it :/ Would you be interested in having a mavlink autopilot? Something like the navio would be great!

  25. Also has anybody heard of the app VR Player Pro, it’s a VR app which can stream Urls, apparently it’s based on VLC media player. So in theory we should be able to get the stream onto it (tee’d of a raspberry pi or something).

    I haven’t been able to get it to work as of yet, but if anyone could take a look it would be great.

    What is especially cool is it supports motions sensing, which would be great for a wide angle camera, you could “look around”!

  26. Johnny permalink

    Any thought of making a raspberry pi zero version now they released a version which support camera…. i dont know if it has enough processor calculation power ?

  27. Antonio permalink

    Great work befinitv!

    Can anyone help to setup this on an old laptop with lubuntu? Is that possible?

    I already got 1 rpi, 1picam, 2 dongles and a laptop with lubuntu but i’m still a noob on linux.

  28. Hey, anybody try a transmitter with a Zero 1.3 yet? Finally got my hands on one, but the 0.4 image does not start transmitting, so I’m guessing the config is slightly different and it does not see the camera…

    • Alex permalink

      I have been looking into this. I believe a later version of Raspbian is needed to use the camera on the PiZero rather than an issue with the WiFibroadcast code. The camera simply isn’t detected on the version of Jessie I tried.

      From this blog:
      http://blog.pimoroni.com/the-new-raspberry-pi-zero/
      “You’ll need use the latest version of Raspbian to enable the camera to work with the new Zero, so be aware of this if you’re having trouble getting your camera set up.”

      I was however able to successfully use the PiZero as the Rx when using a Pi2 as the Tx.

      • That said, I have now tried updating the images and starting from scratch. The camera just isn’t detected on PiZero but works fine on Pi2…

  29. FPV-Fan permalink

    Hello, just for proper understanding – I think you said that for a backchannel from earth to air, another “port” would be required.

    What does “port” mean in this context – another RPi TX/RX pair on a different frequency? I didn’t quite understand it.

    I need to send data from earth to air. Not much, but a package every now and then. It would be perfect if I could use a single RPi for the air and a single RPi for the earth, both handling TX and RX (air mainly TX, earth mainly RX).

    • Hi

      The tx and rx software has a port parameter -p . Data on different ports can be transmitted independently. It behaves similar to a udp port.

      • FPV-Fan permalink

        Thank you! ๐Ÿ™‚

        If you are from Germany, are there any OSS/CCC/Linux/… events you’re going to visit this year? I’d be very much appreciate to talk to you and discuss technical details of wifibroadcast and digital realtime video and data transmission.

      • Yes, I am from Germany. I haven’t planned anything. Do you have some recommendations?

  30. Ravi permalink

    I am using these images. the video is fine when I useTPLINK TL-WN722N on both sides. but when I plug in alpha network AWUS036H on the Tx side, I do not get the video. I am giving external 5V power to the AWUS036H. an suggestions?

    • Sorry, but the AWUS036H is not compatible with wifibroadcast. You find card candidates on the main wifibroadcast page. Click in the menu on the top of the page to get there.

  31. Ravi permalink

    thanx for quick reply. should I buy AWUS036NHA or can I use the AWUS036H by modifying the wifibroadcast image.

  32. I made a lightweight gimbal for the Raspberry Pi V2 camera that could be a nice complement for wifibroadcast.
    If you are interested you can find details here: https://jeanleflambeur.wordpress.com/2016/08/29/gimbal/
    Video with it in action: https://www.youtube.com/watch?v=wQypj7ti7Vw

  33. Guido permalink

    Hi,
    could be possible to receive video from your tx app to android app? I’m trying to make a video streaming from raspberry with camera pi to my samsung s7.

  34. hello sir thanks for this, im trying it with rpi 2 , TL-WN722N and latest version sd cards in both sides , in rx i can see the boot log in monitor but dont receive any video, all values are zeroes. can you please tell me what im doing wrong? tx rpi is using a v2 8mp camera, thanks in advance.

  35. cam bazz permalink

    hello, has anyone tried it with a raspi3? and what is the recomended wifi adapter?

  36. willbartlett permalink

    Hi there.

    I’m trying to work through a manual install under jessie-lite, kernel is 4.4.18. I’m attempting to set it up using a pi zero, ver 1,3 with a v1 camera. I’m also adding the fun of an archer T1u running an mt7610 chipset. I have successfully installed a driver provided by some helpful folks over on the raspberry Pi forum, and iw list shows that it supports monitor mode.

    performing all of the manual install steps on the manual install page, It appears to install and build cleanly. When I attempt to place the card into manual mode and transmit video, it returns the following

    raspivid -ih -t 0 -w 640 -h 480 -fps 10 -b 4000000 -n -g 60 -pf high -o โ€“ | sudo /home/pi/wifibroadcast/tx -b 8 -r 2 wlan0

    Raw data transmitter (c) 2015 befinitiv GPL2

    however, I see no video on the rx side, and I can confirm with a hack RF and spectrum analyzer that the TX wifi dongle is not transmitting.

    My questions are:

    Will the attempts to use 5.8 only work with a usb adapter based on the rt5572 chipset as described elsewhere in your blog, or should any adapter capable of monitor mode be capable of broadcasting?

    Will this run on a Pi zero v1.3 provided raspivid is otherwise functional? I have been able to send video from a pi zero v1.3 to another pi using an ethernet stream under the same kernel revision, so I am sure that the camera functionality is present.

    I understand that optimization of the transmit power and transmitted bandwidth will yield optimized results, but I’m just trying to get to the “hello world” stage here. I see that you have the optimized firmware for the 2.4 chips as a download, but is it an absolute requirement to have those settings baked in to attain basic functionality?

    I’m trying to get hold of some 5572 based adapters, I’m very interested in running this at 5.8 Ghz, but will also experiment at 2.4 eventually.

    Thanks for the excellent work so far, and I look forward to any info you could provide on the issues I am having.

    W

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: