Raspberry Pi connect to 4G LTE
What you need
- Raspberry Pi
- SD Card with Linux installed (NOOBS I used here)
- Raspberry Pi 3G/4G-LTE Base HAT
- Quectel EC25 Mini PCle 4G/LTE Module
- LTE Main & Diversity & GNSS Triple Port u.FL Antenna
Alternative option: Raspberry Pi 4G/LTE HAT Kit from Sixfab
Assembly
Install Mini PCIe 4G IoT Module on Raspberry Pi 3G/4G-LTE Base HAT, it is similar to installing RAM modules in laptop.
Install Raspberry Pi 3G/4G-LTE Base HAT on Raspberry, it is simple.
After assembly Raspberry Pi @sixfab Connect the Antenna to the Raspberry Pi 3G/4G-LTE Base HAT, the wire should be parallel if you connect them to right port.
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 | $ wget https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/master/ppp_installer/install.sh |
Few options confused me and here are tips:
- Choose your Sixfab
- Always
2
for the3G, 4G/LTE Base Shield
(Compatible with6
option forRaspberry Pi 3G/4G<E Base HAT
)
- Always
- 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
- For 3G, 4G/LTE Base Shield && Base HAT it will be
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 | user "YOUR USERNAME" |
Routing error
In this case, run the following commands
1 | $ sudo route del default |
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 | $ sudo poff |
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 | $ ping 8.8.8.8 |