Hi @weidong_sun ,
First of all, thanks for all your inputs, man. It was really helpful.
Just to get you the context. We also had another thread where you suggested the NXP's secure USB8997 driver. [Issue ticket Link FYR]
Now replying to this Issue: It worked after I used the combo fw.
Current status:
1. Driver loading - Done
2. Getting the mlan interface - Done
3. Set the board in AP/STA mode - Done
4. Connect Ubuntu PC with the baord's SSID - Done
5. While checking the bandwidth using iperf3, it is continuously disconnecting. The connection is not stable. [Also, when we use the board as STA, we sometimes face a similar issue. ] - Not Working.
Can you please help me with this? Any insights from your side would be really helpful.
Below are the steps I am following. Please review it and LMK if I have overlooked anything.
1. Got the driver for USB8997. Built and compiled it for my board. (I have used the *GPL folder and added the *mlan related source in it, which got me mlan.ko and usb8997.ko. I have not added any app or other folders)
2. insmod mlan.ko
3. insmod usb8997.ko mod_para=wifi_mod_para.conf fw_name=usbusb8997_combo_v4.bin
4. wifi_mod_para.conf has below details:
USB8997 = {
cfg80211_wext=0xf
wfd_name=p2p
max_vir_bss=1
cal_data_cfg=none
drv_mode=7
}
5. ifconfig mlan0 192.168.2.1 netmask 255.255.255.0
6. route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1
7. dnsmasq -C dnsmasq.conf
dnsmasq.conf has below content:
interface=mlan0
dhcp-range=192.168.2.3,192.168.2.230,12h
8. hostapd -d hostapd_2ghz.conf -B
hostapd_2ghz.conf content is as below:
# 802.11b/g/n with WPA2-PSK
# the interface used by the AP
interface=mlan0
# "g" simply means 2.4GHz band
hw_mode=g
# the channel to use
channel=10
# limit the frequencies used to those allowed in the country
ieee80211d=1
# the country code
country_code=US
# 802.11n support
ieee80211n=1
# QoS support, also required for full speed on 802.11n/ac/ax
wmm_enabled=1
# the name of the AP
ssid=<name>
# 1=wpa, 2=wep, 3=both
auth_algs=1
# WPA2 only
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=<pass>
#1 - only open system authentication
#2 - both open system authentication and shared key authentication
auth_algs=2
[Below are all the logs which I have came accross]
1. After doing all this above steps, when the device was connect to my board ssid and I started iperf3 I got the below prints:
wlan: UAP/GO add peer station, address =ea:XX:XX:XX:ab:41
wlan: HostMlme mlan0 send assoc/reassoc resp
wlan: deauth station ea:XX:XX:XX:ab:41
wlan: UAP/GO add peer station, address =ea:XX:XX:XX:ab:41
wlan: HostMlme mlan0 send assoc/reassoc resp
wlan: deauth station ea:XX:XX:XX:ab:41
wlan: UAP/GO add peer station, address =ea:XX:XX:XX:ab:41
wlan: HostMlme mlan0 send assoc/reassoc resp
wlan: deauth station ea:XX:XX:XX:ab:41
#
# iperf3 -c 192.168.2.30
Connecting to host 192.168.2.30, port 5201
[ 4] local 192.168.2.1 port 35222 connected to 192.168.2.30 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 28.3 KBytes 231 Kbits/sec 2 1.41 KBytes
[ 4] 1.00-2.00 sec 87.7 KBytes 719 Kbits/sec 11 14.1 KBytes
Card is removed: -71
Card is removed: -71
Card is removed: -104
Card is removed: -104
Card is removed: -104
Card is removed: -104
Card is removed: -104
Block woal_cfg80211_del_beacon in abnormal driver state
woal_close: woal_disconnect failed
[ 4] 2.00-3.01 sec 324 KBytes 2.63 Mbits/sec 0 29.7 KBytes
Fail to get ap channel
USB: unregister device
Free module params
[ 4] 3.01-4.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes
USB probe: idVendor=1286 idProduct=2052 bInterfaceNumber=0
VID/PID = 1286/2052, Boot2 version = 4000
Attach moal handle ops, card interface type: 0x404
USB8997: init module param from usr cfg
card_type: USB8997, config block: 0
cfg80211_wext=0xf
wfd_name=p2p
max_vir_bss=1
cal_data_cfg=none
drv_mode = 7
rx_work=0 cpu_num=1
Request firmware: usbusb8997_combo_v4.bin
[ 4] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes
USB: unregister device
Free module params
[ 4] 5.00-6.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes
USB probe: idVendor=1286 idProduct=204e bInterfaceNumber=0
VID/PID = 1286/204E, Boot2 version = 3201
woal_usb_probe: invalid endpoint assignment
USB probe: idVendor=1286 idProduct=204e bInterfaceNumber=0
VID/PID = 1286/204E, Boot2 version = 3201
woal_usb_probe: invalid endpoint assignment
USB probe: idVendor=1286 idProduct=204e bInterfaceNumber=0
VID/PID = 1286/204E, Boot2 version = 3201
Attach moal handle ops, card interface type: 0x404
USB8997: init module param from usr cfg
card_type: USB8997, config block: 0
cfg80211_wext=0xf
wfd_name=p2p
max_vir_bss=1
cal_data_cfg=none
drv_mode = 7
rx_work=0 cpu_num=1
WLAN FW is active
Register NXP 802.11 Adapter mlan0
[ 4] 6.00-7.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes
Register NXP 802.11 Adapter uap0
Register NXP 802.11 Adapter p2p0
wlan: version = USB8997---16.197.121.p1-MX5X16505.p7.2-(FP197)
[ 4] 7.00-8.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes
2. Relevant Kernel Logs During Failure (AP Mode + iperf3):
[ 833.674061] usb 3-1: USB disconnect, device number 7
[ 833.687637] mwifiex_usb 3-1:1.0: card is removed: -71
[ 833.687641] mwifiex_usb 3-1:1.0: info: shutdown mwifiex...
[ 834.085604] usb 3-1: new high-speed USB device number 8 using xhci_hcd
[ 834.235672] usb 3-1: New USB device found, idVendor=1286, idProduct=204e, bcdDevice= 0.01
[ 834.235681] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 834.235686] usb 3-1: Product: USB WLAN
[ 834.235690] usb 3-1: Manufacturer: Marvell
[ 834.235694] usb 3-1: SerialNumber: 000000000000
[ 834.327309] mwifiex_usb 3-1:1.0: WLAN FW is active
[ 834.421334] mwifiex_usb 3-1:1.0: CMD_RESP: cmd 0x103 error, result=0x1
[ 834.421340] mwifiex_usb 3-1:1.0: mwifiex_process_cmdresp: cmd 0x8010 failed during reinit
[ 834.421344] mwifiex_usb 3-1:1.0: info: mwifiex_init_fw complete
3. Extended Error Logs: Firmware Dump Failures & USB Resets
[ 945.120387] mwifiex_usb 3-1:1.0: CMD_RESP: cmd 0x20 error, result=0x1 [ 945.120393] mwifiex_usb 3-1:1.0: mwifiex_process_cmdresp: cmd 0x1020 failed during INIT
[ 945.565442] mwifiex_usb 3-1:1.0: info: trying to get firmware dump for reinit [ 945.565454] mwifiex_usb 3-1:1.0: info: firmware dump is not supported [ 945.565463] mwifiex_usb 3-1:1.0: info: shutdown mwifiex...
[ 947.589326] mwifiex_usb 3-1:1.0: wlan0: CMD_RESP: cmd 0xb1 error, result=0x1 [ 947.589332] mwifiex_usb 3-1:1.0: mwifiex_process_cmdresp: cmd 0x20b1 failed [ 947.589337] mwifiex_usb 3-1:1.0: wlan0: scan failed
[ 949.243824] usb 3-1: USB disconnect, device number 12 [ 949.243838] mwifiex_usb 3-1:1.0: card is removed: -108 [ 949.243843] mwifiex_usb 3-1:1.0: info: shutdown mwifiex...
[ 951.454882] usb 3-1: new high-speed USB device number 13 using xhci_hcd [ 951.604793] usb 3-1: New USB device found, idVendor=1286, idProduct=204e, bcdDevice= 0.01 [ 951.604796] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 951.604798] usb 3-1: Product: USB WLAN [ 951.604799] usb 3-1: Manufacturer: Marvell [ 951.604800] usb 3-1: SerialNumber: 0000000000000001