New WiFi module 3 drops connection in Access Point mode

Moderators: mdrjr, odroid

New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Wed Jun 06, 2018 12:07 pm

The new version of module 3 Wifi seems to drop connections when in access point mode.
Here is a summary of my setup:

I connect to the Odroid's access point from my laptop both through ssh and using a VNC server for remote desktop.
After a few minutes the remote desktop /or the ssh connection freezes (it becomes unresponsive) and I have to disconnect from the AP, connect to another WiFi then connect again to the AP then the connection starts working again.

This has started happening since I've started using the new version of the Wifi module 3. With the old version of module 3, I can remote desktop for about an hour, the connection won't ever freeze on me (I just did some comparative tests with the 2 modules on the same Odroid).

Here are the details for the 2 versions of the modules (from the MAC addresses), see attached pic:
1. old wifi module manufacturer: Shenzen Ogemray Technology Co, Ltd
2. new wifi module manufacturer: Wanlida Group Co, Ltd
I've repeated the test with 2 different modules from Wanlida Group, I got the exact same freezing issue.

Any thoughts on how to solve this?
Attachments
wifi3_modules.jpg
wifi3_modules.jpg (79.09 KiB) Viewed 657 times
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby moon.linux » Thu Jun 07, 2018 6:22 pm

Can you provide the details of the lsmod and lssub -t of both these module to compare,
as the driver is common for both the device it should work out well.
I could not setup vncserver on odroidxu4 to connect from my windows 10 pc.

I have old Wifi 3 module with me, here are the details.
Code: Select all
odroid@odroid:~$ uname -a
Linux odroid 4.14.47-139 #1 SMP PREEMPT Sun Jun 3 20:08:16 -03 2018 armv7l armv7l armv7l GNU/Linux
odroid@odroid:~$
odroid@odroid:~$ lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
        |__ Port 1: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 2: Dev 4, If 0, Class=Vendor Specific Class, Driver=rtl8192cu, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
odroid@odroid:~$ lsmod
Module                  Size  Used by
rtl8xxxu              106496  0
rtl8192cu              81920  0
rtl_usb                20480  1 rtl8192cu
rtl8192c_common        49152  1 rtl8192cu
rtlwifi                73728  3 rtl_usb,rtl8192c_common,rtl8192cu
mac80211              614400  4 rtl_usb,rtlwifi,rtl8192cu,rtl8xxxu
cfg80211              479232  2 mac80211,rtlwifi
rfkill                 20480  3 cfg80211
iptable_filter         16384  0
fuse                   86016  3
cpufreq_conservative    16384  0
cpufreq_userspace      16384  0
cpufreq_powersave      16384  0
spidev                 20480  0
input_leds             16384  0
evdev                  24576  8
joydev                 20480  0
spi_s3c64xx            20480  0
gpio_keys              20480  0
uio_pdrv_genirq        16384  0
exynos_gpiomem         16384  0
uio                    16384  1 uio_pdrv_genirq
sch_fq_codel           20480  6
ip_tables              24576  1 iptable_filter
ipv6                  385024  60
usbhid                 45056  0
extcon_usb_gpio        16384  0
odroid@odroid:~$
moon.linux
 
Posts: 1137
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Fri Jun 08, 2018 12:06 pm

Hi moon.linux,

Here are the details from lsusb -t and lsmod.

Code: Select all
OLD MODULE:
odroid@odroid:~$ lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
        |__ Port 1: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
        |__ Port 1: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
        |__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 2: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 2: Dev 4, If 2, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=rtl8192cu, 480M
odroid@odroid:~$ lsmod
Module                  Size  Used by
aes_arm_bs             20480  0
crypto_simd            16384  1 aes_arm_bs
cryptd                 20480  1 crypto_simd
ccm                    20480  3
fuse                   86016  3
cpufreq_conservative    16384  0
cpufreq_userspace      16384  0
cpufreq_powersave      16384  0
rtl8xxxu              106496  0
binfmt_misc            20480  1
rtl8192cu              86016  0
rtl_usb                20480  1 rtl8192cu
rtl8192c_common        49152  1 rtl8192cu
rtlwifi                73728  3 rtl_usb,rtl8192c_common,rtl8192cu
mac80211              618496  4 rtl_usb,rtlwifi,rtl8192cu,rtl8xxxu
cfg80211              479232  2 mac80211,rtlwifi
rfkill                 20480  3 cfg80211
spidev                 20480  0
joydev                 20480  0
input_leds             16384  0
uvcvideo               77824  1
videobuf2_vmalloc      16384  1 uvcvideo
evdev                  24576  6
spi_s3c64xx            20480  0
gpio_keys              20480  0
extcon_usb_gpio        16384  0
exynos_gpiomem         16384  0
ipv6                  380928  96
hid_logitech_hidpp     28672  0
hid_logitech_dj        20480  0
usbhid                 45056  0


------------------------------
NEW MODULE:
odroid@odroid:~$ lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
        |__ Port 1: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
        |__ Port 1: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
        |__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 2: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 2: Dev 4, If 2, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=rtl8192cu, 480M
odroid@odroid:~$ lsmod
Module                  Size  Used by
aes_arm_bs             20480  0
crypto_simd            16384  1 aes_arm_bs
cryptd                 20480  1 crypto_simd
ccm                    20480  3
fuse                   86016  3
cpufreq_conservative    16384  0
cpufreq_userspace      16384  0
cpufreq_powersave      16384  0
rtl8xxxu              106496  0
binfmt_misc            20480  1
rtl8192cu              86016  0
rtl_usb                20480  1 rtl8192cu
rtl8192c_common        49152  1 rtl8192cu
rtlwifi                73728  3 rtl_usb,rtl8192c_common,rtl8192cu
mac80211              618496  4 rtl_usb,rtlwifi,rtl8192cu,rtl8xxxu
cfg80211              479232  2 mac80211,rtlwifi
rfkill                 20480  4 cfg80211
spidev                 20480  0
joydev                 20480  0
input_leds             16384  0
uvcvideo               77824  1
videobuf2_vmalloc      16384  1 uvcvideo
evdev                  24576  6
spi_s3c64xx            20480  0
gpio_keys              20480  0
extcon_usb_gpio        16384  0
exynos_gpiomem         16384  0
ipv6                  380928  96
hid_logitech_hidpp     28672  0
hid_logitech_dj        20480  0
usbhid                 45056  0



Don't worry too much about setting up vncserver. The freeze problem happens on ssh sessions too.
I've noticed that often the freeze happens when I scroll through a large file or stop a CPU hungry process (I have no metrics to really back that up though).
Hope that helps.
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby odroid » Fri Jun 08, 2018 2:45 pm

Do you use minimal Ubuntu image? or Mate Desktop image?

I've configured the wireless connection with "nmcli" and I can still access the SSH via new WiFi module 3.
Bus 003 Device 003: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
I'll keep testing the SSH connection stability a few more days.

I installed Ubuntu 18.04 minimal image.
https://wiki.odroid.com/odroid-xu4/os_images/linux/ubuntu_4.14/20180531
And used "nmcli" for the AP connection.
https://wiki.odroid.com/troubleshooting/minimal_image_wifi_setup_nmcli
User avatar
odroid
Site Admin
 
Posts: 28532
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby moon.linux » Fri Jun 08, 2018 5:01 pm

@clem
using https://wiki.odroid.com/accessory/conne ... fi/wlan_ap I configure the hostapd demon using
"Hostapd configuration for 2.4 Ghz configuration" on the odroid xu4 and it was no issue with old Wifi module 3,
I disconnected the ethernet from odroid xu4 and connected to the AP fro my windows 10 pc.
but I realize that 802.11n capability might differ from device to device.

Code: Select all
root@odroid:~# iw list
Wiphy phy0
        max # scan SSIDs: 4
        max scan IEs length: 2257 bytes
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports RSN-IBSS.
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP (00-0f-ac:4)
                * 00-0f-ac:10
                * GCMP (00-0f-ac:8)
                * 00-0f-ac:9
                * CMAC (00-0f-ac:6)
                * 00-0f-ac:13
                * 00-0f-ac:11
                * 00-0f-ac:12
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
                 * P2P-client
                 * P2P-GO
        Band 1:
                Capabilities: 0x186e
                        HT20/HT40
                        SM Power Save disabled
                        RX HT20 SGI
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 7935 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 16 usec (0x07)
                HT TX/RX MCS rate indexes supported: 0-7, 32
                Bitrates (non-HT):
                        * 1.0 Mbps
                        * 2.0 Mbps
                        * 5.5 Mbps
                        * 11.0 Mbps
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm)
                        * 2472 MHz [13] (20.0 dBm)
                        * 2484 MHz [14] (disabled)
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * start_ap
                 * new_station
                 * new_mpath
                 * set_mesh_config
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * join_mesh
                 * remain_on_channel
                 * set_tx_bitrate_mask
                 * frame
                 * frame_wait_cancel
                 * set_wiphy_netns
                 * set_channel
                 * set_wds_peer
                 * probe_client
                 * set_noack_map
                 * register_beacons
                 * start_p2p_device
                 * set_mcast_rate
                 * connect
                 * disconnect
                 * Unknown command (104)
                 * Unknown command (121)
        Supported TX frame types:
                 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        Supported RX frame types:
                 * IBSS: 0x40 0xb0 0xc0 0xd0
                 * managed: 0x40 0xd0
                 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * mesh point: 0xb0 0xc0 0xd0
                 * P2P-client: 0x40 0xd0
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * P2P-device: 0x40 0xd0
        software interface modes (can always be added):
                 * AP/VLAN
                 * monitor
        interface combinations are not supported
        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        Device supports TX status socket option.
        Device supports HT-IBSS.
        Device supports SAE with AUTHENTICATE command
        Device supports low priority scan.
        Device supports scan flush.
        Device supports AP scan.
        Device supports per-vif TX power setting
        Driver supports full state transitions for AP/GO clients
        Driver supports a userspace MPM

We can find tune the HT Capability depending on the hostapd.conf configuration.
so i modified the hostapd.conf to fine tune the device. still some more fine tuning can be done on hostapd.conf to make this work efficient.
Code: Select all
# N-WLAN
ieee80211n=1
ht_capab=[SHORT-GI-40][DSSS_CCK-20]
require_ht=0
obss_interval=0


For testing I checkout the kenrel source code from git repository and gave compilation with no issue, no freezing issue at my end.
moon.linux
 
Posts: 1137
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Sat Jun 09, 2018 2:30 pm

Thanks for the answer odroid and moon.linux.
To fine-tune the HT capability, is there a specific method to follow or is it more of a trial and error process with different ht_capab parameters?

I've also run more tests: the freeze happens only under heavy CPU load (I have a CPU hungry computer vision application running on the Odroid at the same time). Any ideas on how to troubleshoot? Maybe running an application to monitor dropped packets? Run hostapd in debug mode?
Other ideas?
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby moon.linux » Sat Jun 09, 2018 3:20 pm

to deluge hostpad deamon you need to compile the hostapd with.
Code: Select all
# Add support for writing debug log to a file: -f /tmp/hostapd.log
# Disabled by default.
CONFIG_DEBUG_FILE=y


And pass the log file to record the hostapd messages.
append as follow to /etc/defaults/hostapd
Code: Select all
DAEMON_OPTS="-B -f /tmp/hostapd.log"

Or you can manually run hostapd -dd -P /run/hostapd.pid -B -f /tmp/hostapd.log /etc/hostapd/hostapd.conf
option to print debug messages on console.
moon.linux
 
Posts: 1137
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Wed Jun 13, 2018 11:53 am

I've done more debugging, hope that helps solving the problem:

I'm running hostapd manually with this command: hostapd -dd -P /run/hostapd.pid -B -f /tmp/hostapd.log /etc/hostapd/hostapd.conf
I'm also running my computer vision script on the Odroid. I connect from my linux laptop using vncserver through the AP. I also run a ping from my laptop to the odroid. The ping gets an answer within 4ms under normal operation.
Everything is working fine until I try to connect my android phone to the AP and then the ping freezes.
At the same time in syslog the following pops up:

Code: Select all
Feb 11 20:16:58 odroid kernel: [  481.435226] rtlwifi: -----hwsec_cam_bitmap: 0x10 entry_idx=5


The hostapd log file seems to show what I think is a disactivation of the AP followed by a re-activation. Here is the part of the log that corresponds to the freeze:
Code: Select all
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0(00:1a:13:21:d6:58) A1=ff:ff:ff:ff:ff:ff A2=d0:04:01:28:8d:39
nl80211: MLME event frame - hexdump(len=89): 40 00 00 00 ff ff ff ff ff ff d0 04 01 28 8d 39 ff ff ff ff ff ff 80 3b 00 00 01 04 02 04 0b 16 32 08 0c 12 18 24 30 48 60 6c 03 01 08 2d 1a 6e 01 03 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 07 00 50 f2 08 00 00 00 7f 05 00 00 0a 02 01
nl80211: Frame event
nl80211: RX frame da=ff:ff:ff:ff:ff:ff sa=d0:04:01:28:8d:39 bssid=ff:ff:ff:ff:ff:ff freq=2437 ssi_signal=-46 fc=0x40 seq_ctrl=0x3b80 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=89
Ignore Probe Request due to DS Params mismatch: chan=6 != ds.chan=8
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0(00:1a:13:21:d6:58) A1=00:1a:13:21:d6:58 A2=d0:04:01:28:8d:39
nl80211: MLME event frame - hexdump(len=26): c0 00 3a 01 00 1a 13 21 d6 58 d0 04 01 28 8d 39 00 1a 13 21 d6 58 d0 3e 03 00
nl80211: Frame event
nl80211: RX frame da=00:1a:13:21:d6:58 sa=d0:04:01:28:8d:39 bssid=00:1a:13:21:d6:58 freq=2437 ssi_signal=-40 fc=0xc0 seq_ctrl=0x3ed0 stype=12 (WLAN_FC_STYPE_DEAUTH) len=26
wlan0: Event RX_MGMT (19) received
wlan0: mgmt::deauth
wlan0: deauthentication: STA=d0:04:01:28:8d:39 reason_code=3
wlan0: AP-STA-DISCONNECTED d0:04:01:28:8d:39
wlan0: STA d0:04:01:28:8d:39 WPA: event 3 notification
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0xa0ba8 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=d0:04:01:28:8d:39
WPA: d0:04:01:28:8d:39 WPA_PTK entering state DISCONNECTED
WPA: d0:04:01:28:8d:39 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0xa0ba8 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=d0:04:01:28:8d:39
nl80211: Set STA flags - ifname=wlan0 addr=d0:04:01:28:8d:39 total_flags=0x6 flags_or=0x0 flags_and=0xfffffffe authorized=0
wlan0: STA d0:04:01:28:8d:39 IEEE 802.1X: unauthorizing port
wlan0: STA d0:04:01:28:8d:39 IEEE 802.11: deauthenticated
wlan0: STA d0:04:01:28:8d:39 MLME: MLME-DEAUTHENTICATE.indication(d0:04:01:28:8d:39, 3)
wlan0: STA d0:04:01:28:8d:39 MLME: MLME-DELETEKEYS.request(d0:04:01:28:8d:39)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0xa0ba8 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=d0:04:01:28:8d:39
nl80211: sta_remove -> DEL_STATION wlan0 d0:04:01:28:8d:39 --> 0 (Success)
hostapd_ht_operation_update current operation mode=0x4
hostapd_ht_operation_update new operation mode=0x0 changes=1
nl80211: Set beacon (beacon_set=1)
nl80211: Beacon head - hexdump(len=58): 80 00 00 00 ff ff ff ff ff ff 00 1a 13 21 d6 58 00 1a 13 21 d6 58 00 00 00 00 00 00 00 00 00 00 64 00 31 04 00 07 4b 69 73 73 46 6c 79 01 08 82 84 8b 96 0c 12 18 24 03 01 06
nl80211: Beacon tail - hexdump(len=119): 2a 01 00 32 04 30 48 60 6c 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0d 00 2d 1a 2c 00 1f ff 00 00 00 01 00 00 00 00 00 96 00 01 00 00 00 00 00 00 00 00 00 00 3d 16 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 08 00 00 00 00 00 00 00 40 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
nl80211: ifindex=3
nl80211: beacon_int=100
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=7):
     4b 69 73 73 46 6c 79                              MyAccessPoint       
  * beacon_int=100
  * dtim_period=2
nl80211: hidden SSID not in use
nl80211: privacy=1
nl80211: auth_algs=0x1
nl80211: wpa_version=0x2
nl80211: key_mgmt_suites=0x2
nl80211: pairwise_ciphers=0x10
nl80211: group_cipher=0x10
nl80211: SMPS mode - off
nl80211: beacon_ies - hexdump(len=10): 7f 08 00 00 00 00 00 00 00 40
nl80211: proberesp_ies - hexdump(len=10): 7f 08 00 00 00 00 00 00 00 40
nl80211: assocresp_ies - hexdump(len=10): 7f 08 00 00 00 00 00 00 00 40
ap_free_sta: cancel ap_handle_timer for d0:04:01:28:8d:39
nl80211: Event message available
nl80211: Drv Event 20 (NL80211_CMD_DEL_STATION) received for wlan0
nl80211: Delete station d0:04:01:28:8d:39
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0(00:1a:13:21:d6:58) A1=ff:ff:ff:ff:ff:ff A2=f4:f5:d8:6c:0c:e8
nl80211: MLME event frame - hexdump(len=109): 40 00 00 00 ff ff ff ff ff ff f4 f5 d8 6c 0c e8 ff ff ff ff ff ff 30 c9 00 0c 4e 45 54 47 45 41 52 30 33 2d 35 47 01 08 02 04 0b 0c 12 16 18 24 03 01 04 2d 1a 62 00 03 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 08 e0 e1 09 00 32 04 30 48 60 6c 7f 08 00 00 00 00 20 00 00 40 bf 0c 30 70 c0 33 fc ff 24 01 fc ff 24 01
nl80211: Frame event
nl80211: RX frame da=ff:ff:ff:ff:ff:ff sa=f4:f5:d8:6c:0c:e8 bssid=ff:ff:ff:ff:ff:ff freq=2437 ssi_signal=-50 fc=0x40 seq_ctrl=0xc930 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=109
Ignore Probe Request due to DS Params mismatch: chan=6 != ds.chan=4
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0(00:1a:13:21:d6:58) A1=ff:ff:ff:ff:ff:ff A2=f4:f5:d8:6c:0c:e8
nl80211: MLME event frame - hexdump(len=109): 40 00 00 00 ff ff ff ff ff ff f4 f5 d8 6c 0c e8 ff ff ff ff ff ff 40 c9 00 0c 4e 45 54 47 45 41 52 30 33 2d 35 47 01 08 02 04 0b 0c 12 16 18 24 03 01 04 2d 1a 62 00 03 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 08 e0 e1 09 00 32 04 30 48 60 6c 7f 08 00 00 00 00 20 00 00 40 bf 0c 30 70 c0 33 fc ff 24 01 fc ff 24 01
nl80211: Frame event
nl80211: RX frame da=ff:ff:ff:ff:ff:ff sa=f4:f5:d8:6c:0c:e8 bssid=ff:ff:ff:ff:ff:ff freq=2437 ssi_signal=-50 fc=0x40 seq_ctrl=0xc940 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=109
Ignore Probe Request due to DS Params mismatch: chan=6 != ds.chan=4
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0(00:1a:13:21:d6:58) A1=ff:ff:ff:ff:ff:ff A2=f4:f5:d8:6c:0c:e8
nl80211: MLME event frame - hexdump(len=109): 40 00 00 00 ff ff ff ff ff ff f4 f5 d8 6c 0c e8 ff ff ff ff ff ff 50 c9 00 0c 4e 45 54 47 45 41 52 30 33 2d 35 47 01 08 02 04 0b 0c 12 16 18 24 03 01 04 2d 1a 62 00 03 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 08 e0 e1 09 00 32 04 30 48 60 6c 7f 08 00 00 00 00 20 00 00 40 bf 0c 30 70 c0 33 fc ff 24 01 fc ff 24 01
nl80211: Frame event
nl80211: RX frame da=ff:ff:ff:ff:ff:ff sa=f4:f5:d8:6c:0c:e8 bssid=ff:ff:ff:ff:ff:ff freq=2437 ssi_signal=-50 fc=0x40 seq_ctrl=0xc950 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=109
Ignore Probe Request due to DS Params mismatch: chan=6 != ds.chan=4
nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0(00:1a:13:21:d6:58) A1=ff:ff:ff:ff:ff:ff A2=f4:f5:d8:6c:0c:e8
nl80211: MLME event frame - hexdump(len=109): 40 00 00 00 ff ff ff ff ff ff f4 f5 d8 6c 0c e8 ff ff ff ff ff ff 60 c9 00 0c 4e 45 54 47 45 41 52 30 33 2d 35 47 01 08 02 04 0b 0c 12 16 18 24 03 01 04 2d 1a 62 00 03 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 08 e0 e1 09 00 32 04 30 48 60 6c 7f 08 00 00 00 00 20 00 00 40 bf 0c 30 70 c0 33 fc ff 24 01 fc ff 24 01
nl80211: Frame event


A quick googling for "rtlwifi hwsec_cam_bitmap" returns several bug reports linked to hostapd but I haven't found a definite explanation.
Any ideas?
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby moon.linux » Wed Jun 13, 2018 12:09 pm

Here is the reason code for deauthentication. Deauthenticated because sending station (STA) is leaving or has left Independent Basic Service Set (IBSS) or ESS.
https://www.cisco.com/assets/sol/sb/WAP ... odes2.html
Code: Select all
wlan0: deauthentication: STA=d0:04:01:28:8d:39 reason_code=3
wlan0: AP-STA-DISCONNECTED d0:04:01:28:8d:39
wlan0: STA d0:04:01:28:8d:39 WPA: event 3 notification

What would be the range of laptop to odroid xu4 ?
moon.linux
 
Posts: 1137
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Wed Jun 13, 2018 1:57 pm

They're about 3m away from each other.
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Wed Jun 13, 2018 2:04 pm

The IP address associated to that message (d0:04:01:28:8d:39) is my phone's (it's a Motorola)
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby moon.linux » Wed Jun 13, 2018 2:23 pm

On close inspection of the logs below it seen the sa=d0:04:01:28:8d:39 (mobile phone) is sending the disconnect request to access point 00:1a:13:21:d6:58 Odroid XU4, Please correct me if I am wrong.
The main reason could be that the interference of channel or low signal.

Do you observe the same on old Wifi Module 3 ?
Code: Select all
    nl80211: RX frame da=ff:ff:ff:ff:ff:ff sa=d0:04:01:28:8d:39 bssid=ff:ff:ff:ff:ff:ff freq=2437 ssi_signal=-46 fc=0x40 seq_ctrl=0x3b80 stype=4 (WLAN_FC_STYPE_PROBE_REQ) len=89
    Ignore Probe Request due to DS Params mismatch: chan=6 != ds.chan=8
    nl80211: Event message available
    nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0
    nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0(00:1a:13:21:d6:58) A1=00:1a:13:21:d6:58 A2=d0:04:01:28:8d:39
    nl80211: MLME event frame - hexdump(len=26): c0 00 3a 01 00 1a 13 21 d6 58 d0 04 01 28 8d 39 00 1a 13 21 d6 58 d0 3e 03 00
    nl80211: Frame event
    nl80211: RX frame da=00:1a:13:21:d6:58 sa=d0:04:01:28:8d:39 bssid=00:1a:13:21:d6:58 freq=2437 ssi_signal=-40 fc=0xc0 seq_ctrl=0x3ed0 stype=12 (WLAN_FC_STYPE_DEAUTH) len=26
    wlan0: Event RX_MGMT (19) received
    wlan0: mgmt::deauth
    wlan0: deauthentication: STA=d0:04:01:28:8d:39 reason_code=3
    wlan0: AP-STA-DISCONNECTED d0:04:01:28:8d:39
    wlan0: STA d0:04:01:28:8d:39 WPA: event 3 notification
    wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0xa0ba8 key_idx=0 set_tx=1 seq_len=0 key_len=0
       addr=d0:04:01:28:8d:39
moon.linux
 
Posts: 1137
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Wed Jun 13, 2018 3:22 pm

Hi moon.linux,

I just did some tests with the old wifi module. The same problem happens. So it looks like this might not be a hardware issue but more a software one?
At the time of freeze I get the same syslog message:
Code: Select all
Feb 11 20:16:58 odroid kernel: [  481.435226] rtlwifi: -----hwsec_cam_bitmap: 0x10 entry_idx=5


When I run iwconfig on my laptop while it's connected to the AP I get the following (see signal level):
Code: Select all
wlan0     IEEE 802.11bgn  ESSID:"MyAccessPoint" 
          Mode:Managed  Frequency:2.437 GHz  Access Point: 7C:DD:90:62:46:58   
          Bit Rate=72.2 Mb/s   Tx-Power=14 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=70/70  Signal level=-31 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:55   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.


The MAC address of my Wifi card is 74:e5:0b:a1:c2:5e

I've attached the hostapd.log lof file to this message so it's easier to troubleshoot. The freeze happens around line 3310.
Which time zone are you on by the way? (it'll help me plan when I can work on this :) )
Attachments
hostapd.log
(1.05 MiB) Downloaded 33 times
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby moon.linux » Wed Jun 13, 2018 4:34 pm

Can you share your hostapd.conf so that we will be working on same page.

Actuality I searched for hostapd.conf for rtl8192cu but could not find any information of tuning ht_capability for wlan0.
Here is small changes hostapd.conf
Code: Select all
odroid@odroid:~$ cat /etc/hostapd/hostapd.conf
# HostAPD

# Interface
interface=wlan0

# driver
driver=nl80211

# Logging
logger_syslog=-1
logger_syslog_level=3
logger_stdout=-1
logger_stdout_level=2

# CTRL-Interface
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

# WLAN
country_code=KR
ssid=MyAccessPoint
hw_mode=g
channel=8
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
preamble=1

# WPA2
wpa=2                            # WPA2 only
wpa_passphrase=hardkernel
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=3                      # 1=wpa, 2=wep, 3=both
macaddr_acl=0
wmm_enabled=1
eap_reauth_period=360000
fragm_threshold=2346
rsn_preauth=1
rsn_preauth_interfaces=wlan0
wpa_group_rekey=600
wpa_ptk_rekey=600
wpa_gmk_rekey=86400

# N-WLAN
ieee80211n=1
ht_capab=[SHORT-GI-40][DSSS_CCK-20][HT40+]
require_ht=1
obss_interval=0

For testing could you comment out the #N-WLAN section to disable ht_capability

If needed I will try to create guide line for brigde interface with wlan0 and eth0 to make AP work.
moon.linux
 
Posts: 1137
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Thu Jun 14, 2018 4:04 pm

I've tried the modified hostapd.conf above but it didn't fix the problem.

Then I commented out the # N-VLAN section and now the problem is gone. No more AP freeze: I'm able to both remote desktop from my linux laptop and connect from my phone at the same time. The ping from my laptop shows no delay.
I'll do more tests in the coming days but It seems to have fixed it.(Any idea why ht_capability is creating issues?)
Great job moon.linux!
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby moon.linux » Thu Jun 14, 2018 4:29 pm

Actually wireless device have antenna to support RX TX so ht_capability are used to tune the channel bandwidth
and multiple input multiple output (MIMO) for faster data flow. So most of the router will have more that 2 antenna
to help faster data transfer. USB wifi modules just dont support antenna (MIMO) as feature.
moon.linux
 
Posts: 1137
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Wed Jun 27, 2018 12:17 pm

I've done more tests. Unfortunately the AP freeze issue is still happening. There is also another issue where at boot the AP just refuses any connections from clients (this happens about once every 10 boot). Once I reboot usually the problem goes away.

To troublesshoot the freeze issue I've done some extra monitoring. Here is the setup:
1)Odroid running AP on module 3
2)Laptop connected to the AP + ssh into the Odroid + ping the AP
3)Android phone connected to the AP + run some tests (ping and download TCP packets)

Here are some things I've noticed:
    Often the throughput of the AP is really low (about 0.5Mb/s on average) and it transmits by bursts every 3s with periods of inactivity inbetween bursts (see graph below). Some other times it will transmit fine at a constant speed of about 11Mb/s
    The freeze seems random: sometimes when I launch a download test it freezes, sometimes it doesn't (although it seems to increase the chance of a freeze). Sometimes it freezes randomly (no download ongoing and no CPU load that I can see with top)
    The ping answer time always starts getting very long (up to 14s, see below) before the AP freezes
    The freeze happens on my Odroid with kernel 4.14.47-132 but it has never happened on my older machine running kernel 3.10.82-39 (hostapd was using a different driver, rtl871xdrv, on that kernel instead of nl80211)

Here are some measurements from one of the tests I've run:

Results from ping from laptop to Odroid (see long ping times at the bottom)
Code: Select all
64 bytes from 192.168.13.1: icmp_seq=27406 ttl=64 time=15.3 ms<=== start download test from phone
64 bytes from 192.168.13.1: icmp_seq=27407 ttl=64 time=27.4 ms
64 bytes from 192.168.13.1: icmp_seq=27408 ttl=64 time=41.9 ms
64 bytes from 192.168.13.1: icmp_seq=27409 ttl=64 time=206 ms
64 bytes from 192.168.13.1: icmp_seq=27410 ttl=64 time=1165 ms
64 bytes from 192.168.13.1: icmp_seq=27411 ttl=64 time=167 ms
64 bytes from 192.168.13.1: icmp_seq=27412 ttl=64 time=313 ms
64 bytes from 192.168.13.1: icmp_seq=27413 ttl=64 time=104 ms
64 bytes from 192.168.13.1: icmp_seq=27414 ttl=64 time=3.62 ms
64 bytes from 192.168.13.1: icmp_seq=27415 ttl=64 time=46.7 ms
64 bytes from 192.168.13.1: icmp_seq=27416 ttl=64 time=431 ms
64 bytes from 192.168.13.1: icmp_seq=27417 ttl=64 time=51.8 ms
64 bytes from 192.168.13.1: icmp_seq=27418 ttl=64 time=149 ms
64 bytes from 192.168.13.1: icmp_seq=27419 ttl=64 time=72.3 ms
64 bytes from 192.168.13.1: icmp_seq=27420 ttl=64 time=2.16 ms
64 bytes from 192.168.13.1: icmp_seq=27421 ttl=64 time=50.0 ms
64 bytes from 192.168.13.1: icmp_seq=27422 ttl=64 time=41.6 ms
64 bytes from 192.168.13.1: icmp_seq=27423 ttl=64 time=4.60 ms
64 bytes from 192.168.13.1: icmp_seq=27424 ttl=64 time=62.6 ms
64 bytes from 192.168.13.1: icmp_seq=27425 ttl=64 time=117 ms
64 bytes from 192.168.13.1: icmp_seq=27426 ttl=64 time=39.6 ms
64 bytes from 192.168.13.1: icmp_seq=27427 ttl=64 time=55.8 ms
64 bytes from 192.168.13.1: icmp_seq=27428 ttl=64 time=5052 ms
64 bytes from 192.168.13.1: icmp_seq=27429 ttl=64 time=7123 ms
64 bytes from 192.168.13.1: icmp_seq=27430 ttl=64 time=7527 ms
64 bytes from 192.168.13.1: icmp_seq=27431 ttl=64 time=8019 ms
64 bytes from 192.168.13.1: icmp_seq=27432 ttl=64 time=8053 ms
64 bytes from 192.168.13.1: icmp_seq=27433 ttl=64 time=7722 ms
64 bytes from 192.168.13.1: icmp_seq=27434 ttl=64 time=8382 ms
64 bytes from 192.168.13.1: icmp_seq=27435 ttl=64 time=8442 ms
64 bytes from 192.168.13.1: icmp_seq=27436 ttl=64 time=8801 ms
64 bytes from 192.168.13.1: icmp_seq=27437 ttl=64 time=9140 ms
64 bytes from 192.168.13.1: icmp_seq=27438 ttl=64 time=9538 ms
64 bytes from 192.168.13.1: icmp_seq=27439 ttl=64 time=10140 ms
64 bytes from 192.168.13.1: icmp_seq=27440 ttl=64 time=10375 ms
64 bytes from 192.168.13.1: icmp_seq=27441 ttl=64 time=10927 ms
64 bytes from 192.168.13.1: icmp_seq=27442 ttl=64 time=11299 ms
64 bytes from 192.168.13.1: icmp_seq=27443 ttl=64 time=11628 ms
64 bytes from 192.168.13.1: icmp_seq=27444 ttl=64 time=11849 ms
64 bytes from 192.168.13.1: icmp_seq=27445 ttl=64 time=12287 ms
64 bytes from 192.168.13.1: icmp_seq=27446 ttl=64 time=12476 ms
64 bytes from 192.168.13.1: icmp_seq=27447 ttl=64 time=12432 ms
64 bytes from 192.168.13.1: icmp_seq=27448 ttl=64 time=12569 ms
64 bytes from 192.168.13.1: icmp_seq=27449 ttl=64 time=13332 ms
64 bytes from 192.168.13.1: icmp_seq=27450 ttl=64 time=14004 ms
64 bytes from 192.168.13.1: icmp_seq=27451 ttl=64 time=14286 ms
64 bytes from 192.168.13.1: icmp_seq=27452 ttl=64 time=13325 ms
64 bytes from 192.168.13.1: icmp_seq=27453 ttl=64 time=12332 ms
64 bytes from 192.168.13.1: icmp_seq=27454 ttl=64 time=11354 ms
64 bytes from 192.168.13.1: icmp_seq=27455 ttl=64 time=10424 ms
64 bytes from 192.168.13.1: icmp_seq=27456 ttl=64 time=9513 ms
64 bytes from 192.168.13.1: icmp_seq=27457 ttl=64 time=8533 ms
64 bytes from 192.168.13.1: icmp_seq=27465 ttl=64 time=13632 ms
64 bytes from 192.168.13.1: icmp_seq=27466 ttl=64 time=13455 ms
64 bytes from 192.168.13.1: icmp_seq=27467 ttl=64 time=13367 ms
64 bytes from 192.168.13.1: icmp_seq=27468 ttl=64 time=13193 ms
64 bytes from 192.168.13.1: icmp_seq=27469 ttl=64 time=12728 ms
64 bytes from 192.168.13.1: icmp_seq=27470 ttl=64 time=12298 ms
64 bytes from 192.168.13.1: icmp_seq=27471 ttl=64 time=11991 ms
64 bytes from 192.168.13.1: icmp_seq=27472 ttl=64 time=12040 ms
64 bytes from 192.168.13.1: icmp_seq=27473 ttl=64 time=12548 ms
64 bytes from 192.168.13.1: icmp_seq=27474 ttl=64 time=13256 ms
64 bytes from 192.168.13.1: icmp_seq=27475 ttl=64 time=13435 ms
64 bytes from 192.168.13.1: icmp_seq=27476 ttl=64 time=13725 ms
64 bytes from 192.168.13.1: icmp_seq=27477 ttl=64 time=14703 ms
64 bytes from 192.168.13.1: icmp_seq=27478 ttl=64 time=15642 ms
64 bytes from 192.168.13.1: icmp_seq=27479 ttl=64 time=16164 ms
64 bytes from 192.168.13.1: icmp_seq=27480 ttl=64 time=16249 ms
64 bytes from 192.168.13.1: icmp_seq=27481 ttl=64 time=16561 ms
64 bytes from 192.168.13.1: icmp_seq=27482 ttl=64 time=16803 ms
64 bytes from 192.168.13.1: icmp_seq=27483 ttl=64 time=16880 ms
64 bytes from 192.168.13.1: icmp_seq=27484 ttl=64 time=17215 ms
64 bytes from 192.168.13.1: icmp_seq=27485 ttl=64 time=17329 ms
64 bytes from 192.168.13.1: icmp_seq=27486 ttl=64 time=17716 ms
64 bytes from 192.168.13.1: icmp_seq=27487 ttl=64 time=17687 ms
64 bytes from 192.168.13.1: icmp_seq=27488 ttl=64 time=17721 ms
64 bytes from 192.168.13.1: icmp_seq=27489 ttl=64 time=18328 ms
64 bytes from 192.168.13.1: icmp_seq=27490 ttl=64 time=19170 ms
64 bytes from 192.168.13.1: icmp_seq=27491 ttl=64 time=19115 ms
64 bytes from 192.168.13.1: icmp_seq=27492 ttl=64 time=18761 ms
64 bytes from 192.168.13.1: icmp_seq=27493 ttl=64 time=18439 ms
64 bytes from 192.168.13.1: icmp_seq=27494 ttl=64 time=17936 ms
64 bytes from 192.168.13.1: icmp_seq=27495 ttl=64 time=18205 ms
64 bytes from 192.168.13.1: icmp_seq=27496 ttl=64 time=17603 ms
64 bytes from 192.168.13.1: icmp_seq=27497 ttl=64 time=16627 ms
64 bytes from 192.168.13.1: icmp_seq=27498 ttl=64 time=15654 ms
64 bytes from 192.168.13.1: icmp_seq=27499 ttl=64 time=14680 ms <=== freeze

Ping times are fine after disconnect and reconnect to the AP:
64 bytes from 192.168.13.1: icmp_seq=27548 ttl=64 time=19.5 ms
64 bytes from 192.168.13.1: icmp_seq=27549 ttl=64 time=2.24 ms
64 bytes from 192.168.13.1: icmp_seq=27550 ttl=64 time=2.19 ms
64 bytes from 192.168.13.1: icmp_seq=27551 ttl=64 time=42.9 ms
64 bytes from 192.168.13.1: icmp_seq=27552 ttl=64 time=9.67 ms


Output from the download test from the android phone using Wifi Speed Test app (notice the bursts and very low speed):
wifi_test.jpg
wifi_test.jpg (174.81 KiB) Viewed 390 times


Output from syslog during the freeze: nothing noticeable except the laptop and the phone reconnecting manually after the freeze:

Code: Select all
Feb 11 16:46:50 odroid ntpd[1230]: error resolving pool ntp.ubuntu.com: Temporary failure in name resolution (-3)
Feb 11 16:46:50 odroid ntpd[1230]: error resolving pool 0.ubuntu.pool.ntp.org: Temporary failure in name resolution (-3)
Feb 11 16:47:03 odroid hostapd: wlan0: STA 74:e5:0b:a1:c2:5e RADIUS: starting accounting session 8442A1CECA861070
Feb 11 16:47:03 odroid hostapd: wlan0: STA 74:e5:0b:a1:c2:5e WPA: pairwise key handshake completed (RSN)
Feb 11 16:47:03 odroid kernel: [ 1149.588599] rtlwifi: -----hwsec_cam_bitmap: 0x20 entry_idx=4
Feb 11 16:47:47 odroid ntpd[1230]: error resolving pool 2.ubuntu.pool.ntp.org: Temporary failure in name resolution (-3)
Feb 11 16:47:47 odroid rsyslogd-2007: action 'action 10' suspended, next retry is Thu Feb 11 16:48:47 2016 [v8.16.0 try http://www.rsyslog.com/e/2007 ]
Feb 11 16:47:48 odroid ntpd[1230]: error resolving pool 1.ubuntu.pool.ntp.org: Temporary failure in name resolution (-3)
Feb 11 16:47:49 odroid ntpd[1230]: error resolving pool 3.ubuntu.pool.ntp.org: Temporary failure in name resolution (-3)
Feb 11 16:47:52 odroid hostapd: wlan0: STA 74:e5:0b:a1:c2:5e IEEE 802.11: authenticated
Feb 11 16:47:52 odroid hostapd: wlan0: STA 74:e5:0b:a1:c2:5e IEEE 802.11: associated (aid 1)
Feb 11 16:47:52 odroid hostapd: wlan0: STA 74:e5:0b:a1:c2:5e RADIUS: starting accounting session 339FFAC4A68BDC9B
Feb 11 16:47:52 odroid hostapd: wlan0: STA 74:e5:0b:a1:c2:5e WPA: pairwise key handshake completed (RSN)
Feb 11 16:47:52 odroid kernel: [ 1198.277478] rtlwifi: -----hwsec_cam_bitmap: 0x20 entry_idx=4
Feb 11 16:47:52 odroid hostapd: wlan0: STA 74:e5:0b:a1:c2:5e IEEE 802.11: authenticated
Feb 11 16:47:52 odroid hostapd: wlan0: STA 74:e5:0b:a1:c2:5e IEEE 802.11: associated (aid 1)
Feb 11 16:47:52 odroid hostapd: wlan0: STA 74:e5:0b:a1:c2:5e RADIUS: starting accounting session BB9950DA3120B245
Feb 11 16:47:52 odroid kernel: [ 1198.318166] rtlwifi: -----hwsec_cam_bitmap: 0x20 entry_idx=4
Feb 11 16:47:52 odroid hostapd: wlan0: STA 74:e5:0b:a1:c2:5e WPA: pairwise key handshake completed (RSN)
Feb 11 16:47:55 odroid ntpd[1230]: error resolving pool ntp.ubuntu.com: Temporary failure in name resolution (-3)
Feb 11 16:47:57 odroid ntpd[1230]: error resolving pool 0.ubuntu.pool.ntp.org: Temporary failure in name resolution (-3)
Feb 11 16:48:11 odroid hostapd: wlan0: STA 74:e5:0b:a1:c2:5e WPA: group key handshake completed (RSN)
Feb 11 16:48:11 odroid hostapd: wlan0: STA d0:04:01:28:8d:39 WPA: group key handshake completed (RSN)
Feb 11 16:48:53 odroid ntpd[1230]: error resolving pool 3.ubuntu.pool.ntp.org: Temporary failure in name resolution (-3)
Feb 11 16:48:53 odroid rsyslogd-2007: action 'action 10' suspended, next retry is Thu Feb 11 16:49:53 2016 [v8.16.0 try http:/


I also checked if the issue could be coming from a lack of entropy as suggested here https://stackoverflow.com/a/38173266/9172578
It turns out the entropy is doing fine during the freeze, it's even increasing (above 3300) during the download tests.

I'm kind of stuck right now... if you have any ideas on tools or tests I could run to dig deeper to find the root cause of the problem, that would be awesome.
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby moon.linux » Wed Jun 27, 2018 12:49 pm

Just share your hostapd.conf file for quick testing
moon.linux
 
Posts: 1137
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Wed Jun 27, 2018 2:16 pm

Here it is:

Code: Select all
# HostAPD

# Interface
interface=wlan0

# driver
driver=nl80211

# Logging is disabled to make sure we run lean
#logger_syslog=-1
#logger_syslog_level=3
#logger_stdout=-1
#logger_stdout_level=2

# CTRL-Interface
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

# WLAN
country_code=US
ssid=myAccessPoint
hw_mode=g
channel=6
beacon_int=100
dtim_period=2
max_num_sta=255
#rts_threshold=2347
#fragm_threshold=2346
#preamble=1

# WPA2
wpa=2                            # WPA2 only
wpa_passphrase=Born2BeairBorn
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=3                      # 1=wpa, 2=wep, 3=both
macaddr_acl=0
wmm_enabled=1
#eap_reauth_period=360000
rsn_preauth=1
#rsn_preauth_interfaces=wlan0
wpa_group_rekey=600
wpa_ptk_rekey=600
wpa_gmk_rekey=86400

# N WLAN
#ieee80211n=1
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Tue Jul 03, 2018 2:02 am

Any luck with the testing moon.linux?
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby moon.linux » Tue Jul 03, 2018 4:20 pm

I tried to debug this issue but I failed to find the root cause of the failure.
I will keep looking into this for different solution. mostly I get following log on failure.
Code: Select all
odroid login: [   16.980063] rtl_usb: reg 0xe08, usbctrl_vendorreq TimeOut! status:0xffffffed value=0x180037
[   16.986963] rtl_usb: reg 0x86c, usbctrl_vendorreq TimeOut! status:0xffffffed value=0x30071
[   16.995212] rtl_usb: reg 0x86c, usbctrl_vendorreq TimeOut! status:0xffffffed value=0x10019
[   17.003448] rtl_usb: reg 0x838, usbctrl_vendorreq TimeOut! status:0xffffffed value=0x30000


Hostapd failed with

Code: Select all
Configuration file: /etc/hostapd/hostapd.conf
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Using interface wlan0 with hwaddr 6c:fd:b9:65:e6:ad and ssid "odroidn"
random: Cannot read from /dev/random: Resource temporarily unavailable
random: Only 0/20 bytes of strong random data available from /dev/random
random: Not enough entropy pool available for secure operations
WPA: Not enough entropy in random pool for secure operations - update keys later when the first station connects
wlan0: interface state COUNTRY_UPDATE->ENABLED
wlan0: AP-ENABLED
wlan0: STA 38:f8:89:b7:f8:2a IEEE 802.11: authenticated
wlan0: INTERFACE-DISABLED
wlan0: INTERFACE-ENABLED
Failed to set beacon parameters
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
moon.linux
 
Posts: 1137
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: New WiFi module 3 drops connection in Access Point mode

Unread postby clem » Fri Jul 06, 2018 6:47 am

Interesting... my hostapd doesn't have this issue on startup.
It looks like you have an issue reading from the entropy file. Maybe that link would help? https://codz.me/2017/06/10/can-not-read ... ev-random/
clem
 
Posts: 28
Joined: Sat Apr 30, 2016 3:30 pm
languages_spoken: english
ODROIDs: XU4


Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 2 guests