Wednesday, March 6, 2019

Connect your OSMC Kodi to Wifi with IEEE8021x authentication

I was struggling a bit to connect my Kodi to Wifi which has IEEE8021x authentication. But after some googling, the following worked out fine.


  1. Scan for Wifi networks and find the one you want to connect to
  2. connmanctl scan wifi
    connmanctl services
    Output:
    root@kodi1:~# connmanctl scan wifi
    Scan completed for wifi
    root@kodi1:~# connmanctl services
    *AR Wired                ethernet_b827ebf9x_cable
                             wifi_b827ebacx_hidden_managed_none
        SSID1                wifi_b827ebacx_7a657573_managed_psk
        SSID2 .              wifi_b827ebacx_7a6575735f696f74_managed_psk
                             wifi_b827ebacx_hidden_managed_psk
        SSID3                wifi_b827ebacx_54656c656e6574576946726565_managed_ieee8021x
        ...
  3. Get the detailed information needed to connect to the Wifi network
  4. connmanctl services wifi_xxx_managed_ieee8021x
  5. Enter the following in your shell
  6. cat > /var/lib/connman/peap-mschapv2.config <<EOF
    [global]
    Name = <ssid>
    Description = <description of network>
    [service_peap]
    Type = wifi
    Name = <ssid>
    EAP = peap
    Phase2 = MSCHAPV2
    Identity = <login>
    Passphrase = <passphrase>
    EOF

  7. Now connman should pick this up automatically. Please be aware that the file needs to end with .config and be placed in /var/lib/connman!
  8. Run the services command again, and notice that there will be an asterix next to the wifi network, if it has been found and the config file has been processed correctly. (as said: Immutable, AutoConnect and Favorite are set to true)
  9. Output:
    root@kodi1:~# connmanctl services
    *AO SSID3                wifi_b827ebacx_54656c656e6574576946726565_managed_ieee8021x
    *AR Wired                ethernet_b827ebf9x_cable
                             wifi_b827ebacx_hidden_managed_none
        SSID1                wifi_b827ebacx_7a657573_managed_psk
        SSID2 .              wifi_b827ebacx_7a6575735f696f74_managed_psk
                             wifi_b827ebacx_hidden_managed_psk
        ...

  10. Connect to the Wifi network

  11. connmanctl connect wifi_xxx_managed_ieee8021x

No comments:

Post a Comment