Posts: 5
Joined: Sun Apr 01, 2018 7:05 pm

Network sharing through cell phone

Sun Nov 18, 2018 8:22 am


I have a cell phone set up as mobile hotspot. Now I would like to set up a Raspberry Pi 3B with 2 WIFI adapters (Onboard + extra) to connect my local network to the internet through the cell phone.

How do I do this or where can I find a good tutorial showing how to do this?

Thank you in advance

Posts: 3804
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Network sharing through cell phone

Mon Nov 19, 2018 5:10 pm

To do this:
1) configure one wifi interface on your Pi to get Internet access from the phone. If your phone provides a reasonable AP, there should be nothing to it.
2) See https://www.raspberrypi.org/documentati ... s-point.md to make clients of a 2nd wireless network get Internet access.

Start with step 1, it is a prerequisite for step 2.

There might be issues with running 2 wifi interfaces at the same time, in the sense that wlan0 and wlan1 might compete for the role of client (to the phone), and none would care to handle the AP. I'm not sure this happens as I don't run this type of config, but you can find (recent) threads in the forum.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

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

Re: Network sharing through cell phone

Mon Nov 19, 2018 8:06 pm

You can do what you want. I use my cell as a hotspot for my RPi and have a AP on wlan0. The only caveat is the AP must be on wlan0. Follow the instructions on the link epoch1970 provided. Use this to assign wlan interface names if the interface you want to use for the AP doesn't boot as wlan0.
Create file /etc/udev/rules.d/72-static-name.rules
Add this:

Code: Select all

ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*",
ATTR{address}=="00:c0:ca:96:d8:8b", KERNEL=="w*",NAME="wlan0"

ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*",
ATTR{address}=="b8:27:eb:1e:56:52", KERNEL=="w*",NAME="wlan1"
Change the mac addresses (ATTR(address)==) and reboot.

Return to “Networking and servers”