Raspberry Pi connect to 4G LTE

What you need

Alternative option: Raspberry Pi 4G/LTE HAT Kit from Sixfab

Assembly

  1. Install Mini PCIe 4G IoT Module on Raspberry Pi 3G/4G-LTE Base HAT, it is similar to installing RAM modules in laptop.

  2. Install Raspberry Pi 3G/4G-LTE Base HAT on Raspberry, it is simple.
    Installed onto Pi

    After assembly Raspberry Pi @sixfab

  3. Connect the Antenna to the Raspberry Pi 3G/4G-LTE Base HAT, the wire should be parallel if you connect them to right port.
    Connect Antenna

    Complete assembly @torbox.ch

The function of two outermost cable seem to be identical, all Antenna cables are parallel in my assembly and it works well.

Driver

Sixfab provides two methods to control the LTE module, PPP and QMI interface.

I used PPP connection here.

1
2
3
4
5
$ wget https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/master/ppp_installer/install.sh

$ chmod +x install.sh

$ sudo ./install.sh

Few options confused me and here are tips:

  • Choose your Sixfab
    • Always 2 for the 3G, 4G/LTE Base Shield (Compatible with 6 option for Raspberry Pi 3G/4G&LTE Base HAT)
  • APN
    • Google the APN for the service provider
    • Or insert the SIM Card to a phone and view the APN in settings
  • PORT name
    • For 3G, 4G/LTE Base Shield && Base HAT it will be ttyUSB3
    • Always ttyUSB3, no thing to do with physical port

Troubleshooting

Need auth option in setup

If your service provider need username/password to use the network, edit /etc/ppp/peers/provider later to add your username and password.
Remove line

1
noauth

And add two lines

1
2
user "YOUR USERNAME"
password "YOURPASSWORD"

Routing error

In this case, run the following commands

1
2
3
$ sudo route del default

$ sudo route add default ppp0

No network

Try manually connect to cellular network:

1
$ sudo pon

Modem hang up and you tried all solution, nothing work and do not know why

I have encountered few time on this problem, it hang up while connecting to network.
Because of incorrect APN, try all APN you can find on network and in your phone’s setting. To change the APN, edit /etc/ppp/peers/provider

1
2
$ sudo poff
$ sudo nano /etc/ppp/peers/provider

The APN is on the end of the 3rd line in my /etc/ppp/peers/provider.

Try every APN you can find for the service provider try connect with sudo pon and one of them should work.

DONE

1
2
3
4
5
$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=52 time=20.9 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=52 time=111 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=52 time=69.7 ms