1

I would like to create a wifi network which does not have access to the Internet - that should not be a problem as there are plenty of posts already on Stack Exchange covering this topic.

However, what I didn't find on Stack Exchange is how to perform a "switch" - so that the local network gets shutdown and the pi uses a plugged in mobile antenna with a sim card in it to get access to the internet and send data.

Is that even possible? If so, how can I achieve something like that?

Any help would be appreciated :)

linus_hologram
  • 167
  • 1
  • 6

2 Answers2

1

I use the following with success: Raspberry Pi - Auto WiFi Hotspot Switch Internet. It is interesting because it:

  • either connects to a know WiFi router
  • or automatically generate a Hotspot Access Point if no network is found. In Hotspot mode the RPi gives internet access to WiFi clients if the ethernet cable is plugged to your internet router.

Also, you can read the official doc : Setting up a Raspberry Pi as an access point in a standalone network (NAT). But there is no automatic switch between Hostspot and available known WiFi router.

joe
  • 11
  • 2
1

As seen from your comments it seems that you don't know where to start in general with an access point in conjunction with an USB 4G modem to get connection to the internet. So I will give some general steps to start and to narrow down your requirements.

First you should make your USB 4G modem connect to the internet. I cannot help much about this because there any many models out there and it is off topic on Raspberry Pi. A simple modem with a SIM card usually does not have an antenna so maybe you have a wifi internet router? If you have a modem then if connected to the RasPi it mostly create an interface named ppp0 or sometimes usb0. Doesn't matter about the name. The interfaces can be handled like any other interface e.g. eth0 (built-in wired interface) or wlan0 (built-in wifi interface). If you have a router and connected with an ethernet cable it will create an interface eth1. If connected by wifi it will use wlan1.

If you have made the internet connection running then you can setup a stand alone access point. How to do it you can look at Setting up a Raspberry Pi as an access point - the easy way section ♦ Setting up a stand alone access point.

If you have finished it then please give me feedback in a comment to this answer so we can see how it could go on.

Ingo
  • 42,961
  • 20
  • 87
  • 207