OSMC Alpha 4 on RPi 2; WiFi problems on r8188eu (TP-Link WN725N V2)

Howdy,

I’ve got a Raspberry Pi 2 and have installed OSMC Alpha 4.

Used the installer to preconfigure a wireless network, the device “seems” to get an IP according to the UI but I can’t ping it or SSH into the device.

Plugging in the Ethernet cable, it works (i.e. gets an IP, I can SSH in etc.

Checking the logs I see the following (have cut down the log somewhat, can paste full log if that’s useful). In essence, I suspect the problem is that the SSID & WiFI key are not being set properly. I’ve installed a few extra tools and the output of those is below.

I’m no great sysadmin, but I can get around a terminal well enough so if somebody is able to help point me toward any additional debugging I’ll do my best to provide useful feedback!

Jan 01 00:00:02 osmc kernel: usb 1-1.3: new high-speed USB device number 4 using dwc_otg
Jan 01 00:00:02 osmc kernel: usb 1-1.3: New USB device found, idVendor=0bda, idProduct=8179
Jan 01 00:00:02 osmc kernel: usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 01 00:00:02 osmc kernel: usb 1-1.3: Product: 802.11n NIC
Jan 01 00:00:02 osmc kernel: usb 1-1.3: Manufacturer: Realtek
Jan 01 00:00:02 osmc kernel: usb 1-1.3: SerialNumber: 00E04C0001
Jan 01 00:00:03 osmc kernel: r8188eu: module is from the staging directory, the quality is unknown, you have been warned.
Jan 01 00:00:03 osmc kernel: Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
Jan 01 00:00:03 osmc kernel: usbcore: registered new interface driver r8188eu
Jan 01 00:00:03 osmc net.agent[158]: ERROR: /sbin/ifup not found. You need to install the ifupdown package.
Jan 01 00:00:03 osmc net.agent[154]: ERROR: /sbin/ifup not found. You need to install the ifupdown package.
Jan 01 00:00:03 osmc net.agent[162]: net.agent add event for eth0 not handled.
Jan 01 00:00:03 osmc net.agent[163]: net.agent add event for wlan0 not handled.
Jan 01 00:00:05 osmc connmand[207]: Checking loopback interface settings
Jan 01 00:00:05 osmc connmand[207]: System hostname is osmc
Jan 01 00:00:05 osmc connmand[207]: Failed to open RFKILL control device
Jan 01 00:00:05 osmc connmand[207]: The name net.connman.vpn was not provided by any .service files
Jan 01 00:00:05 osmc connmand[207]: lo {newlink} index 1 operstate 0 <UNKNOWN>
Jan 01 00:00:05 osmc connmand[207]: eth0 {create} index 2 type 1 <ETHER>
Jan 01 00:00:05 osmc connmand[207]: eth0 {update} flags 4098 <DOWN>
Jan 01 00:00:05 osmc connmand[207]: eth0 {newlink} index 2 address B8:27:EB:8D:B7:24 mtu 1500
Jan 01 00:00:05 osmc connmand[207]: eth0 {newlink} index 2 operstate 2 <DOWN>
Jan 01 00:00:05 osmc dbus[231]: [system] Activation via systemd failed for unit 'dbus-org.bluez.service': Unit dbus-            org.bluez.service failed to load: No such file or di
Jan 01 00:00:05 osmc connmand[207]: Adding interface eth0 [ ethernet ]
Jan 01 00:00:05 osmc connmand[207]: wlan0 {create} index 3 type 1 <ETHER>
Jan 01 00:00:05 osmc connmand[207]: wlan0 {update} flags 4098 <DOWN>
Jan 01 00:00:05 osmc connmand[207]: wlan0 {newlink} index 3 address E8:94:F6:1B:4E:D9 mtu 1500
Jan 01 00:00:05 osmc connmand[207]: wlan0 {newlink} index 3 operstate 2 <DOWN>
Jan 01 00:00:05 osmc connmand[207]: Adding interface wlan0 [ wifi ]
Jan 01 00:00:05 osmc connmand[207]: eth0 {update} flags 36867 <UP>
Jan 01 00:00:05 osmc connmand[207]: eth0 {newlink} index 2 address B8:27:EB:8D:B7:24 mtu 1500
Jan 01 00:00:05 osmc connmand[207]: eth0 {newlink} index 2 operstate 2 <DOWN>
Jan 01 00:00:05 osmc kernel: smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Jan 01 00:00:05 osmc kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jan 01 00:00:05 osmc sudo[280]: pam_unix(sudo:session): session closed for user root
Jan 01 00:00:06 osmc sudo[294]: osmc : TTY=unknown ; PWD=/ ; USER=root ;COMMAND=/usr/bin/tee/var/run/fb_resolution
Jan 01 00:00:06 osmc sudo[294]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 01 00:00:06 osmc sudo[294]: pam_unix(sudo:session): session closed for user root
Jan 01 00:00:06 osmc sudo[297]: osmc : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/setcap     cap_net_admin,cap_net_bind_service,cap_net_raw=e /usr/lib/kodi/kodi.bin
Jan 01 00:00:06 osmc sudo[297]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 01 00:00:06 osmc dbus[231]: [system] Successfully activated service 'fi.w1.wpa_supplicant1'
Jan 01 00:00:06 osmc wpa_supplicant[288]: Successfully initialized wpa_supplicant
Jan 01 00:00:06 osmc sudo[297]: pam_unix(sudo:session): session closed for user root
Jan 01 00:00:06 osmc wpa_supplicant[288]: nl80211: Driver does not support authentication/association or connect     commands
Jan 01 00:00:06 osmc kernel: cfg80211: Calling CRDA to update world regulatory domain
Jan 01 00:00:06 osmc polkitd[287]: started daemon version 0.105 using authority implementation `local' version     `0.105'
Jan 01 00:00:06 osmc dbus[231]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'
Jan 01 00:00:06 osmc udisks-glue[264]: Device file /dev/mmcblk0 inserted
Jan 01 00:00:06 osmc connmand[207]: wlan0 {update} flags 4099 <UP>
Jan 01 00:00:06 osmc connmand[207]: wlan0 {newlink} index 3 address E8:94:F6:1B:4E:D9 mtu 1500
Jan 01 00:00:06 osmc connmand[207]: wlan0 {newlink} index 3 operstate 2 <DOWN>
Jan 01 00:00:06 osmc kernel: MAC Address = e8:94:f6:1b:4e:d9
Jan 01 00:00:06 osmc kernel: IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Jan 01 00:00:06 osmc wpa_supplicant[288]: ioctl[SIOCSIWAP]: Operation not permitted
Jan 01 00:00:06 osmc connmand[207]: wlan0 {newlink} index 3 address E8:94:F6:1B:4E:D9 mtu 1500
Jan 01 00:00:06 osmc connmand[207]: wlan0 {newlink} index 3 operstate 2 <DOWN>
Jan 01 00:00:06 osmc wpa_supplicant[288]: ioctl[SIOCSIWENCODEEXT]: Invalid argument
Jan 01 00:00:06 osmc wpa_supplicant[288]: ioctl[SIOCSIWENCODEEXT]: Invalid argument
Jan 01 00:00:07 osmc connmand[207]: eth0 {add} route fe80:: gw :: scope 0 <UNIVERSE>
Jan 01 00:00:07 osmc connmand[207]: eth0 {update} flags 102467 <UP,RUNNING,LOWER_UP>
Jan 01 00:00:07 osmc connmand[207]: eth0 {newlink} index 2 address B8:27:EB:8D:B7:24 mtu 1500
Jan 01 00:00:07 osmc connmand[207]: eth0 {newlink} index 2 operstate 6 <UP>
Jan 01 00:00:07 osmc kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jan 01 00:00:07 osmc kernel: smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
Jan 01 00:00:07 osmc ntpd_intres[270]: host name not found: 0.debian.pool.ntp.org
Jan 01 00:00:07 osmc ntpd_intres[270]: host name not found: 1.debian.pool.ntp.org
Jan 01 00:00:07 osmc ntpd_intres[270]: host name not found: 2.debian.pool.ntp.org
Jan 01 00:00:07 osmc ntpd_intres[270]: host name not found: 3.debian.pool.ntp.org
Jan 01 00:00:08 osmc connmand[207]: Skipping disconnect of carrier, network is connecting.
Jan 01 00:00:08 osmc avahi-daemon[229]: Joining mDNS multicast group on interface eth0.IPv4 with address 10.0.1.15.
Jan 01 00:00:08 osmc avahi-daemon[229]: New relevant interface eth0.IPv4 for mDNS.
Jan 01 00:00:08 osmc avahi-daemon[229]: Registering new address record for 10.0.1.15 on eth0.IPv4.
Jan 01 00:00:08 osmc connmand[207]: eth0 {add} address 10.0.1.15/24 label eth0 family 2
Jan 01 00:00:08 osmc connmand[207]: eth0 {add} route 10.0.1.0 gw 0.0.0.0 scope 253 <LINK>
Jan 01 00:00:08 osmc connmand[207]: eth0 {add} route 10.0.1.1 gw 0.0.0.0 scope 253 <LINK>
Jan 01 00:00:08 osmc connmand[207]: eth0 {add} route 0.0.0.0 gw 10.0.1.1 scope 0 <UNIVERSE>
Jan 01 00:00:09 osmc connmand[207]: eth0 {add} route 87.106.208.187 gw 10.0.1.1 scope 0 <UNIVERSE>
Jan 01 00:00:09 osmc avahi-daemon[229]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::ba27:ebff:fe8d:b724.
Jan 01 00:00:09 osmc avahi-daemon[229]: New relevant interface eth0.IPv6 for mDNS.
Jan 01 00:00:09 osmc avahi-daemon[229]: Registering new address record for fe80::ba27:ebff:fe8d:b724 on eth0.*.
Jan 01 00:00:10 osmc connmand[207]: eth0 {del} route 87.106.208.187 gw 10.0.1.1 scope 0 <UNIVERSE>
Jan 01 00:00:11 osmc kernel: Console: switching to colour dummy device 80x30
Jan 01 00:00:11 osmc ntpd[261]: Listen normally on 4 eth0 10.0.1.15 UDP 123
Jan 01 00:00:11 osmc ntpd[261]: Listen normally on 5 eth0 fe80::ba27:ebff:fe8d:b724 UDP 123
Jan 01 00:00:11 osmc ntpd[261]: peers refreshed
Jan 01 00:00:13 osmc ntpd_intres[270]: DNS 0.debian.pool.ntp.org -> 27.106.200.44
Jan 01 00:00:13 osmc ntpd_intres[270]: DNS 1.debian.pool.ntp.org -> 54.252.161.68
Jan 01 00:00:13 osmc ntpd_intres[270]: DNS 2.debian.pool.ntp.org -> 121.0.0.41
Jan 01 00:00:13 osmc ntpd_intres[270]: DNS 3.debian.pool.ntp.org -> 119.252.27.44
Feb 10 02:56:14 osmc sshd[384]: Accepted password for osmc from 10.0.1.18 port 64627 ssh2
Feb 10 02:56:14 osmc sshd[384]: pam_unix(sshd:session): session opened for user osmc by (uid=0)
Feb 10 02:56:14 osmc systemd-logind[223]: New session c1 of user osmc.
Feb 10 02:56:14 osmc systemd[386]: Startup finished in 66ms.

I have also got the following, which leads me to believe the driver is being found and loaded successfully:

root@osmc:~# lsmod
Module                  Size  Used by
cfg80211              395310  0
rfkill                 16651  2 cfg80211
nfsd                  263569  2
snd_soc_pcm512x_i2c     1689  0
snd_soc_wm8804          7354  0
snd_soc_tas5713         5006  0
snd_soc_pcm512x         6340  1 snd_soc_pcm512x_i2c
regmap_spi              1793  1 snd_soc_wm8804
regmap_i2c              2354  3 snd_soc_wm8804,snd_soc_pcm512x_i2c,snd_soc_tas5713
snd_soc_bcm2708_i2s     6637  0
regmap_mmio             2961  1 snd_soc_bcm2708_i2s
snd_soc_core          140253  4 snd_soc_pcm512x,snd_soc_wm8804,snd_soc_tas5713,snd_soc_bcm2708_i2s
snd_compress            7610  1 snd_soc_core
r8188eu               435113  0
snd_pcm_dmaengine       3359  1 snd_soc_core
snd_pcm                75388  3 snd_soc_wm8804,snd_soc_core,snd_pcm_dmaengine
snd_timer              17784  1 snd_pcm
snd                    51667  4 snd_soc_core,snd_timer,snd_pcm,snd_compress
i2c_bcm2708             4758  0
spi_bcm2708             5153  0
fuse                   82155  1
ipv6                  333229  50
root@osmc:~#

lsusb also seems to confirm the adapter itself is visible:

root@osmc:~# lsusb
Bus 001 Device 004: ID 0bda:8179 Realtek Semiconductor Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@osmc:~#

Using iwlist from the wireless-tools package, I can see my AP:

root@osmc:~# iwlist wlan0 scan
wlan0     Scan completed :
      Cell 01 - Address: 90:72:40:13:F3:14
                ESSID:"ASIO-Surveillance-Van8"
                Protocol:IEEE 802.11bgn
                Mode:Master
                Frequency:2.412 GHz (Channel 1)
                Encryption key:on
                Bit Rates:144 Mb/s
                Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
                IE: IEEE 802.11i/WPA2 Version 1
                    Group Cipher : CCMP
                    Pairwise Ciphers (1) : CCMP
                    Authentication Suites (1) : PSK
                Quality:0  Signal level:0  Noise level:0

root@osmc:~#

Output from iwconfig is as follows:

root@osmc:~# iwconfig
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
      Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated
      Sensitivity:0/0
      Retry:off   RTS thr:off   Fragment thr:off
      Encryption key:off
      Power Management:off
      Link Quality:0  Signal level:0  Noise level:0
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.

root@osmc:~#

Hi,

You’ve certainly done your homework there :smile:

What happens if you re-run the preseed script manually ? (This normally runs only once during first boot and reads /boot/preseed.cfg to configure network settings) To do this:

sudo /usr/bin/preseed

Ethernet needs to be unplugged for Wifi to be configured so you’re best doing this at the local console. (Exit from Kodi and press ESC at the OSMC splash screen to log in)

After running preseed see if wifi is working, if not check the system journal towards the end for any output from preseed:

sudo journalctl

Also you could try the connman commands listed in the following post to see if you can manually configure the network, and if not let us know at what point you notice an error:

Thanks.

Thanks for the detailed reply!

So, I had some time to sit down and look into this, and I think I’ve found the cause, although I haven’t worked out the fix yet!

On closer inspection, when the unit first boots up (with no wired Ethernet connected), the WiFi successfully associates to the AP and gets an IP via DHCP.

I can then ping the RPi2 / OSMC instance just fine, and SSH works also.

Interestingly, if I leave a ping running from my laptop to the OSMC, all stays happy.

If I don’t leave a ping running or an open SSH session, the WiFi seems to go to sleep (that’s my suspicion, not based on any output!) and stays down from that point onward. My shonky workaround is to just reboot.

Now - I’ve not been able to try your commands, because unless I’m missing something I can’t seem to break out of OSMC and get a terminal…I tried going to the Exit option on the menu, at which point I can fire up a console session, but then OSMC seems to restart automatically before I can get much done. Any suggestions?

Thanks!

Make sure you log into tty1 by pressing ESC when you see the OSMC splash after exit, don’t use ALT-Fx to switch to a different tty because as you noticed it will relaunch Kodi.

Once you are logged into tty1 then you can use additional virtual terminals if you like, but logging out of tty1 will always trigger Kodi to reload.