talud08
Posts: 6
Joined: Thu Dec 21, 2017 6:08 pm

Conect Raspberry2 with cellphone over wifi

Fri Dec 22, 2017 8:09 am

Hello,

I just registed in the forum and I am a beginner with the Raspberry stuff.

I have a Raspberry2 conected to my home wifi network via a wifi dongle and everything works just fine (I can surft in the internet).

However, it does not work with the cellphone wifi area. I mean, the Raspberry is conected with the cell (I can see that both in the Pi and in the cell) but I cannot surft in the internet.

Any ideas?

Thank a lot

Talud08

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Conect Raspberry2 with cellphone over wifi

Fri Dec 22, 2017 1:19 pm

You should post the output of these. Open a terminal and run

Code: Select all

ifconfig
route
cat /etc/resolv.conf

talud08
Posts: 6
Joined: Thu Dec 21, 2017 6:08 pm

Re: Conect Raspberry2 with cellphone over wifi

Fri Dec 22, 2017 4:02 pm

SurferTim,
Thank you for your swift response.
I have run the commands you said and this is the output, when conected to the cellphone wifi:

Code: Select all

root@pi:/# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.71.45  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::4921:665a:d227:ed1f  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:2a:0a:21  txqueuelen 1000  (Ethernet)
        RX packets 1745  bytes 97498 (95.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5667  bytes 7622969 (7.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 23  bytes 2118 (2.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 23  bytes 2118 (2.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.155  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::62e3:27ff:fe11:6550  prefixlen 64  scopeid 0x20<link>
        ether 60:e3:27:11:65:50  txqueuelen 1000  (Ethernet)
        RX packets 2  bytes 322 (322.0 B)
        RX errors 0  dropped 59  overruns 0  frame 0
        TX packets 61  bytes 8832 (8.6 KiB)
        TX errors 0  dropped 1 overruns 0  carrier 0  collisions 0

root@pi:/# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    303    0        0 wlan0
link-local      0.0.0.0         255.255.0.0     U     202    0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     303    0        0 wlan0
root@pi:/# cat /etc/resolv.conf
# Generated by resolvconf
domain Home
nameserver 87.216.1.65
nameserver 87.216.1.66
root@pi:/# 

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Conect Raspberry2 with cellphone over wifi

Fri Dec 22, 2017 7:01 pm

According to what you posted, you shouldn't have any problem connecting.

talud08
Posts: 6
Joined: Thu Dec 21, 2017 6:08 pm

Re: Conect Raspberry2 with cellphone over wifi

Fri Dec 22, 2017 7:20 pm

Thanks again.
The problem may be in the cellphone. I will contact the service provider.

talud08
Posts: 6
Joined: Thu Dec 21, 2017 6:08 pm

Re: Conect Raspberry2 with cellphone over wifi

Tue Jan 02, 2018 12:08 pm

SurferTim,
The problem was that I set a static IP that, for some reason, was not suitable.
I put a dinamic IP and it works OK.
Regards

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Conect Raspberry2 with cellphone over wifi

Tue Jan 02, 2018 12:48 pm

If you need static network settings on only one ssid, you can do that in /etc/dhcpcd.conf. Replace interface with ssid.

Code: Select all

ssid MySSID
static ip_address=192.168.1.2/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8

Return to “Beginners”