Wifi dongle 5B Odroid

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.

You should see wifi interface in settings too.

The .cache connman wifi* settings show SSID and password as well as a IP address which
may be left over from Ubuntu link in previous life.
Asus router doesn’t show it disconnected even.

I am reading this link

I can see the old link in settings but nothing at ip address

Favorite=true
AutoConnect=true
Modified=2022-01-19T12:52:08Z

@vpeter ,
Got it !!!

Reboot and be sure Ethernet not connected to be found.
Found this old link !

Thanks, again.

Well, after my fresh install I only go to settings and select wifi. I don’t mess with files just to connect.

@vpeter ,
My /etc/hosts is on LAN go to system and had the IP ADDRESS from older Ubuntu boot days.

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: <NO-CARRIER,BROADCAST,MULTICAST,UP8000> mtu 1500 qdisc fq_codel qlen 1000
    link/ether 00:1e:06:42:3b:ae brd ff:ff:ff:ff:ff:ff
3: wlan0: <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
    inet 192.168.50.237/24 brd 192.168.50.255 scope global wlan0
       valid_lft forever preferred_lft forever
CoolElecn2:~ # cat /storage/.cache/connman/wifi_xxxxxxxxxxxxxxxxxx_managed_psk/settings 
......
.......
Favorite=true
AutoConnect=true
Modified=2022-02-09T12:31:47Z

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