Hardkernel Wifi Module 5B not working (Odroid-N2+)

This is almost immediate:

[ 224.476519@2] usb 1-1.4: new high-speed USB device number 7 using xhci-hcd
[ 224.600748@2] usb 1-1.4: New USB device found, idVendor=0bda, idProduct=1a2b
[ 224.600750@2] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 224.600751@2] usb 1-1.4: Product: DISK
[ 224.600753@2] usb 1-1.4: Manufacturer: Realtek
[ 224.601087@2] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 224.604119@2] scsi host0: usb-storage 1-1.4:1.0
[ 224.742477@2] usb 1-1.4: USB disconnect, device number 7
[ 224.988542@2] usb 1-1.4: new high-speed USB device number 8 using xhci-hcd
[ 225.112837@2] usb 1-1.4: New USB device found, idVendor=0bda, idProduct=c820
[ 225.112842@2] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 225.112844@2] usb 1-1.4: Product: 802.11ac NIC
[ 225.112845@2] usb 1-1.4: Manufacturer: Realtek
[ 225.112847@2] usb 1-1.4: SerialNumber: 123456
[ 225.227001@0] Bluetooth: hci0: rtl: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8821
[ 225.227008@0] Bluetooth: hci0: rtl: loading rtl_bt/rtl8821c_config.bin
[ 225.227142@0] Bluetooth: hci0: rtl: loading rtl_bt/rtl8821c_fw.bin
[ 225.227982@0] Bluetooth: hci0: rom_version status=0 version=1
[ 225.228037@0] Bluetooth: cfg_sz 10, total size 31990
[ 226.129091@1] start_addr=(0x8000), end_addr=(0x10000), buffer_size=(0x8000), smp_number_max=(4096)
[ 226.156351@0] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 226.156379@0] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

Problem solved then? The solution is to run usb_modeswitch from udev rule?

YES :slight_smile: Thanks for the help.
Might worth the addition in the standard configuration for other users…

1 Like

Can you please try this rule?

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)

# put wifi module from storage to wifi mode
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", \
  RUN+="/bin/sh -c 'export usb_modeswitch=/storage/.kodi/addons/virtual.system-tools/bin/usb_modeswitch; [ -x ${usb_modeswitch} ] && ${usb_modeswitch} -KW -v ${ID_VENDOR_ID} -p ${ID_MODEL_ID} || echo usb_modeswitch: please install system-tools addon >/dev/kmsg'"

If will work then this rule will be added to the image itself. And user just need to install system-tools addon without adding extra rule.

Yes it works fine (although I only tested it with the system tools addon installed).

tbh, I still don’t understand why udev behaves differently from autostart.sh, when comparing dmesg logs, the only different trace displayed is “usb 1-1.4: reset high-speed USB device number 3 using xhci-hcd” (when it is stuck).
I suspect something is locking/attempting to mount the cdrom and delays usb_modeswitch (and that would explain why the delay is random).
With udev, the modeswitch happens immediatly and this shaddy “reset high-speed” thing has no opportunity to trigger before.

Thank you.

Maybe there is some difference when the storage is mounted it must be unmounted first before it can be switched to wifi mode.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.