New WiFi module 3 drops connection in Access Point mode

Moderators: odroid, mdrjr

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 226 times
clem
 
Posts: 24
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: 1074
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: 24
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: 27934
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: 1074
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: 24
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: 1074
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: 24
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: 1074
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: 24
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: 24
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: 1074
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 8 times
clem
 
Posts: 24
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: 1074
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: 24
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: 1074
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english


Return to Hardware and peripherals

Who is online

Users browsing this forum: Un4Seen and 3 guests