If you have a Raspberry Pi with 4G Shield/HAT connected to a Cellular Network, you can easily convert it to a Wi-Fi Hotspot. By the end of this tutorial you will have a WiFi Raspberry Pi Hotspot with you.

NOTE: PPP and QMI interface are supported by Cellullar IoT HAT and Cellular Application IoT Shield too, but the connection speed would be not appropriate to share as a hotspot.

Before getting started:

  • To make a hotspot, you must first connect to the PPP or QMI interface. We recommend installing QMI Interface because it is faster than PPP.

First, make a backup of the Wi-Fi connection configuration.

To do this, go to the terminal of the raspberry pi and run the following commands:

sudo cp /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf.sav
sudo cp /dev/null /etc/wpa_supplicant/wpa_supplicant.conf

Add following lines in the file /etc/wpa_supplicant/wpa_supplicant.conf .

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

After that, all we need to do is install RaspAP.

RasAP is a software that allows us to manage the access point and hotspot on the web interface.

Quick installer

Install RaspAP from your RaspberryPi’s shell prompt:

wget -q https://git.io/voEUQ -O /tmp/raspap && bash /tmp/raspap -y

IP address: 10.3.141.1

Username: admin

Password: secret

DHCP range: 10.3.141.50 to 10.3.141.255

SSID: raspi-webgui

Password: ChangeMe


From the Configure hotspot tab, set and save as follows.


37 thoughts on “Using Sixfab Raspberry Pi Shield/HAT as a Wi-Fi Hotspot”

  1. Step 11 states “This needs configuration of NAT between wlan0 and ppp0 interfaces,” but does not offer any steps explaining how to do this. Are there any references you can link to?

  2. This guide does not seem to work stretch. It also appears there may be some information missing for step 11. Are you able to update this post accordingly?

  3. I’m finding all information that I require for my project with the exception of the SIM cards! What provider do I use for these mobile networking hats? Thanks in advance.

  4. Hey Thomas, could you provide further info on this process? I’d lie to utilize the eth0 for internet instead of the wifi.

    Thanks

      1. Hi Saeed ,
        Good day!!!!
        I am unable to open the link, can you re-share the link.
        Does the link contains procedure to use ppp to eth0 for internet sharing?

        Regards,
        Gokulan

  5. Please correct me if I’m wrong, I’m assuming that the SIM card has to be active with data service. The reason I ask is because I’m wondering if I use the SIM card from my phone with this setup be better than using the hotspot on my phone provided by my cell carrier? Please advise what features would you suggest be on the SIM card for best results?

    1. Internet SIM cards are best to use. (Cost effective)
      You can use regular sim too. Technically there is no difference.

  6. Can someone help me. I’m new to this raspberry pi stuff and wanted to try to make this project but getting errors when I try to restart the dhcpcd service.

    when I tried to restart the dhcpcd service I am getting:
    Job for dhcpcd.service failed because the control process exited with error code.
    See “systemctl status dhcpcd.service” and “journalctl -xe” for details.
    when i check teh dhcpcd.service I found this:
    ● dhcpcd.service – dhcpcd on all interfaces
    Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: e
    Active: failed (Result: exit-code) since Thu 2019-08-01 10:56:57 HST; 23s ago
    Process: 1545 ExecStop=/sbin/dhcpcd -x (code=exited, status=0/SUCCESS)
    Process: 1551 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=6)
    Main PID: 419 (code=exited, status=0/SUCCESS)

    Aug 01 10:56:57 raspberrypi systemd[1]: Starting dhcpcd on all interfaces…
    Aug 01 10:56:57 raspberrypi dhcpcd[1551]: Not running dhcpcd because /etc/networ
    Aug 01 10:56:57 raspberrypi dhcpcd[1551]: defines some interfaces that will use
    Aug 01 10:56:57 raspberrypi dhcpcd[1551]: DHCP client or static address
    Aug 01 10:56:57 raspberrypi systemd[1]: dhcpcd.service: Control process exited,
    Aug 01 10:56:57 raspberrypi systemd[1]: Failed to start dhcpcd on all interfaces
    Aug 01 10:56:57 raspberrypi systemd[1]: dhcpcd.service: Unit entered failed stat
    Aug 01 10:56:57 raspberrypi systemd[1]: dhcpcd.service: Failed with result ‘exit
    the journalctl -xe shows this:
    Aug 01 10:58:36 raspberrypi chat[1668]: ^M
    Aug 01 10:58:36 raspberrypi chat[1668]: +COPS: 0^M
    Aug 01 10:58:36 raspberrypi chat[1668]: ^M
    Aug 01 10:58:36 raspberrypi chat[1668]: +CGREG: 0,0^M
    Aug 01 10:58:36 raspberrypi chat[1668]: ^M
    Aug 01 10:58:36 raspberrypi chat[1668]: OK
    Aug 01 10:58:36 raspberrypi chat[1668]: — got it
    Aug 01 10:58:36 raspberrypi chat[1668]: send (AT+CGDCONT=1,”IP”,”t-mobile”,,0,0^
    Aug 01 10:58:36 raspberrypi chat[1668]: expect (OK)
    Aug 01 10:58:36 raspberrypi sh[482]: expect (OK)
    Aug 01 10:58:36 raspberrypi sh[482]: ^M
    Aug 01 10:58:36 raspberrypi sh[482]: ERROR
    Aug 01 10:58:36 raspberrypi sh[482]: — failed
    Aug 01 10:58:36 raspberrypi sh[482]: Failed (ERROR)
    Aug 01 10:58:36 raspberrypi chat[1668]: ^M
    Aug 01 10:58:36 raspberrypi sh[482]: Script chat -s -v -f /etc/chatscripts/chat-
    Aug 01 10:58:36 raspberrypi sh[482]: Connect script failed
    Aug 01 10:58:36 raspberrypi chat[1668]: ^M
    Aug 01 10:58:36 raspberrypi chat[1668]: ERROR
    Aug 01 10:58:36 raspberrypi chat[1668]: — failed
    Aug 01 10:58:36 raspberrypi chat[1668]: Failed (ERROR)
    Aug 01 10:58:36 raspberrypi pppd[1666]: Script chat -s -v -f /etc/chatscripts/ch
    Aug 01 10:58:36 raspberrypi pppd[1666]: Connect script failed

  7. hi,
    i just bought this shield. i’ve tried to set this up.
    when i run the command “sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf”, i see the SIXFAB. but at the end i can’t connect through internet via the shield. and i don’t see the SIXFAB in the network list

  8. @Saeed,
    Can you make an update to this tutorial for using the QMI interface instead of the PPP interface? Using the sixfab hardware, I’ve gotten internet over LTE via QMI, but I can not get routing from wlan0 to wwan0 to work. Do I have to use PPP for routing to work?

    Thanks in advance.

  9. Geting error when i run the below command please help me to come out of these.
    sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
    Configuration file: /etc/hostapd/hostapd.conf
    Line 1: unknown configuration item ‘nterface’
    Line 2: invalid/unknown driver ‘nl80211 # Use the nl80211 driver with the brcmfmac driver’
    Line 3: invalid SSID ‘SIXFAB # This is the name of the network’
    Line 4: unknown hw_mode ‘g # Use the 2.4GHz band’
    Line 13: invalid key_mgmt ‘#’
    Line 15: invalid cipher ‘CCMP # Use AES, instead of TKIP’.
    FT (IEEE 802.11r) requires nas_identifier to be configured as a 1..48 octet string
    7 errors found in configuration file ‘/etc/hostapd/hostapd.conf’
    Failed to set up interface with /etc/hostapd/hostapd.conf
    Failed to initialize interface

    1. Hey,
      make sure there is no typo.
      Line 1: unknown configuration item ‘nterface’

      Should be interface instead of nterface.

  10. sudo service dhcpcd restart
    Job for dhcpcd.service failed because the control process exited with error code.
    See “systemctl status dhcpcd.service” and “journalctl -xe” for details.

    Getting error for above command , what is the issue?

    1. Hi.

      The contents of the dnsmasq.conf file are incorrect. We’re working on a faster and easier hotspot tutorial. Soon..

      Good day.

  11. Hi sir, when i run the below command am getting the following error. Actually now my raspberry pi 3b is using the internet from GSM modem and next i want my Pi to turn it to be act like access point so that other device can connect to hotspot and access internet from gsm. Sir please can you help me to overcome this problem.

    sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
    Configuration file: /etc/hostapd/hostapd.conf
    Line 2: invalid/unknown driver ‘nl80211 # Use the nl80211 driver with the brcmfmac driver’
    Line 3: invalid SSID ‘SIXFAB # This is the name of the network’
    Line 4: unknown hw_mode ‘g # Use the 2.4GHz band’
    Line 13: invalid key_mgmt ‘#’
    Line 15: invalid cipher ‘CCMP # Use AES, instead of TKIP’.
    FT (IEEE 802.11r) requires nas_identifier to be configured as a 1..48 octet string
    6 errors found in configuration file ‘/etc/hostapd/hostapd.conf’
    Failed to set up interface with /etc/hostapd/hostapd.conf
    Failed to initialize interface

  12. Hii,
    Am using sim7100E 4G module and now i followed above steps and successfully completed to create hotspot but the thing is internet is very slow even though it is 4G. how i can make internet speed?

  13. Hii,
    Am getting internet but very slow even though am using 4G gsm module. What is the issue and how i can make my internet at 4G speed.

  14. Hii,
    Am getting internet but very slow even though am using 4G gsm module. What is the issue and how i can make my internet at 4G speed. Please help me.

Leave a Reply

Your email address will not be published. Required fields are marked *