0

I am capturing a 640x480 JPEG Frame using Video for Linux ( V4L2 ) in my Qt 5.9 C++ App on a Raspberry Pi 3. I am trying to transmit those frames across a TCP Socketn connection using Qt to a BeagleBone X-15 running Qt5 with a QTCPServer.

The Beaglebone X-15 is running Hostapd to create a WiFi hotspot that the Raspberry Pi connects to. The Beaglebone X-15 is using the following 802.11ac USB 3.0 dongle ( it does have a USB 3.0 Hub ):

https://www.amazon.com/gp/product/B00JBJ6VG8/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1

The Raspberry Pi has the following 802.11ac USB dongle ( but only supports USB 2.0 ):

https://www.amazon.com/gp/product/B00FW6T36Y/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1

The same driver is installed on both machines and was built from here:

origin  https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git (fetch)
origin  https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git (push)

The latest commit is relatively recent:

commit 0292aa694d85e8f9120479604e98693f20d5da02
Merge: ed2b800 e905624
Author: Chen Minqiang <ptpt52@users.noreply.github.com>
Date:   Mon Jul 31 13:08:42 2017 +0800

    Merge pull request #227 from h221baker/h221baker/T4UHP-other-usb-pid

    Add the other TP-Link T4UHP USB PID to the list

When connected, the Raspberry Pi shows 54.0 MBit/s as the tx bitrate - this should be approximately 6 MB / sec:

root@raspberrypi:/home/pi# !505
iw dev wlan0 link
Connected to 84:16:f9:09:08:89 (on wlan0)
    SSID: BeagleBone-X15-AP
    freq: 5240
    signal: -45 dBm
    tx bitrate: 54.0 MBit/s

root@raspberrypi:~# sudo iwlist wlan0 rate
wlan0     4 available bit-rates :
      1 Mb/s
      2 Mb/s
      5.5 Mb/s
      11 Mb/s
          Current Bit Rate:54 Mb/s

I tested the network with iperf3 between the BeagleBone X-15 and Raspberry Pi:

root@raspberrypi:~# iperf3 -c 172.24.1.1
Connecting to host 172.24.1.1, port 5201
[  4] local 172.24.1.107 port 56636 connected to 172.24.1.1 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  3.80 MBytes  31.9 Mbits/sec    0    146 KBytes       
[  4]   1.00-2.00   sec  3.58 MBytes  30.0 Mbits/sec    0    168 KBytes       
[  4]   2.00-3.00   sec  3.31 MBytes  27.7 Mbits/sec    0    168 KBytes       
[  4]   3.00-4.00   sec  3.39 MBytes  28.4 Mbits/sec    0    188 KBytes       
[  4]   4.00-5.00   sec  3.45 MBytes  28.9 Mbits/sec    0    208 KBytes       
[  4]   5.00-6.00   sec  3.29 MBytes  27.6 Mbits/sec    0    219 KBytes       
[  4]   6.00-7.00   sec  3.31 MBytes  27.8 Mbits/sec    0    247 KBytes       
[  4]   7.00-8.00   sec  3.34 MBytes  28.0 Mbits/sec    0    315 KBytes       
[  4]   8.00-9.00   sec  3.06 MBytes  25.7 Mbits/sec    0    315 KBytes       
[  4]   9.00-10.00  sec  3.94 MBytes  33.0 Mbits/sec    0    539 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  34.5 MBytes  28.9 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  33.5 MBytes  28.1 Mbits/sec                  receiver

Hostapd verison is 2.4:

hostapd -v
hostapd v2.4
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2015, Jouni Malinen <j@w1.fi> and contributors

Hostap configuration file:

# This is the name of the network
ssid=BeagleBone-X15-AP

# The network passphrase
wpa_passphrase=bazinga

country_code=US

driver=nl80211
auth_algs=1                    # 1=wpa
wpa=2                                # wpa2 only
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

hw_mode=a
interface=wlan0
## channel=0 or channel=acs_survey to pick a channel automatically
## for n pick 1 11
## for ac pick 36 40 44 48
channel=48
ieee80211ac=1                # 802.11ac support
ieee80211d=1
ieee80211h=1
# ieee80211n=1                # 802.11n support

ht_capab=[HT40-][SMPS-STATIC][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935][DSSS_CK-40]
require_ht=0
vht_capab=[RXLDPC][SHORT-GI-80][SHORT-GI-160][TX-STBC-2BY1][RX-STBC-12][SU-BEAMFORMER][SU-BEAMFORMEE][BF-ANTENNA-2][SOUNDING-DIMENSION-2][HTC-VHT][MAX-A_MPDU-LEN-EXP7]
require_vht=0
eapol_key_index_workaround=0
eap_server=0

beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
ignore_broadcast_ssid=0
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0

BeagleBone X-15 Linux Kernel version is:

4.9.35-ti-r44

The problem is that the stream is not smooth. I preform a socket::write on each frame that is captured. When I print the received frame size on the server side, it seems like they come in batches, sometimes very fast, then sometimes slow, but not smooth and consistent.

I should be able to connect on 5 GHz from Raspberry Pi Dongle to the BeagleBone X-15 at 802.11 ac speeds, but it seems I am stuck at 54MB/s ( 802.11a ? ). How can I get hostapd to create an 802.11ac hotspot so I can have the throughput I need? Thanks.

  • What throughput do you expect? The Pi USB is 400mbps in theory, I'm not sure what that means in practice, perhaps 20MBps. – joan Jan 14 '18 at 20:33
  • I guess I expected more than 20 MBps.. I guessed 480 MBps * 0.5 / 8 = 30 MByte/Sec at least... – PhilBot Jan 14 '18 at 20:36
  • 20MBps is a reasonable target. If you get less then perhaps there is something to investigate. – joan Jan 14 '18 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.