Analysis and solution to the problem of large ping delay on wifi 4 devices

The customer has a HUD head-up display device. After connecting to our wifi device, the ping delay is very large, more than 1 second, and the TCP transmission head-up display data delay is very stuck. After getting the HUD device, I started to test 3 ublox wifi:

Problem summary: The HUD device in the g/n format has excessive delay due to the weak MCU computing power. It is normal to change it to 11b.

W374 WPA2 test

64 bytes from 192.168.110.110: icmp_seq=9 ttl=255 time=81.5 ms
64 bytes from 192.168.110.110: icmp_seq=10 ttl=255 time=25.3 ms
64 bytes from 192.168.110.110: icmp_seq=11 ttl=255 time=2.52 ms
64 bytes from 192.168.110.110: icmp_seq=12 ttl=255 time=14.1 ms
64 bytes from 192.168.110.110: icmp_seq=13 ttl=255 time=69.0 ms
64 bytes from 192.168.110.110: icmp_seq=14 ttl=255 time=105 ms
64 bytes from 192.168.110.110: icmp_seq=15 ttl=255 time=48.1 ms
64 bytes from 192.168.110.110: icmp_seq=16 ttl=255 time=91.4 ms
64 bytes from 192.168.110.110: icmp_seq=17 ttl=255 time=36.2 ms
64 bytes from 192.168.110.110: icmp_seq=18 ttl=255 time=84.0 ms
64 bytes from 192.168.110.110: icmp_seq=19 ttl=255 time=27.4 ms
64 bytes from 192.168.110.110: icmp_seq=20 ttl=255 time=73.3 ms
64 bytes from 192.168.110.110: icmp_seq=21 ttl=255 time=15.6 ms
64 bytes from 192.168.110.110: icmp_seq=22 ttl=255 time=64.0 ms
64 bytes from 192.168.110.110: icmp_seq=23 ttl=255 time=6.41 ms
64 bytes from 192.168.110.110: icmp_seq=24 ttl=255 time=55.1 ms
64 bytes from 192.168.110.110: icmp_seq=25 ttl=255 time=98.2 ms
64 bytes from 192.168.110.110: icmp_seq=26 ttl=255 time=34.4 ms
64 bytes from 192.168.110.110: icmp_seq=27 ttl=255 time=87.1 ms
64 bytes from 192.168.110.110: icmp_seq=28 ttl=255 time=30.1 ms
64 bytes from 192.168.110.110: icmp_seq=29 ttl=255 time=1202 ms
64 bytes from 192.168.110.110: icmp_seq=30 ttl=255 time=939 ms
64 bytes from 192.168.110.110: icmp_seq=31 ttl=255 time=1194 ms
64 bytes from 192.168.110.110: icmp_seq=32 ttl=255 time=1138 ms
64 bytes from 192.168.110.110: icmp_seq=33 ttl=255 time=980 ms
64 bytes from 192.168.110.110: icmp_seq=34 ttl=255 time=132 ms
64 bytes from 192.168.110.110: icmp_seq=35 ttl=255 time=1178 ms
64 bytes from 192.168.110.110: icmp_seq=36 ttl=255 time=923 ms
64 bytes from 192.168.110.110: icmp_seq=37 ttl=255 time=1170 ms

W374 WPA1 test

64 bytes from 192.168.110.110: icmp_seq=51 ttl=255 time=37.4 ms
64 bytes from 192.168.110.110: icmp_seq=52 ttl=255 time=25.4 ms
64 bytes from 192.168.110.110: icmp_seq=53 ttl=255 time=41.3 ms
64 bytes from 192.168.110.110: icmp_seq=54 ttl=255 time=1.36 ms
64 bytes from 192.168.110.110: icmp_seq=55 ttl=255 time=93.5 ms
64 bytes from 192.168.110.110: icmp_seq=56 ttl=255 time=6.91 ms
64 bytes from 192.168.110.110: icmp_seq=57 ttl=255 time=36.5 ms
64 bytes from 192.168.110.110: icmp_seq=58 ttl=255 time=59.4 ms
64 bytes from 192.168.110.110: icmp_seq=59 ttl=255 time=92.2 ms
64 bytes from 192.168.110.110: icmp_seq=60 ttl=255 time=104 ms
64 bytes from 192.168.110.110: icmp_seq=61 ttl=255 time=24.5 ms
64 bytes from 192.168.110.110: icmp_seq=62 ttl=255 time=46.6 ms
64 bytes from 192.168.110.110: icmp_seq=63 ttl=255 time=70.0 ms
64 bytes from 192.168.110.110: icmp_seq=64 ttl=255 time=91.7 ms
64 bytes from 192.168.110.110: icmp_seq=65 ttl=255 time=11.1 ms
64 bytes from 192.168.110.110: icmp_seq=66 ttl=255 time=33.9 ms
64 bytes from 192.168.110.110: icmp_seq=67 ttl=255 time=59.3 ms
64 bytes from 192.168.110.110: icmp_seq=68 ttl=255 time=84.1 ms
64 bytes from 192.168.110.110: icmp_seq=69 ttl=255 time=102 ms
64 bytes from 192.168.110.110: icmp_seq=70 ttl=255 time=24.0 ms
64 bytes from 192.168.110.110: icmp_seq=71 ttl=255 time=45.8 ms
64 bytes from 192.168.110.110: icmp_seq=72 ttl=255 time=70.4 ms
64 bytes from 192.168.110.110: icmp_seq=73 ttl=255 time=124 ms
64 bytes from 192.168.110.110: icmp_seq=74 ttl=255 time=1036 ms
64 bytes from 192.168.110.110: icmp_seq=75 ttl=255 time=1051 ms
64 bytes from 192.168.110.110: icmp_seq=76 ttl=255 time=1074 ms
64 bytes from 192.168.110.110: icmp_seq=77 ttl=255 time=1096 ms
64 bytes from 192.168.110.110: icmp_seq=78 ttl=255 time=192 ms
64 bytes from 192.168.110.110: icmp_seq=79 ttl=255 time=1048 ms
64 bytes from 192.168.110.110: icmp_seq=80 ttl=255 time=1061 ms
64 bytes from 192.168.110.110: icmp_seq=81 ttl=255 time=1081 ms
64 bytes from 192.168.110.110: icmp_seq=82 ttl=255 time=1103 ms
64 bytes from 192.168.110.110: icmp_seq=83 ttl=255 time=1025 ms
64 bytes from 192.168.110.110: icmp_seq=84 ttl=255 time=1047 ms
64 bytes from 192.168.110.110: icmp_seq=85 ttl=255 time=967 ms
64 bytes from 192.168.110.110: icmp_seq=86 ttl=255 time=174 ms
64 bytes from 192.168.110.110: icmp_seq=87 ttl=255 time=199 ms
64 bytes from 192.168.110.110: icmp_seq=88 ttl=255 time=658 ms
64 bytes from 192.168.110.110: icmp_seq=89 ttl=255 time=552 ms
64 bytes from 192.168.110.110: icmp_seq=90 ttl=255 time=162 ms
64 bytes from 192.168.110.110: icmp_seq=91 ttl=255 time=493 ms
64 bytes from 192.168.110.110: icmp_seq=92 ttl=255 time=412 ms
64 bytes from 192.168.110.110: icmp_seq=93 ttl=255 time=1049 ms
64 bytes from 192.168.110.110: icmp_seq=94 ttl=255 time=663 ms
64 bytes from 192.168.110.110: icmp_seq=95 ttl=255 time=1092 ms
64 bytes from 192.168.110.110: icmp_seq=96 ttl=255 time=332 ms
64 bytes from 192.168.110.110: icmp_seq=97 ttl=255 time=1036 ms
64 bytes from 192.168.110.110: icmp_seq=98 ttl=255 time=1061 ms
64 bytes from 192.168.110.110: icmp_seq=99 ttl=255 time=82.9 ms
64 bytes from 192.168.110.110: icmp_seq=100 ttl=255 time=1106 ms
64 bytes from 192.168.110.110: icmp_seq=101 ttl=255 time=1021 ms
64 bytes from 192.168.110.110: icmp_seq=102 ttl=255 time=1145 ms
64 bytes from 192.168.110.110: icmp_seq=103 ttl=255 time=1065 ms
64 bytes from 192.168.110.110: icmp_seq=105 ttl=255 time=2064 ms
64 bytes from 192.168.110.110: icmp_seq=106 ttl=255 time=1060 ms
64 bytes from 192.168.110.110: icmp_seq=107 ttl=255 time=1053 ms
64 bytes from 192.168.110.110: icmp_seq=108 ttl=255 time=1076 ms
64 bytes from 192.168.110.110: icmp_seq=109 ttl=255 time=168 ms

W263 WPA2 test

64 bytes from 192.168.110.110: icmp_seq=37 ttl=255 time=28.3 ms
64 bytes from 192.168.110.110: icmp_seq=38 ttl=255 time=56.0 ms
64 bytes from 192.168.110.110: icmp_seq=39 ttl=255 time=74.2 ms
64 bytes from 192.168.110.110: icmp_seq=40 ttl=255 time=86.8 ms
64 bytes from 192.168.110.110: icmp_seq=41 ttl=255 time=7.17 ms
64 bytes from 192.168.110.110: icmp_seq=42 ttl=255 time=1154 ms
64 bytes from 192.168.110.110: icmp_seq=43 ttl=255 time=1028 ms
64 bytes from 192.168.110.110: icmp_seq=44 ttl=255 time=120 ms
64 bytes from 192.168.110.110: icmp_seq=45 ttl=255 time=1071 ms
64 bytes from 192.168.110.110: icmp_seq=46 ttl=255 time=859 ms
64 bytes from 192.168.110.110: icmp_seq=47 ttl=255 time=1189 ms
64 bytes from 192.168.110.110: icmp_seq=48 ttl=255 time=1035 ms
64 bytes from 192.168.110.110: icmp_seq=49 ttl=255 time=862 ms
64 bytes from 192.168.110.110: icmp_seq=50 ttl=255 time=1080 ms
64 bytes from 192.168.110.110: icmp_seq=51 ttl=255 time=648 ms
64 bytes from 192.168.110.110: icmp_seq=52 ttl=255 time=884 ms
64 bytes from 192.168.110.110: icmp_seq=53 ttl=255 time=189 ms
64 bytes from 192.168.110.110: icmp_seq=54 ttl=255 time=419 ms
64 bytes from 192.168.110.110: icmp_seq=55 ttl=255 time=871 ms
64 bytes from 192.168.110.110: icmp_seq=56 ttl=255 time=1180 ms
64 bytes from 192.168.110.110: icmp_seq=57 ttl=255 time=201 ms
64 bytes from 192.168.110.110: icmp_seq=58 ttl=255 time=1152 ms
64 bytes from 192.168.110.110: icmp_seq=59 ttl=255 time=101 ms
64 bytes from 192.168.110.110: icmp_seq=60 ttl=255 time=93.7 ms
64 bytes from 192.168.110.110: icmp_seq=61 ttl=255 time=1137 ms
64 bytes from 192.168.110.110: icmp_seq=62 ttl=255 time=1025 ms
64 bytes from 192.168.110.110: icmp_seq=63 ttl=255 time=1051 ms
64 bytes from 192.168.110.110: icmp_seq=64 ttl=255 time=1080 ms
64 bytes from 192.168.110.110: icmp_seq=65 ttl=255 time=78.7 ms
64 bytes from 192.168.110.110: icmp_seq=66 ttl=255 time=92.2 ms
64 bytes from 192.168.110.110: icmp_seq=67 ttl=255 time=1136 ms
64 bytes from 192.168.110.110: icmp_seq=68 ttl=255 time=1088 ms
64 bytes from 192.168.110.110: icmp_seq=69 ttl=255 time=206 ms
64 bytes from 192.168.110.110: icmp_seq=70 ttl=255 time=1132 ms
64 bytes from 192.168.110.110: icmp_seq=71 ttl=255 time=937 ms
64 bytes from 192.168.110.110: icmp_seq=72 ttl=255 time=747 ms
64 bytes from 192.168.110.110: icmp_seq=73 ttl=255 time=1062 ms
64 bytes from 192.168.110.110: icmp_seq=74 ttl=255 time=1050 ms

W263 WPA1 test [normal]

64 bytes from 192.168.110.110: icmp_seq=142 ttl=255 time=42.7 ms
64 bytes from 192.168.110.110: icmp_seq=143 ttl=255 time=63.8 ms
64 bytes from 192.168.110.110: icmp_seq=144 ttl=255 time=101 ms
64 bytes from 192.168.110.110: icmp_seq=145 ttl=255 time=111 ms
64 bytes from 192.168.110.110: icmp_seq=146 ttl=255 time=27.0 ms
64 bytes from 192.168.110.110: icmp_seq=147 ttl=255 time=51.2 ms
64 bytes from 192.168.110.110: icmp_seq=148 ttl=255 time=78.3 ms
64 bytes from 192.168.110.110: icmp_seq=149 ttl=255 time=200 ms
64 bytes from 192.168.110.110: icmp_seq=150 ttl=255 time=41.4 ms
64 bytes from 192.168.110.110: icmp_seq=151 ttl=255 time=41.6 ms
64 bytes from 192.168.110.110: icmp_seq=152 ttl=255 time=59.9 ms
64 bytes from 192.168.110.110: icmp_seq=153 ttl=255 time=85.8 ms
64 bytes from 192.168.110.110: icmp_seq=154 ttl=255 time=106 ms
64 bytes from 192.168.110.110: icmp_seq=155 ttl=255 time=23.9 ms
64 bytes from 192.168.110.110: icmp_seq=156 ttl=255 time=69.5 ms
64 bytes from 192.168.110.110: icmp_seq=157 ttl=255 time=78.3 ms
64 bytes from 192.168.110.110: icmp_seq=158 ttl=255 time=96.7 ms
64 bytes from 192.168.110.110: icmp_seq=159 ttl=255 time=14.5 ms
64 bytes from 192.168.110.110: icmp_seq=160 ttl=255 time=39.8 ms
64 bytes from 192.168.110.110: icmp_seq=161 ttl=255 time=62.2 ms
64 bytes from 192.168.110.110: icmp_seq=162 ttl=255 time=85.4 ms
64 bytes from 192.168.110.110: icmp_seq=163 ttl=255 time=118 ms
64 bytes from 192.168.110.110: icmp_seq=164 ttl=255 time=43.4 ms
64 bytes from 192.168.110.110: icmp_seq=165 ttl=255 time=146 ms
64 bytes from 192.168.110.110: icmp_seq=166 ttl=255 time=72.5 ms
64 bytes from 192.168.110.110: icmp_seq=167 ttl=255 time=103 ms
64 bytes from 192.168.110.110: icmp_seq=168 ttl=255 time=15.1 ms
64 bytes from 192.168.110.110: icmp_seq=169 ttl=255 time=38.9 ms
64 bytes from 192.168.110.110: icmp_seq=170 ttl=255 time=56.5 ms
64 bytes from 192.168.110.110: icmp_seq=171 ttl=255 time=100 ms
64 bytes from 192.168.110.110: icmp_seq=172 ttl=255 time=106 ms
64 bytes from 192.168.110.110: icmp_seq=173 ttl=255 time=25.2 ms
64 bytes from 192.168.110.110: icmp_seq=174 ttl=255 time=48.6 ms
64 bytes from 192.168.110.110: icmp_seq=175 ttl=255 time=73.0 ms
64 bytes from 192.168.110.110: icmp_seq=176 ttl=255 time=3.95 ms
64 bytes from 192.168.110.110: icmp_seq=177 ttl=255 time=14.5 ms
64 bytes from 192.168.110.110: icmp_seq=178 ttl=255 time=47.9 ms

hostapd_wpa2.conf configuration file

interface=muap0
driver=nl80211
#ctrl_interface=/var/run/hostapd
ssid=caeri_gvobu_123

#RF
hw_mode=g
channel=1
country_code=CN

#11N
ieee80211n=1
#ht_capab=[HT40 + ][SHORT-GI-20][SHORT-GI-40]

#11AC
#ieee80211ac=1
#vht_capab=[SHORT-GI-80]
#vht_oper_chwidth=1
#vht_oper_centr_freq_seg0_idx=42

#noax
#Security
ieee80211w=1
wpa=2/1
wpa_passphrase=caeri12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP/CCMP
rsn_pairwise=CCMP

W131 WPA2 test

64 bytes from 192.168.110.5: icmp_seq=30 ttl=255 time=174 ms
64 bytes from 192.168.110.5: icmp_seq=31 ttl=255 time=93.2 ms
64 bytes from 192.168.110.5: icmp_seq=32 ttl=255 time=17.8 ms
64 bytes from 192.168.110.5: icmp_seq=33 ttl=255 time=661 ms
64 bytes from 192.168.110.5: icmp_seq=34 ttl=255 time=1094 ms
64 bytes from 192.168.110.5: icmp_seq=35 ttl=255 time=66.6 ms
64 bytes from 192.168.110.5: icmp_seq=36 ttl=255 time=599 ms
64 bytes from 192.168.110.5: icmp_seq=37 ttl=255 time=1028 ms
64 bytes from 192.168.110.5: icmp_seq=38 ttl=255 time=117 ms
64 bytes from 192.168.110.5: icmp_seq=39 ttl=255 time=452 ms
64 bytes from 192.168.110.5: icmp_seq=40 ttl=255 time=82.0 ms
64 bytes from 192.168.110.5: icmp_seq=41 ttl=255 time=1112 ms
64 bytes from 192.168.110.5: icmp_seq=42 ttl=255 time=493 ms
64 bytes from 192.168.110.5: icmp_seq=43 ttl=255 time=113 ms
64 bytes from 192.168.110.5: icmp_seq=44 ttl=255 time=982 ms
64 bytes from 192.168.110.5: icmp_seq=45 ttl=255 time=44.1 ms
64 bytes from 192.168.110.5: icmp_seq=46 ttl=255 time=986 ms
64 bytes from 192.168.110.5: icmp_seq=47 ttl=255 time=302 ms
64 bytes from 192.168.110.5: icmp_seq=48 ttl=255 time=21.7 ms

w131 configuration file:

wifimode=ap
bss=caeri_gvobu_6209C380F662
passwd=caeri12345678
if [ "$wifimode" == "ap" ];then
    echo "start to setup access point."
    cd /lib/modules/wibt
    lsmod | grep "sd8xxx" > /dev/null 2> & amp;1
    if [ $? -ne 0 ]; then
        echo "do install module sd8787."
        insmod mlan.ko
        insmod sd8787.ko cfg80211_wext=0xf
        #sleep 1
    else
        echo "module sd8787 had installed."
    fi
    cd /opt/ella-w131/bin_sd8787
    ./uaputl.exe sys_cfg_ssid "$bss"
    # set AP SSID to "ELLA-W1"
    # set AP primary channel to 36 (5GHz band), with secondary channel above:
    ./uaputl.exe sys_cfg_channel 6
    # enable 802.11n mode with short guard interval, 40MHz channel bandwidth:
    ./uaputl.exe sys_cfg_11n 1 0x116e 3 0 0xff
    #./uaputl.exe sys_cfg_rates 0xc 0x12 0x18 0x24 0x30 0x48 0x60 0x6c
    ./uaputl.exe sys_cfg_80211d state 1 country CN
    # enable 802.11d, set country
    # configure encryption:
    ./uaputl.exe sys_cfg_auth 0
    ./uaputl.exe sys_cfg_protocol 32
    #WPA2
    ./uaputl.exe sys_cfg_wpa_passphrase "$password"
    # passphrase "topsecret"
    ./uaputl.exe sys_cfg_cipher 8 8
    #CCMP
    ./uaputl.exe bss_start
    # start the AP
    #sleep 1
    ifconfig uap0 192.168.110.1
    #shareinternetform5G
    echo 1 > /proc/sys/net/ipv4/ip_forward
    cd /home/root/
fi

Summary 1

HUD device model: ESP32-C3-MINI-1, which belongs to wifi4 and supports 802.11b/g/n. Only W263 WPA1 delay is normal. Is it really related to the encryption method? The delay when using W131 wifi4 is also very large. Isn’t it a compatibility issue?

Later tested with W374 WP2

Run caeri_hud display program

64 bytes from 192.168.110.110: icmp_seq=48 ttl=255 time=47.4 ms
64 bytes from 192.168.110.110: icmp_seq=49 ttl=255 time=478 ms
64 bytes from 192.168.110.110: icmp_seq=50 ttl=255 time=501 ms
64 bytes from 192.168.110.110: icmp_seq=51 ttl=255 time=12.6 ms
64 bytes from 192.168.110.110: icmp_seq=52 ttl=255 time=444 ms
64 bytes from 192.168.110.110: icmp_seq=53 ttl=255 time=153 ms
64 bytes from 192.168.110.110: icmp_seq=54 ttl=255 time=490 ms
64 bytes from 192.168.110.110: icmp_seq=55 ttl=255 time=104 ms
64 bytes from 192.168.110.110: icmp_seq=56 ttl=255 time=126 ms
64 bytes from 192.168.110.110: icmp_seq=57 ttl=255 time=44.8 ms
64 bytes from 192.168.110.110: icmp_seq=58 ttl=255 time=478 ms
64 bytes from 192.168.110.110: icmp_seq=59 ttl=255 time=501 ms
64 bytes from 192.168.110.110: icmp_seq=60 ttl=255 time=215 ms
64 bytes from 192.168.110.110: icmp_seq=61 ttl=255 time=445 ms
64 bytes from 192.168.110.110: icmp_seq=62 ttl=255 time=468 ms
64 bytes from 192.168.110.110: icmp_seq=63 ttl=255 time=490 ms
64 bytes from 192.168.110.110: icmp_seq=64 ttl=255 time=515 ms
64 bytes from 192.168.110.110: icmp_seq=65 ttl=255 time=434 ms
64 bytes from 192.168.110.110: icmp_seq=66 ttl=255 time=456 ms
64 bytes from 192.168.110.110: icmp_seq=67 ttl=255 time=992 ms
64 bytes from 192.168.110.110: icmp_seq=68 ttl=255 time=505 ms
64 bytes from 192.168.110.110: icmp_seq=69 ttl=255 time=425 ms
64 bytes from 192.168.110.110: icmp_seq=70 ttl=255 time=448 ms
64 bytes from 192.168.110.110: icmp_seq=71 ttl=255 time=1015 ms
64 bytes from 192.168.110.110: icmp_seq=72 ttl=255 time=17.1 ms
64 bytes from 192.168.110.110: icmp_seq=73 ttl=255 time=14.7 ms
64 bytes from 192.168.110.110: icmp_seq=74 ttl=255 time=437 ms
64 bytes from 192.168.110.110: icmp_seq=75 ttl=255 time=264 ms
64 bytes from 192.168.110.110: icmp_seq=76 ttl=255 time=83.2 ms
64 bytes from 192.168.110.110: icmp_seq=77 ttl=255 time=506 ms
64 bytes from 192.168.110.110: icmp_seq=78 ttl=255 time=426 ms
64 bytes from 192.168.110.110: icmp_seq=79 ttl=255 time=450 ms
64 bytes from 192.168.110.110: icmp_seq=80 ttl=255 time=984 ms
64 bytes from 192.168.110.110: icmp_seq=81 ttl=255 time=495 ms

IMX8 + openwrt + W131 + WPA2 + hostapd2.9 [normal delay]

root@OpenWrt:/# cat /etc/hostapd.conf
interface=uap0
driver=nl80211
ssid=caeri_gvobu_123
channel=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_passphrase=caeri12345678

root@OpenWrt:/# cat /etc/init.d/wifi
#!/bin/sh /etc/rc.common

START=81

echo "wifi..."
boot() {
echo "wifi boot..."
insmod /lib/modules/4.14.98/mlan.ko
insmod /lib/modules/4.14.98/sd8xxx.ko cfg80211_wext=0xf
hostapd /etc/hostapd.conf &
ifconfig uap0 192.168.0.1
mkdir -p /var/lib/misc/
touch /var/lib/misc/udhcpd.leases
udhcpd -fS /etc/udhcpd.conf &
}

start() {
echo "wifi start..."
}

hostapd: unrecognized option: V
hostapd v2.9
64 bytes from 192.168.110.110: seq=200 ttl=255 time=8.349 ms
64 bytes from 192.168.110.110: seq=201 ttl=255 time=37.871 ms
64 bytes from 192.168.110.110: seq=202 ttl=255 time=61.619 ms
64 bytes from 192.168.110.110: seq=203 ttl=255 time=85.293 ms
64 bytes from 192.168.110.110: seq=204 ttl=255 time=2.107 ms
64 bytes from 192.168.110.110: seq=205 ttl=255 time=30.331 ms
64 bytes from 192.168.110.110: seq=206 ttl=255 time=53.927 ms
64 bytes from 192.168.110.110: seq=207 ttl=255 time=77.996 ms
64 bytes from 192.168.110.110: seq=208 ttl=255 time=102.005 ms
64 bytes from 192.168.110.110: seq=209 ttl=255 time=23.235 ms
64 bytes from 192.168.110.110: seq=210 ttl=255 time=41.423 ms
64 bytes from 192.168.110.110: seq=211 ttl=255 time=72.328 ms
64 bytes from 192.168.110.110: seq=212 ttl=255 time=94.568 ms
64 bytes from 192.168.110.110: seq=213 ttl=255 time=10.357 ms
64 bytes from 192.168.110.110: seq=214 ttl=255 time=57.020 ms
64 bytes from 192.168.110.110: seq=215 ttl=255 time=63.699 ms
64 bytes from 192.168.110.110: seq=216 ttl=255 time=5.220 ms
64 bytes from 192.168.110.110: seq=217 ttl=255 time=2.666 ms
64 bytes from 192.168.110.110: seq=218 ttl=255 time=32.429 ms
64 bytes from 192.168.110.110: seq=219 ttl=255 time=56.548 ms
64 bytes from 192.168.110.110: seq=220 ttl=255 time=80.175 ms
64 bytes from 192.168.110.110: seq=221 ttl=255 time=105.807 ms
64 bytes from 192.168.110.110: seq=222 ttl=255 time=20.491 ms
64 bytes from 192.168.110.110: seq=223 ttl=255 time=49.922 ms
64 bytes from 192.168.110.110: seq=224 ttl=255 time=73.709 ms
64 bytes from 192.168.110.110: seq=225 ttl=255 time=97.923 ms
64 bytes from 192.168.110.110: seq=226 ttl=255 time=19.080 ms
64 bytes from 192.168.110.110: seq=227 ttl=255 time=43.357 ms
64 bytes from 192.168.110.110: seq=228 ttl=255 time=1.737 ms
64 bytes from 192.168.110.110: seq=229 ttl=255 time=95.259 ms
64 bytes from 192.168.110.110: seq=230 ttl=255 time=5.612 ms
64 bytes from 192.168.110.110: seq=231 ttl=255 time=39.541 ms
64 bytes from 192.168.110.110: seq=232 ttl=255 time=59.484 ms
64 bytes from 192.168.110.110: seq=233 ttl=255 time=83.280 ms
64 bytes from 192.168.110.110: seq=234 ttl=255 time=2.901 ms
64 bytes from 192.168.110.110: seq=235 ttl=255 time=30.612 ms
64 bytes from 192.168.110.110: seq=236 ttl=255 time=52.352 ms

Comparing two W131 configurations

It was found that there are differences in the configurations of the two W131s. The openwrt system configuration is simple and only uses the default 11b, while the yocto W131 uses 11b/g/n. There is only a difference in the wifi standard protocol.

Comment out hw_mode=g, ieee80211n=1, ieee80211w=1, and keep the others unchanged

In this way, the connection is in the 11b standard, and the link speed is 11Mbps. In this way, the delay uses dozens of ms, and the maximum is more than 100 ms, which solves the problem of large delay. The air interface streams UDP 4Mb without packet loss, and TCP 7Mb.

Summary 2

Although the HUD device supports the 11b/g/n format, in the g and n formats, due to the weak MCU computing power, the delay is large, and the data STA equipment itself has problems. Setting the 11b format solves the big delay problem.

Speed measurement analysis process

Test summary:
1. The HUD connection is unstable. Both WPA1 and WPA2 can be connected. Is it the same for WPA1? [Same with no improvement] Annotation software random number [Same with no improvement]
#ieee80211w=1 comment no improvement
2. The shorter the ping interval, the less likely it is to have a large delay, 0.1=500~700ms
3. When pinging normally, it will be disconnected after a large delay. After being disconnected, the delay can be positive by tens of ms.
4. The frequency of disconnection is once every minute.
5. What is the situation of IMX6 263? W263 is the same, disconnected in 1 minute and frequently delayed by 1 second; use WPA1 to test [dropped in 1 minute, maximum 210ms]. No disconnection, dozens of WPA1, more than 300 WPA2
6. What about IMX8 131? [Make sure it’s W131, it’s W131, not the hostapd method] Same as W263, 1 minute disconnection, and frequent 1s delay;
7. Change firmware: https://github.com/nxp-imx/imx-firmware/tree/lf-6.1.36_2.1.0/nxp/FwImage_9098_SD
sdiouart9098_combo_v1.bin [firmware is consistent with the one currently used]
https://github.com/nxp-imx/imx-firmware/blob/lf-6.1.36_2.1.0/nxp/FwImage_9098_SD/sdiouart9098_combo_v1.bin
Cut branch: git checkout lf-6.1.36_2.1.0
nxp/FwImage_9098_SD/sdiouart9098_combo_v1.bin [No improvement]
126c6ae89b47d5676baf01b30bddeb87 nxp/FwImage_9098_SD/sdiouart9098_combo_v1.bin
8. Capture air packets [Failed to capture Ubuntu laptop, does not support listening mode; use MAC computer to capture]
9. There is no disconnection for 1 minute after running the program: /data/upgrade# ./caeri_hud 6000 & [WPA2 is consistent with WPA1, no improvement, the probability of large delay is reduced, an average of 400ms, but there is no improvement in customer testing]
10. Annotate country code [no improvement]
315532813.891153: Previous country code 00, new country code CN
315535090.338067: nl80211: Regulatory information - country=00
11. Ping the Ubuntu system. When the Ubuntu system scans the ap, the delay is more than 3 seconds. If it is not scanned, the average is 55 and the maximum is 348.
12. Hostapd 2.9 was changed to v2.10 [no improvement] and then to WPA1 [no improvement], and muap0 was changed to uap0 [no improvement]
13. wpa2 annotation wpa_pairwise=TKIP [no improvement], wpa2 CCMP [no improvement]
14. WPA2 [There is signal but the hud cannot connect]
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP TKIP
15. WPA1 [seems to have improved, to tens of ms, but will still be hundreds of ms in subsequent tests]
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP TKIP
16. Remove the host_mlme=1 parameter WPA1 [tens of ms at first, then 400ms] WPA2 [no improvement]
17. It is normal for LianGong ESP32 + W131 to use JWD2; it is normal for LianGong ESP32 + W131 to use JWD3;
18. IMX8 + openwrt + W131 + WPA2 + hostapd2.9 [average tens of ms, maximum more than 100]
round-trip min/avg/max = 1.736/46.872/162.813 ms
round-trip min/avg/max = 1.875/20.000/65.269 ms
19. Note the g/n protocol, the default is above 11b [the delay is normal for tens of milliseconds]
802.11b standard, link speed: 11Mbps, streaming UDP 4Mb without packet loss, TCP 07Mb
802.11g standard, link speed: 54Mbps, streaming UDP 4Mb without packet loss, TCP 25Mb