WiFi - Connect to mobile hotspot (away from home! I need the computer to work)

Hi, I’m away from home (new job) and I can connect to my mobile WiFi hotspot, but I don’t seem to have internet connection.

I have it configured to only 2,4 Ghz (because this laptop doesn’t connect to 5Ghz), automatic DHCP for IP (and IPV6 disabled). Because that is what I needed to do in my house in order to properly connect.

Here is the result of connection info: (sorry it is not in English! work computer)

EDIT: I can’t put URLs nor upload images??
I don’t really know what are those final values (EDIT: in regards to the screenshot I wanted to attach)

ip addr shows:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens5: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:1b:63:ad:c4:8f brd ff:ff:ff:ff:ff:ff
    altname enp3s0
3: wls4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:1d:4f:fd:67:28 brd ff:ff:ff:ff:ff:ff
    altname wlp2s0
    inet 192.168.12.248/24 brd 192.168.12.255 scope global dynamic noprefixroute wls4
       valid_lft 3597sec preferred_lft 3597sec

interestingly, if I connect another smartphone, and run that command (on a terminal in android) it shows a little different IP:

inet 192.168.242.71/24 brd 192.168.242.255 scope global wlan0
valid_lft forever preferred_lft forever

I can perfectly use the hotspot on the other android device (that doesn’t have a sim) but I can’t browse the web, nor do ping to google… etc in my manjaro laptop.

I’m currently connected sharing bluetooth tethering, but this is far from ideal. Any ideas what I should try? or how should I manually configure correct values for gateway and subnet mask (I don’t really have those concepts clear)

Hello @PolGZ :wink:

Well, wls4 is UP and you have got an IP form the DHCP Service of the Mobile Hotspot. Good so far for, on this side.

If you cant browse the web, then the problem is on the other side (mobile hotspot) and not Manjaro.

1 Like

Any ideas why my other smartphone connects without any problem and why this laptop woudln’t? or what should I test.

I always had a lot of problems with the wifi, tbo.Until I disabled IPV6 and selected only B/G (2.4ghz) and not auto, I couldn’t use my home wifi neither. I really would love to know what is not working… is there any test I could run while connected to see if we can conclude anything more specific?

Maybe start with this:

curl -s "https://gitlab.com/-/snippets/2001562/raw/master/plwatch.sh" | sh

It checks the connection by pinging the gateway and google.com and writes the results into a file: ping_log.txt

This way you know which part of the connection is faulty.

Well, it connects to hotspot, but the internet connection seems to be blocked. What I could think is that there is some sort of authorization…

1 Like
ping: socket: Address family not supported by protocol
ping: socket: Address family not supported by protocol
ping: google.com: Name or service not known
[2021-09-08 21:30:39] (192.168.242.255 5) 5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4049ms
[2021-09-08 21:30:39] (google.com 5) 
ping: socket: Address family not supported by protocol
ping: socket: Address family not supported by protocol
ping: google.com: Name or service not known
[2021-09-08 21:30:57] (192.168.242.255 5) 5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4056ms
[2021-09-08 21:30:57] (google.com 5) 
ping: socket: Address family not supported by protocol
ping: socket: Address family not supported by protocol
ping: google.com: Name or service not known
[2021-09-08 21:31:15] (192.168.242.255 5) 5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4065ms
[2021-09-08 21:31:15] (google.com 5) 
ping: socket: Address family not supported by protocol
ping: socket: Address family not supported by protocol
ping: google.com: Name or service not known
[2021-09-08 21:31:33] (192.168.242.255 5) 5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4058ms
[2021-09-08 21:31:33] (google.com 5) 

I stopped after 4 minutes, all the same.

ip route show

:question:

journalctl --follow --unit=NetworkManager

and try to reconnect to the wifi.

1 Like
  • ip route show
    default via 192.168.28.56 dev wls4 proto dhcp metric 20600 
    192.168.28.0/24 dev wls4 proto kernel scope link src 192.168.28.248 metric 600 
    
  • journalctl --follow --unit=NetworkManager
sep 08 21:49:17 arch-mac NetworkManager[1257]: <info>  [1631130557.9928] device (wls4): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
sep 08 21:49:17 arch-mac NetworkManager[1257]: <info>  [1631130557.9939] manager: NetworkManager state is now CONNECTING
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0055] device (wls4): set-hw-addr: reset MAC address to 00:XX:XX:XX:XX:XX (preserve)
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0089] device (wls4): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0095] device (wls4): Activation: (wifi) access point 'WiFi Malo' has security, but secrets are required.
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0095] device (wls4): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0279] device (wls4): supplicant interface state: disconnected -> interface_disabled
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0282] device (wls4): supplicant interface state: interface_disabled -> disconnected
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0355] device (wls4): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0361] device (wls4): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0366] device (wls4): Activation: (wifi) connection 'WiFi Malo' has security, and secrets exist.  No new secrets needed.
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0367] Config: added 'ssid' value 'WiFi Malo'
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0367] Config: added 'scan_ssid' value '1'
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0368] Config: added 'freq_list' value '2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484'
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0368] Config: added 'bgscan' value 'simple:30:-70:86400'
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0369] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256'
sep 08 21:49:18 arch-mac NetworkManager[1257]: <info>  [1631130558.0369] Config: added 'psk' value '<hidden>'
sep 08 21:49:19 arch-mac NetworkManager[1257]: <info>  [1631130559.0744] device (wls4): supplicant interface state: disconnected -> scanning
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.5383] device (wls4): supplicant interface state: scanning -> associating
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.6114] device (wls4): supplicant interface state: associating -> 4way_handshake
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.6349] device (wls4): supplicant interface state: 4way_handshake -> completed
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.6355] device (wls4): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "WiFi Malo"
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.6391] device (wls4): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.6418] dhcp4 (wls4): activation: beginning transaction (timeout in 45 seconds)
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.6639] dhcp4 (wls4): state changed unknown -> bound, address=192.168.28.248
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.6661] device (wls4): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.7108] device (wls4): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.7113] device (wls4): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.7128] manager: NetworkManager state is now CONNECTED_LOCAL
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.7184] manager: NetworkManager state is now CONNECTED_SITE
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.7190] policy: set 'WiFi Malo' (wls4) as default for IPv4 routing and DNS
sep 08 21:49:22 arch-mac NetworkManager[1257]: <info>  [1631130562.7321] device (wls4): Activation: successful, device activated.
^C

I disconnected (after running ip route show) and then re-conected tho see the journalctl, hence the first line. I omitted the part where I disconnected).

(Changed my mac adress to xx to post)

So this is the Gateway IP.

Can you ping it?

ping -4 192.168.28.56

Try to ping manjaro.org with domain and without:

ping -4 manjaro.org
ping -4 116.203.91.91

Maybe an DNS problem?

The journal looks pretty normal.

1 Like

All IPs 100% packet loss, manjaro.com not found:

$ ping -4 192.168.28.56
PING 192.168.28.56 (192.168.28.56) 56(84) bytes of data.
^C
--- 192.168.28.56 ping statistics ---
13 packets transmitted, 0 received, 100% packet loss, time 12172ms

$ ping -4 116.203.91.91
PING 116.203.91.91 (116.203.91.91) 56(84) bytes of data.

--- 116.203.91.91 ping statistics ---
9 packets transmitted, 0 received, 100% packet loss, time 8121ms

$ ping -4 manjaro.org
ping: manjaro.org: Name or service unknown

(each time I reconnect, gateway IP showd in ip route show is different. But I tried pining both the “old” and the “current” one; same result)

Btw, thanks for trying to help, man!

:frowning:

Maybe it doesn’t like mac randomization?

https://wiki.archlinux.org/title/NetworkManager#Configuring_MAC_address_randomization

Of what kind of mobile hotspot are we talking about?

1 Like

I think I did that while searching possible solutions, and it wouldn’t connect to the hotspot. I will try tomorrow, just in case I misspelled, now I have to go to sleep. I didn’t new manjaro spoofed mac adresses by default.

It is my CalyxOS smartphone.

Thanks for the help, I will post tomorrow!

1 Like

Please read this:

Created the /etc/NetworkManager/conf.d/wifi_rand_mac.conf file with the content:

[device]
wifi.scan-rand-mac-address=no

But nothing changed, I still can’t get the connection to work. (Also, the mac address showed in #7 was the default one (in case it should appear there as a different one when randomization is enabled). In fact, in my home wifi I have the router set to manually apply an IP to this address)

Anybody has another idea what I should try? It happens the same with another phone :woozy_face:. And sadly I would depend on my mobile hotspot for the next few weeks.

The only thing i can say here is that Manjaro connects successfully to the hotspot, but internet access is blocked. So the problem is the CalyxOS smartphone. I am not familiar with this OS, but it seems possible that there is some sort filter implemented. Better report it directly here: Issues · CalyxOS / calyxos · GitLab

Just took a quick look at the features page of CalyxOS

Datura Firewall gives you fine-grained control over network access for all of your apps

At the same time

Tethered network devices (USB or Wi-Fi) can use the phone’s VPN or Tor

So it could be as simple as the firewall is blocking the tethered connection as you have to setup the firewall to allow a tethered device to access the internet.