PINE64
No internet access through Pinephone hot spot - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: No internet access through Pinephone hot spot (/showthread.php?tid=12602)



No internet access through Pinephone hot spot - Zebulon Walton - 12-23-2020

I decided to try out the wifi hot spot feature since that looks like something that could be useful. Out of the box, the "Turn on Wi-Fi Hotspot" 3 dots menu item in Settings/Wi-Fi is greyed out. So I set it up via command line per the Mobian wiki :

Code:
sudo nmcli device wifi hotspot ifname wlan0 con-name Hotspot ssid Pinephone password HotspotPassword

This sets up the hot spot and connecting to it works, however there is no internet connectivity through that connection. (This is tested by pinging 8.8.8.8 so there are no name resolution issues.) Routing table on the laptop shows the default gateway as 10.42.0.1 and that pings, but nothing further out.

The phone is connected to 4G and has internet access itself. I've tried with a couple of different laptops with the same result. For test purposes firewalls on the phone and laptops are disabled. (A side effect seems to be that King's Cross terminal no longer responds to the virtual keyboard when the hot spot is enabled.) Rebooting the phone for good measure did not change the result.

Is there any other configuration that needs to be done, or is this something that is currently known not to work?


RE: No internet access through Pinephone hot spot - l_gyuri - 12-23-2020

(12-23-2020, 08:48 AM)Zebulon Walton Wrote: I decided to try out the wifi hot spot feature since that looks like something that could be useful. Out of the box, the "Turn on Wi-Fi Hotspot" 3 dots menu item in Settings/Wi-Fi is greyed out. So I set it up via command line per the Mobian wiki :

Code:
sudo nmcli device wifi hotspot ifname wlan0 con-name Hotspot ssid Pinephone password HotspotPassword

This sets up the hot spot and connecting to it works, however there is no internet connectivity through that connection. (This is tested by pinging 8.8.8.8 so there are no name resolution issues.) Routing table on the laptop shows the default gateway as 10.42.0.1 and that pings, but nothing further out.

The phone is connected to 4G and has internet access itself. I've tried with a couple of different laptops with the same result. For test purposes firewalls on the phone and laptops are disabled. (A side effect seems to be that King's Cross terminal no longer responds to the virtual keyboard when the hot spot is enabled.) Rebooting the phone for good measure did not change the result.

Is there any other configuration that needs to be done, or is this something that is currently known not to work?
It seems to me, that IP forwarding is not enabled. You could check it by:

---
root@mobian:~# sysctl net.ipv4.ip_forward

net.ipv4.ip_forward = 0
---

It should be 1


RE: No internet access through Pinephone hot spot - Zebulon Walton - 12-23-2020

Thanks, I did check it and that setting is being enabled automatically on the phone when the hotspot is enabled. (Also confirmed via "cat /proc/sys/net/ipv4/ip_forward".)

I also double-checked that 4G internet access is operational on the phone while the hotspot is enabled. From the phone's terminal emulator pinging google.com works, and ssh can connect to a remote host while the hotspot is up and a laptop connected. The laptop just can't ping out beyond the default gateway.


RE: No internet access through Pinephone hot spot - Zebulon Walton - 12-23-2020

I left my test setup for about an hour to do some other things and when I got back to it found that the hotspot had gone dead at some point, the laptop could no longer connect to it until  the hotspot was stopped and restarted on the phone. Then I was able to connect with the same result - from the laptop, pinging the gateway works and additionally it was able to ping to the wwan0 IP address (cellular modem) on the phone but of course still no internet access. So it looks like this is a feature that is a work in progress, which is certainly fair enough at this stage of development.


RE: No internet access through Pinephone hot spot - dukla2000 - 12-23-2020

(12-23-2020, 08:48 AM)Zebulon Walton Wrote: I decided to try out the wifi hot spot feature since that looks like something that could be useful. Out of the box, the "Turn on Wi-Fi Hotspot" 3 dots menu item in Settings/Wi-Fi is greyed out. So I set it up via command line per the Mobian wiki :
...

If you start with a fresh Mobian install then I suspect it should work out of the box. You have to enable WiFi first, then the "Turn on WiFi Hotspot" option will be available in the hamburger menu.

The reason I say "suspect/should" is I use USB or ethernet tethering. For sure USB tethering does indeed work out of the box on Mobian, ethernet tethering needs a tweak that can be done via the nmtui user interface. I have a multi-port USB-C dongle that includes an RJ45 socket: plug it all in then go into nmtui, edit the wired connection and change the IPv4 configuration to "Shared" (from Automatic). (In the early days this sharing was also required for USB; in fact I suspect it may be what is missing from your connection and a quick nmtui may fix things?)


RE: No internet access through Pinephone hot spot - Zebulon Walton - 12-23-2020

(12-23-2020, 03:40 PM)dukla2000 Wrote:
(12-23-2020, 08:48 AM)Zebulon Walton Wrote: I decided to try out the wifi hot spot feature since that looks like something that could be useful. Out of the box, the "Turn on Wi-Fi Hotspot" 3 dots menu item in Settings/Wi-Fi is greyed out. So I set it up via command line per the Mobian wiki :
...

If you start with a fresh Mobian install then I suspect it should work out of the box. You have to enable WiFi first, then the "Turn on WiFi Hotspot" option will be available in the hamburger menu.

The reason I say "suspect/should" is I use USB or ethernet tethering. For sure USB tethering does indeed work out of the box on Mobian, ethernet tethering needs a tweak that can be done via the nmtui user interface. I have a multi-port USB-C dongle that includes an RJ45 socket: plug it all in then go into nmtui, edit the wired connection and change the IPv4 configuration to "Shared" (from Automatic). (In the early days this sharing was also required for USB; in fact I suspect it may be what is missing from your connection and a quick nmtui may fix things?)

Thanks, I'll have to give a fresh installation a try from a bootable SD card and play around with nmtui a bit to see how that works out.


RE: No internet access through Pinephone hot spot - Zebulon Walton - 12-23-2020

OK, I got the phone running on an SD card flashed with the latest nightly build of Mobian. I set up the APN for mobile internet and I have connectivity on the phone. Initially it was the same situation, "Turn on Wi-Fi Hotspot" greyed out, and no internet on the laptop when setting the hotspot up manually with nmcli.

However, after rebooting the phone, the GUI "Turn on Wi-Fi Hotspot" menu item was no longer greyed out. So I turned on the hotspot that way, but the laptop still had no internet connectivity. Went in with nmtui and the hotspot connection was already marked as Shared. Exited without changing or saving anything and the laptop suddenly was able to ping out to the internet. Rebooted the phone on the SD card and it still seemed to be working.

Then, booting up on my original installation I was unable to replicate that, so I guess I need to decide whether it's worth blowing away my encrypted Mobian installation on the eMMC (which otherwise is set up the way I want) in order to do this. I guess for now if I want to use the hotspot I can just boot off the SD card.