Wifi dongle 5B Odroid

Hi All, I experience the same issue with the 5B wifi dongle. It is not detected in CE. I tried with latest nightly but does not have improvement.

I found this closed topic
https://discourse.coreelec.org/t/hardkernel-wifi-module-5b-not-working-odroid-n2/16226?u=jbc41

However, being newbie with both CE and odroid I don’t know how to use it. Can someone explain please?

First you need to plug an ethernet cable for network access.
Then you need to install the addon “System Tools” from coreelec (which will install usb_modeswitch).
Then you need to SSH into your odroid and create a rule in ~/.config/udev.rules.d such as the one I posted in the thread you mentionned, unplug/replug the 5B module or reboot.
This will ensure the dongle is switched to wifi as soon as detected.
You can unplug the ethernet link at that point.

1 Like

Thanks @wlk ^^

I will install the add-on The only difficult part for me is to create the rule in the file you mentioned. I’ve never used SSH before.
From what I’ve seen, I can SSH the N2 using the terminal on my Mac but then I don’t know how to edit or add rules to files and make sure they are saved.

Would you have any guidance please? :slightly_smiling_face:

Just open SSH terminal and then copy/paste this command which will create the appropriate file

echo 'SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="/storage/.kodi/addons/virtual.system-tools/bin/usb_modeswitch -KW -v 0bda -p 1a2b"' >/storage/.config/udev.rules.d/90-rtl8188gu_cdrom_mode.rules
1 Like

By the way @vpeter, did you merge this into the sources ?
Didn’t see it on github, but I might be looking at the wrong place.

Thanks @vpeter :slightly_smiling_face: it works perfectly fine now using this command line.

Really appreciate the support !

Actually I just did

After long testing it was become clear that usb_modeswitch program is not really needed and it is enough to eject cdrom which appears from usb stick.

So after this is merged in CE no extra rules or system-tools addon need to be installed and stick would work out of the box.

1 Like

CoreELEC 19.4-Matrix_rc1 has build-in support for this and other similar wifi devices based on RTL8821CS.

Can someone can try to remove extra udev rule file and see if device actually works after reboot?

I haven’t tried 19.4rc’s yet, but I will do the test and confirm as soon as they are available for upgrade.

Ok, tried 19.4rc2, the dongle doesn’t switch to wifi anymore if I remove the custom udev rule.

1 Like

Thank you for reporting back.

I confirm, I also tested 19.4 rc2 and the dongle is not switching to wifi.
Test on N2+ 4G.

1 Like

I totally misread both posts and though wifi works :frowning:

I see I made small mistake and the udev file was not changed.

Can you remove your udev rule and put this into /storage/.config/udev.rules.d/40-modeswitch.rules

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)

ACTION!="add|change", GOTO="end_modeswitch"
KERNEL!="sr[0-9]*", GOTO="end_modeswitch"
SUBSYSTEM!="block", GOTO="end_modeswitch"

# Atheros Wireless / Netgear WNDA3200
ATTRS{idVendor}=="0cf3", ATTRS{idProduct}=="20ff", RUN+="/usr/bin/eject '/dev/%k'"

# Realtek RTL8821CU chipset 802.11ac NIC
#   initial cdrom mode 0bda:1a2b, wlan mode 0bda:c811
# Odroid WiFi Module 5B
#   initial cdrom mode 0bda:1a2b, wlan mode 0bda:c820
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="1a2b", RUN+="/usr/bin/eject '/dev/%k'"

LABEL="end_modeswitch"

Yes, WIFI works fine with that rule, including with the system tools addon uninstalled.
Network is up within 3 seconds after booting.

Yes, latest nightly already have this rule fixed. It should work out of the box (hopefully).

I just started over with CoreElec after a year plus with Ubuntu.
Last week I used the newest img to eMMC

CoreELEC-Amlogic-ng.arm-19.3-Matrix-Odroid_N2.img.gz

My Wifi 5B seems to be an older 8811 not 8821 as in the rules.
Is there anything special with this version to be aware of when on Asus Wifi 6 / AX router ?

# lsusb -d 0bda:a811
Bus 001 Device 004: ID 0bda:a811 Realtek Semiconductor Corp. RTL8811AU 802.11a/b/g/n/ac WLAN Adapter

What is the exact udev rule and filename to make it work ?
I use ether / ssh to admin it and system-tools is added.
Also, what Ubuntu like features such as terminal and browser will work with an attached keyboard and mouse ?
Where do I find apt update equivalent (Is it in settings ?) ?

You have udev rule few posts above and also

Regarding questions about extra features: CoreELEC is not generic distribution. That’s why you can forget on a browser and apt.

Thanks,
@vpeter

Reboot looks good so now learning

connman

CoolElecn2:~ # connmanctl enable wifi
Enabled wifi
CoolElecn2:~ # ip address 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP8000> mtu 1500 qdisc fq_codel qlen 1000
    link/ether 00:1e:06:42:3b:ae brd ff:ff:ff:ff:ff:ff
    inet 192.168.50.122/24 brd 192.168.50.255 scope global eth0
       valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP8000> mtu 1500 qdisc mq qlen 1000
    link/ether 20:0d:b0:33:d6:d3 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::220d:b0ff:fe33:d6d3/64 scope link 
       valid_lft forever preferred_lft forever
CoolElecn2:~ # cat /storage/.cache/connman/settings 
[global]
OfflineMode=false

[Wired]
Enable=true
Tethering=false

[WiFi]
Enable=true
Tethering=false
Tethering.Identifier=CoreELEC-AP
Tethering.Passphrase=0oLgFuLJ3r

[P2P]
Enable=false
Tethering=false

@vpeter ,
Wifi settings are in .config but can’t see a switch to 5 GHZ wifi anywhere in Kodi interface.
How is it done if there are multiple wifi possibilities when device is moved to another LAN ?

No idea. Check in CoreELEC Kodi settings if there is separate interface.

Only found eth0 in CoreELEC connections.

I suspect I need to create the settings in another place like wpa would do in /etc.
Thanks @vpeter for responding so fast.
I’ll take it from here and find another link to help with connman switch in Kodi/CoreELEC.
Maybe read the source code for hints.