Ethernet tether with default route via wifi issues

  • I currently have my RPi3 running libreelec daily (April 7th I think). It's using wifi as the default route to the internet and the ethernet port is connected to a not too smart tv. It's taken some time to get working persistently through reboots and all but I don't think it's the right way about it.

    1. Setup ethernet in gui to auto obtain ip (not used once tethered but I did initially use a static ip conflicting with wifi below)

    2. Setup wifi in gui to correct ssid, passphrase and static ip (static here is for my own sanity, not really needed)

    3. Set firewall rules in gui to custom ensuring -P FORWARD ACCEPT was included in the config (initially I was blocking all this traffic)

    4. Copied default connman config into ~/.config/ and set tethered to allow ethernet, prefered devices to include wifi first and online check to true

    This all works after I initially rebooted then ran "connmanctl tether ethernet on" but as soon as I rebooted again the Pi and TV had no Internet. It seemed the ethernet tether was becoming the preferred route and no Internet traffic went via wifi which was the most preferred route in connman and was marked online.

    From here on is where things don't seem correct as I have had to bodge the process.

    5. Also in connman config I have set persistent tether to false, always enable wifi and default to wifi

    6. Added to ~/.config/autostart.sh containing:

    (

    sleep 10;

    connmanctl tether ethernet on

    ) &

    This now drops the tether setup every shutdown and reenables the tether 10 seconds after booting by which time the wifi is already established and in use as the default route.

    Can anyone suggest how I fix my tether so I don't need this autostart script etc.

    Thanks

  • The mobile phone tethered hotspot feature in connman (which is what you're using) is not a replacement for a proper router, and a quick glance on eBay shows things available for £10. Using the right tool for the job is often easier.

  • Hi. I'm not tethering on the wifi I'm tethering on the ethernet port as the tv doesn't have wifi support and I don't have an ethernet port/cable anywhere near by. So all the RPi should be doing in this instant is speaking to the internet over wifi and forwarding on some of that traffic through a NAT/tether to the tv via ethernet. Which does work and is stable and sufficient speed for the tv, it's just that if it connects the tethered ethernet line faster than the wifi connection the routing seems to be incorrect hence my non persistent tether and autostart script.

  • I'm not sure how to fix the autostart script but just to reiterate what chewitt has said - providing wireless access for a wired client is not what the LibreELEC tethering facility is designed for. Your solution may work now, but it might also break in future if we add additional functionality which is not compatible with this unsupported tethering mode (for the record, we don't have any plans to change tethering - I'm just saying that we could!)

    If your TV has only a wired ethernet port and you want to connect it to your router then my advice would be to consider using Powerline/Homeplug adapters - they're cheap, fast, and can work very well - much better than WiFi - so long as your mains wiring is not too complicated (ie. multiple ring mains) or old.

  • Thanks. As long as I wasn't missing something that should have been easier/possible setting this up. Will keep it ticking over in this way until it stops working or I get hold of a hardware option then.

  • Despite this thread being nearly 2 years old, hopefully you can walk me through this process.

    I'm trying to accomplish the exact same as you managed to. I'm also trying to connect my TV's ethernet port to my RPi3's which accesses the internet via the built-in WiFi (Raspberry Pi 3 Model B, running LibreELEC 9.2.0). Assuming this method still works, can someone please give a step-by-step tutorial on how to accomplish this. I do not even know how to access LibreELEC's internal storage through the File Manager to edit the conmann/config files on a Raspberry Pi!

    Thank you.

  • Appreciate your response, but I really do not know what to do from Step 3 onwards. I've managed to SSH into LE, but that's about it. I don't understand the terminal commands or how to use them to edit the files, and I've been trying all day. I just don't get it.

  • Appreciate your response, but I really do not know what to do from Step 3 onwards. I've managed to SSH into LE, but that's about it. I don't understand the terminal commands or how to use them to edit the files, and I've been trying all day. I just don't get it.

    Okay, I have managed to set things up from Step 1 to 4. However, I do not see the same options as stated below:

    and set tethered to allow ethernet, prefered devices to include wifi first and online check to true

    or:

    5. Also in connman config I have set persistent tether to false, always enable wifi and default to wifi

    Side note: When I run "connmanctl tether ethernet on", terminal returns "Error enabling ethernet tethering: Not supported".

    Please assist 8o