So, I have an Odroid C4 with the Hardkernel Wifi module 5B.
This is the one wifi dongle that by default, acts as a USB drive containing the Windows driver.
To switch it to NIC mode and work properly in CE, the following command needs to be issued (after installing the “System Tools” addon:
usb_modeswitch -KW -v 0bda -p 1a2b
For convinience, I included this command in the autostart.sh, which works fine, except for the fact that autostart.sh runs pretty late into the boot process, namely, after Kodi has started.
This is a problem because I use a MySQL database on my NAS for my CEs. Kodi tries to read the database before the Wifi connection can be established, so if the CE is powered off, at next boot I need to do a soft reboot of Kodi, because then the Wifi dongle stays on.
I tried writing a systemd service, but it didn’t work:
[Unit] Description=wifi Before=kodi.service [Service] Type=oneshot ExecStart=usb_modeswitch -KW -v 0bda -p 1a2b RemainAfterExit=yes
Is there a way to run the above command before Kodi starts waiting for network connection?