Libreelec only in DHCP

  • Hi everybody!

    My LAN connection, obviously with Libreelec, work only in DHCP: even if I try to set a static IP address, on reboot the system is again with a dynamic IP.

    Any idea? Please help!

    Thanks in advance for the time you spend helping me!

  • The connection manager (connman) stores static connection details against the MAC address, and if you investigate you'll probably discover that the kernel is assigning a random MAC address on each reboot, so there is no matching profile and it defaults to DHCP again. The cause is the hardware manufacturer being too cheap to spend some $$ getting a block of unique MAC addresses for their hardware. To advise a workaround we'll need to know what hardware you have?

  • No, I was referring to the brand of the box I use on which Libreelec is mounted, since you asked me about the hardware in use! What kind of information do you need?

    Actually I'm using:

    - LibreElec (Community)

    - LE9-Kodi_18.1

    - X8-H_Plus.arm

    Edited 2 times, last by doppiar (April 21, 2019 at 8:01 PM).

  • I've try all the solution reporterd in that thread unfortunately without results... /shrug

    Also, I've try the 99-mac-address.rules method, but nothing change!

  • If you set static IP address and save it then it should always be static.

    If you get after reboot dynamic again then settings was not saved properly in Kodi? Do you see static IP still set in Libreelec settings after reboot?

  • UPDATE: I've try this method, and two times the IP remain static, but connection not working. After two times, Libreelec come back automatically to DHCP. Same situation when I've tried this.

    In a nutshell, if I try to force the MAC address, the IP address remains fixed but the connection does not work!

    Edited 3 times, last by doppiar (April 25, 2019 at 10:26 PM).

  • project: add cpumac package · chewitt/LibreELEC.tv@e01aba3 · GitHub

    ^ this is an (incomplete) experiment in solving the problem on mainline Amlogic kernels. It won't work exactly the same as the CPU serial number is not exposed the same way on legacy kernels, as but you should be able to tweak the cpumac-config script and change the system.d service to ExecStart the modified script from a /storage/ location to make something work. Once you stop the MAC address changing on each boot by overwriting with a known value, the IP address you set via static config (via connman, or DHCP reservation in the router) won't change.

  • As a quick & dirty workaround put this in autostart.sh

    Code
    ip link set dev eth0 address 00:A2:3F:12:0A:10
    systemctl restart connman

    and mac will stay always the same (you can use different mac). And you can set static ip address in settings.

    Or something like that (probably nicer)

  • I've try these methods: even in these cases, IP remain static, but connection remain in "Ready" status and not working. Practically Libreelec is connected but the connection does not work anyway!

  • Same Problem on Pi4 with LE 9.1.502

    LAN can not be changed to manual. It always returns to DHCP. I configure manual und after saving, it always returns to dhcp.

    Under OSMC or Raspbian manual LAN configuration works without problems.

    I'm a linux noob, but is it possible that this is a simple rights problem?

    Edit:

    When WLAN is disabled, i can configure LAN manual. And LE keeps settings, when i enable WLAN again and even after reboot.

    But i can not let Gateway empty. It's like i configure ip and subnet mask manual and LE gets Gateway from dhcp or reminds a former setting. Strange.

    The problem is, then there 2 Gateways. WLAN with internet connection, LAN without. So LE has somtimes access to internet and sometimes not.

    Edited once, last by SparKraft (November 14, 2019 at 3:38 PM).