Skip to content

Wifibroadcast RPI FPV images v0.2

November 18, 2015

Just a quick note: I released new images for Wifibroadcast RPI FPV. You’ll find them here: https://github.com/befinitiv/rpi_wifibroadcast_image_builder/releases/tag/v0.2

The changes are:

  • Init-scripts have been replaced by systemd services. For example, the TX service can now be stopped like this:
    sudo systemctl stop wbctxd
  • New wifibroadcast version: This one supports rx status information
  • New Frsky-OSD: The OSD is now enabled by default showing the signal strength of the receiving cards. If you prefer a plain camera image you can disable the OSD:
    sudo systemctl disable osd
  • Improved Raspberry 2 support for RX
Advertisements

From → Uncategorized

42 Comments
  1. Thank you for posting the images and all the hard work. So I’ve got the following…

    RASPBERRY PI 1 MODEL B X2
    CAMERA MODULE X1
    8GB SD Class10 SD X2
    TP Link TL-WN722N X2

    I’ve got the about 5ft apart. Sometime they talk sometimes they don’t. When they do it buffers then the video freezes.

    Am using your latest image.

    I also have the newer RASPBERRY PI 2 MODEL B. So I tried that as the RX but same problem.

    I get the OSD on the screen across the bottom which is cool.

    Is there a set order to power the device up in?

    Thanks again

    • Hi Pete

      I think you are almost there. What you are telling me sounds to me like a power issue. Could you take a look at the green LED of the WN722? If both stop blinking then you should try a different power source / usb cable for your TX Raspberry. Also a powered USB-hub might help. If only the RX LED stops blinking then the fault is more on this site. Hope this helps!

  2. I got a feeling you’ve solved the issue there and then. I was being lazy, really lazy and using the USB 3.0 Port off my laptop to test the TX and then the USB off the 20” TV that’s my ground station.

    I’ll try them both 2 mains adapters. Both are 5V and 1A Belkin units so should work.

    Just building an S500 which is for some other development testing and plan to try all of this on that as well, small and cheap should anything go wrong…well least that’s the idea.

    Just re flashing images to make sure all is ok.

  3. Regarding the Green LED on the WN722. What about a solid Green as to a blinking?

  4. So, have tried a 5v 3A uBEC via GPIO and Belkin 5v 1A USB charger. I get solid green on both.

    I then just tried this that’s running my ADS-B tracker in the garage for the last month. http://www.modmypi.com/raspberry-pi/accessories/power-supplies/5v-2a-ultra-hq-usb-power-supply-and-cable-uk

    Same problem. Solid green light.

    One thing to note, the OSD that shows on the RX. 1st boot from flash that’s not present.

    I’m lost for ideas now.

    Matching Pi’s
    Matching WiFi Dongles

    I’m lost for ideas. The Pi should be able too run the WN722 without needing a hub. Have used it before on Pirate Box

  5. Have just tried the following item http://www.argos.co.uk/static/Product/partNumber/3387225.htm

    It is has a 2.5A PSU. I still got a green solid light on the TX. Something not right here at all.

    • Mh, ok, then we have to dig deeper into the cause. Could you post here the output of the command “journalctl -u wbctxd” on your TX pi?

      • Pete permalink

        If you want to we can talk directly too each other? My mail is pjalchemist@aol.com

        I have no idea on what needs to be done exactly but I guess I just run that command?

        Can I access the Pi via a Ethernet cable and ssh into it

  6. J.C. permalink

    Hey, just found out about the rpi zero. Maybe this makes for a great addition!

    • J,C, I thought the same but only 1 USB, no CSI for the camera. It would be idea if it had the CSI for the camera

      • J.C. permalink

        Oh damn, didn’t realized this. :/

      • gonalonsoc permalink

        Could it be paired with a USB camera like:
        http://www.amazon.com/ELP-Support-Android-Windows-Surveillance/dp/B00VDSBH9G
        It does H.264 on-board. Just need to send it over WiFI
        And a simple USB-Hub allows it to connect 2 USB devices, camera and WiFI dongle
        Does it make sense?

      • It depends a lot on the latency of the h264 encoder. I once tested the C920 and was not really satisfied. But the only way to know it is to test it.

        You would also need some kind of Linux machine. In that case a Raspi Zero could even work which would be quite nice.

  7. Pete permalink

    Was going to ask is anyone having issues with this working?

  8. Alexandre Licinio permalink

    Hi all, i have bad issue with rpiA+
    I don’t know why but some times rpiTX just stops streaming and the green light over the usb dongle stops blinking and so i don’t receive any stream.
    I tried max_usb_current=1, tried over 2A power supply, tried using it in a clearance rf area but no success. I changed the pi, changed csi cable, changed camera but nothing. It stops randomly.

    I use wifibroadcast for other usage with basic linux server and it never stops. (TxSide).
    If anyone could help us.

    Thanks a lot,
    Cheers,

    • Could you please check dmesg and iwconfig after that failure occured?

      • Alexandre Licinio permalink

        yes,

        11200 data packets sent (interface rate: 763.636)
        11264 data packets sent (interface rate: 768.000)
        11328 data packets sent (interface rate: 772.364)
        11392 data packets sent (interface rate: 776.727)
        Trouble injecting packet: send: Resource temporarily unavailable
        raspivid: no process found
        tx: no process found

        pi@wifibroadcasttx ~/wifibroadcast_fpv_scripts $ iwconfig
        wlan0 IEEE 802.11bgn Mode:Monitor Frequency:2.437 GHz Tx-Power=20 dBm
        Retry short limit:7 RTS thr:off Fragment thr:off
        Power Management:off

        [ 15.332221] cfg80211: (5735000 KHz – 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
        [ 15.332278] cfg80211: (57240000 KHz – 59400000 KHz @ 2160000 KHz), (N/A, 2800 mBm), (N/A)
        [ 15.332297] cfg80211: (59400000 KHz – 63720000 KHz @ 2160000 KHz), (N/A, 4400 mBm), (N/A)
        [ 15.332314] cfg80211: (63720000 KHz – 65880000 KHz @ 2160000 KHz), (N/A, 2800 mBm), (N/A)
        [ 19.110493] Adding 102396k swap on /var/swap. Priority:-1 extents:9 across:741372k SSFS
        [ 28.001296] device wlan0 entered promiscuous mode
        [ 34.744833] device wlan0 left promiscuous mode
        [ 179.411321] device wlan0 entered promiscuous mode
        [ 186.763606] device wlan0 left promiscuous mode
        [ 564.761219] device wlan0 entered promiscuous mode
        [ 587.201250] device wlan0 left promiscuous mode

        i feel so unlucky !
        i build 6 rpiA+ with the image and i have this randomly issue on each !

        Thanks for helping me
        Cheers

  9. Ben Jansen permalink

    Thanks for this great project got the new images working OK now. But i cannot get the RX recording on USB stick working, do i have to format it in a special way or do i have to run a start recording script first?

    • Pete permalink

      Ben what’s your setup exactly. Mines not working at all

      • Ben Jansen permalink

        I have a raspberry pi 1 as transmitter and a pi 2 as receiver. both use an TL-WN722N usb wifi stick. I just flashed the 2 new images to the sd cards.
        I first start the TX pi and wait until the light green light flashes, than i start the RX pi.
        Video recording no also works, you have to create a video directory on the stick first.

    • Hi Ben

      Thanks! Did you create the folder “video” on the USB stick? The recording script checks is the following folder exists: “/media/usb0/video”
      Only if that check is true, a recording will be started.

      • Ben permalink

        Thanks, got it working now. Will do a range check with my tricopter if it stops raining.

  10. Cheers Ben, I just bought 2 new SD cards to try to make sure it’s not mine playing up http://www.ebay.co.uk/itm/262136747879?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

    I’ll try the Pi 1 on both ends still as that’s what I got in a easy access.

    What PSU you using?

    • Ben permalink

      I use a 2A phone charger and an xiaomi powerbank. Cheap usb cables can also be a problem as they cannot supply enough current.

  11. RD00 permalink

    Hi befinitiv,
    first of all, thank you for this great project, it looks like FPV revolution 🙂

    Please help to run it. No video on RX side, just telemetry with zero values.

    My setup is two RP2 and a pair of AR9271 based Ubiquity Wifistation USB adapters :
    https://wikidevi.com/wiki/Ubiquiti_Networks_WiFiStation
    https://wikidevi.com/wiki/Ubiquiti_Networks_WiFiStation_EXT

    On TX side I see WiFi LED flashing and :

    pi@wifibroadcasttx ~ $ iwconfig wlan0
    wlan0 IEEE 802.11bgn Mode:Monitor Frequency:2.472 GHz Tx-Power=20 dBm
    Retry short limit:7 RTS thr:off Fragment thr:off
    Power Management:off

    pi@wifibroadcasttx ~ $ sudo journalctl -u wbctxd
    Dec 01 21:45:15 wifibroadcasttx systemd[1]: Starting wbctxd…
    Dec 01 21:45:15 wifibroadcasttx systemd[1]: Started wbctxd.
    Dec 01 21:45:17 wifibroadcasttx tx.sh[655]: updating wifi (wlan0, 13)
    Dec 01 21:45:18 wifibroadcasttx tx.sh[655]: Starting tx for wlan0
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: Raw data transmitter (c) 2015 befinitiv GPL2
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 64 data packets sent (interface rate: 96.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 128 data packets sent (interface rate: 192.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 192 data packets sent (interface rate: 288.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 256 data packets sent (interface rate: 192.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 320 data packets sent (interface rate: 240.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 384 data packets sent (interface rate: 288.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 448 data packets sent (interface rate: 336.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 512 data packets sent (interface rate: 384.000)
    … and counting.

    On RX side LED flashing and :

    pi@wifibroadcastrx ~ $ iwconfig wlan0
    wlan0 IEEE 802.11bgn Mode:Monitor Frequency:2.472 GHz Tx-Power=20 dBm
    Retry short limit:7 RTS thr:off Fragment thr:off
    Power Management:off

    pi@wifibroadcastrx ~ $ sudo journalctl -u wbcrxd
    — Logs begin at Thu 2015-09-24 15:32:47 UTC, end at Tue 2015-12-01 21:46:31 UTC
    Sep 24 15:32:57 wifibroadcastrx systemd[1]: Starting wbcrxd…
    Sep 24 15:32:57 wifibroadcastrx systemd[1]: Started wbcrxd.
    Sep 24 15:32:59 wifibroadcastrx rx.sh[584]: updating wifi (wlan0, 13)
    Sep 24 15:33:00 wifibroadcastrx rx.sh[584]: Starting without recording
    Sep 24 15:33:00 wifibroadcastrx rx.sh[584]: DLT_IEEE802_11_RADIO Encap
    , it is all.

    Tried to swap Wifistations from TX to RX, no difference. What is wrong ?

    BTW there is big discussion on RCGroups concerning your project, you would be very welcome :
    http://www.rcgroups.com/forums/showthread.php?t=2454052

    • That is rather strange. RX LED flashing means that you receive some data… Did you use prebuilt SD card images?

  12. Hi befinitiv,
    first of all, thank you for this great project, it looks like FPV revolution 🙂

    Please help to run it. No video on RX side, just telemetry with zero values.

    My setup is two RP2 and a pair of AR9271 based Ubiquity Wifistation USB adapters :
    https://wikidevi.com/wiki/Ubiquiti_Networks_WiFiStation
    https://wikidevi.com/wiki/Ubiquiti_Networks_WiFiStation_EXT

    On TX side I see WiFi LED flashing and :

    pi@wifibroadcasttx ~ $ iwconfig wlan0
    wlan0 IEEE 802.11bgn Mode:Monitor Frequency:2.472 GHz Tx-Power=20 dBm
    Retry short limit:7 RTS thr:off Fragment thr:off
    Power Management:off

    pi@wifibroadcasttx ~ $ sudo journalctl -u wbctxd
    Dec 01 21:45:15 wifibroadcasttx systemd[1]: Starting wbctxd…
    Dec 01 21:45:15 wifibroadcasttx systemd[1]: Started wbctxd.
    Dec 01 21:45:17 wifibroadcasttx tx.sh[655]: updating wifi (wlan0, 13)
    Dec 01 21:45:18 wifibroadcasttx tx.sh[655]: Starting tx for wlan0
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: Raw data transmitter (c) 2015 befinitiv GPL2
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 64 data packets sent (interface rate: 96.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 128 data packets sent (interface rate: 192.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 192 data packets sent (interface rate: 288.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 256 data packets sent (interface rate: 192.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 320 data packets sent (interface rate: 240.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 384 data packets sent (interface rate: 288.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 448 data packets sent (interface rate: 336.000)
    Dec 01 21:45:45 wifibroadcasttx tx.sh[655]: 512 data packets sent (interface rate: 384.000)
    … and counting.

    On RX side LED flashing and :

    pi@wifibroadcastrx ~ $ iwconfig wlan0
    wlan0 IEEE 802.11bgn Mode:Monitor Frequency:2.472 GHz Tx-Power=20 dBm
    Retry short limit:7 RTS thr:off Fragment thr:off
    Power Management:off

    pi@wifibroadcastrx ~ $ sudo journalctl -u wbcrxd
    — Logs begin at Thu 2015-09-24 15:32:47 UTC, end at Tue 2015-12-01 21:46:31 UTC
    Sep 24 15:32:57 wifibroadcastrx systemd[1]: Starting wbcrxd…
    Sep 24 15:32:57 wifibroadcastrx systemd[1]: Started wbcrxd.
    Sep 24 15:32:59 wifibroadcastrx rx.sh[584]: updating wifi (wlan0, 13)
    Sep 24 15:33:00 wifibroadcastrx rx.sh[584]: Starting without recording
    Sep 24 15:33:00 wifibroadcastrx rx.sh[584]: DLT_IEEE802_11_RADIO Encap
    , it is all.

    Tried to swap Wifistations from TX to RX, no difference. What is wrong ?

    BTW there is big discussion on RCGroups concerning your project, you would be very welcome :
    http://www.rcgroups.com/forums/showthread.php?t=2454052

  13. Here goes then… new images, new SD cards and 2 different Pi’s both 512MB B’s

    Hoping this works if not Trip to Maplins for some PSU’s http://www.maplin.co.uk/p/maplin-21a-micro-usb-home-charger-n24dq

  14. Well that failed..

    Rx 1st boot no OSD on screen. 2nd boot OSD shows. Any ideas?

    TX, power up, TP Link TL-WN722N flashes green once, then goes solid

    • Could you try to run the tx.sh script by hand?

      cd wifibroadcast_fpv_scripts
      sudo ./tx.sh

      • Pete permalink

        Sorry if I seam really thick. Have no idea at all.

        Can I access this via and Ethernet and putty or have I just got to type the code in and copy it pasting here.

  15. Andrea Abba permalink

    Hi, today i tested the system downloading the prebuilt images. I have a raspberry pi 2 and a pi 1 model b.
    I’m using two alfa awus036h powered by usb (powered) hub.
    The raspberry pi 1 works correctly as rx and tx while the raspberry pi 1 goes in kernel panic after setting the alfa card in monitor mode (or better i can execute the iw instruction but when i restart the wlan0 interface the kernel crashes). Somebody could help me?
    Bye
    Andrea

  16. So I had the option to pass by Maplins today and did, I grabbed 2 of the following http://www.maplin.co.uk/p/maplin-21a-micro-usb-home-charger-n24dq

    Not cheap but can take them back 🙂

    The good news is the TX Pi booted and the TP Link TL-WN722N flashed and flashed green

    Tried the 2nd PSU on the RX Pi and it worked. Tested directly on my 65” Samsung TV to the misses moaning what you doing.

    I need a mean to real world latency test. iPad mini and stop watch

    Video of it action, sorry was dark and off my phone.

    If the links don’t work please go directly here http://pyropetepete.eu/Wifibroadcast%20RPI%20FPV/

    Now the question is how to power this in the ground station and on the aircraft. I have one of these to hand so can try it http://www.ebay.co.uk/itm/5v-Micro-UBEC-BEC-Step-Down-Light-Small-250-quad-QAV-Blackout-ZMR-EMAX-FPV-UK-/281851137205?hash=item419fa30cb5:g:lssAAOSwHnFVz3ZN

    I’d try it via the GPIO.

    So what the findings and the outcome of this. As has been pointed out I think the USB cables being uses where a factor of the issue. I need to get different ones. Any suggestions?

  17. It works!

  18. So I had the option to pass by Maplins today and did, I grabbed 2 of the following. Not cheap but can take them back 🙂

    The good news is the TX Pi booted and the TP Link TL-WN722N flashed and flashed green

    Tried the 2nd PSU on the RX Pi and it worked. Tested directly on my 65” Samsung TV to the misses moaning what you doing.

    I need a mean to real world latency test. iPad mini and stop watch

    If the links don’t work please go directly here http://pyropetepete.eu/Wifibroadcast%20RPI%20FPV/

    Now the question is how to power this in the ground station and on the aircraft. I have one of these to hand so can try it http://www.ebay.co.uk/itm/5v-Micro-UBEC-BEC-Step-Down-Light-Small-250-quad-QAV-Blackout-ZMR-EMAX-FPV-UK-/281851137205?hash=item419fa30cb5:g:lssAAOSwHnFVz3ZN

    I’d try it via the GPIO.

    So what the findings and the outcome of this. As has been pointed out I think the USB cables being uses where a factor of the issue. I need to get different ones. Any suggestions?

  19. So I had the option to pass by Maplins today and did, I grabbed 2 of the following. Not cheap but can take them back 🙂

    The good news is the TX Pi booted and the TP Link TL-WN722N flashed and flashed green. Tried the 2nd PSU on the RX Pi and it worked. Tested directly on my 65” Samsung TV to the misses moaning what you doing.

    I need to do a real world latency test. iPad mini and stop watch was the solution.

    Photos and video are here http://pyropetepete.eu/Wifibroadcast%20RPI%20FPV/

    Now the question is how to power this in the ground station and on the aircraft. I have one of these to hand so can try it http://www.ebay.co.uk/itm/5v-Micro-UBEC-BEC-Step-Down-Light-Small-250-quad-QAV-Blackout-ZMR-EMAX-FPV-UK-/281851137205?hash=item419fa30cb5:g:lssAAOSwHnFVz3ZN

    I’d try it via the GPIO.

    So what the findings and the outcome of this. As has been pointed out I think the USB cables being uses where a factor of the issue. I need to get different ones. Any suggestions?

  20. Yes it works ! 🙂

    Switched to manual start tx.sh and rs.sh. Tx.sh started only after I changed CHANNEL = “11”. On default channel 13 scritpt outputs log but WiFi adapter does nothing – LED doesn’t blink.

    Now it crashes after 1-2 s, but it looks like as electric power issue, so I know what to do 🙂

    root@wifibroadcasttx:/home/pi/wifibroadcast_fpv_scripts# ./tx.sh
    updating wifi (wlan0, 11)
    Starting tx for wlan0
    Raw data transmitter (c) 2015 befinitiv GPL2
    64 data packets sent (interface rate: inf)
    128 data packets sent (interface rate: inf)
    192 data packets sent (interface rate: inf)
    256 data packets sent (interface rate: 384.000)
    ……………….
    960 data packets sent (interface rate: 720.000)
    1024 data packets sent (interface rate: 768.000)
    1088 data packets sent (interface rate: 816.000)
    Trouble injecting packet: send: Resource temporarily unavailable
    raspivid: no process found
    tx: no process found

  21. No its not power issue, 5V 4A source doesn’t help.

    Problem solved only by patching tx.c for packet retransmission :

    int i;
    for (i = 0; i < 10; i++)
    {
    if(plen == pcap_inject(ppcap, packet_transmit_buffer, plen)) break;
    }

    • Alexandre Licinio permalink

      Hi Dmitry, i have this issue too on several rpi. I’m confused, where exactly should i add thoses lines ? modifiy lines ? or can you share your tx.c ? I’m new in c coding.

      Thanks a lot,
      Cheers,

  22. Hi Alexandre,
    look into:

    /home/pi/wifibroadcast/tx.c

    then find in line 203:

    int r = pcap_inject(ppcap, packet_transmit_buffer, plen);
    if (r != plen) {
    pcap_perror(ppcap, “Trouble injecting packet”);
    exit(1);

    change it to :

    int i;
    for (i = 0; i < 10; i++)
    {
    if(plen == pcap_inject(ppcap, packet_transmit_buffer, plen)) break;
    }

    save file, then do :

    make

    It is a kind of "quick and dirty" solution made by programmer of first day Linux experience, but it works 🙂

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: