Following Tutorial is old. Please follow new PPP installer tutorial.
Sixfab GSM/GPRS Shield is using Quectel M66 GSM/GPRS module. It bears the optimal performance in SMS, Data transmission and audio service. Due to the small size(equal to size of raspberry pi zero) it is easily embeddable in any project like video streamer, establishing Internet connection, security systems, tracking system etc.
Features:
• It is a quad-band module(850/ 900/ 1800/ 1900MHz).
• Works on 3.3V ~ 4.6V(which is provided by the Raspberry Pi) No external power supply required.
• Operates at -35°C ~ +80°C.
• Supports Bluetooth BT 3.0 , Voice support
• Controlled via AT commands
• Autobauding 4800bps to 115200bps
• Maximum download speed 85.6kbps
• Uses UART ports or USB port (switchable port)
Now we will use this shield to create PPP (Point to Point Protocol) internet connection. Elaborated steps are stated below.
So the shield comes a 2×20 pin female header.
Sixfab GSM/GPRS shield
1. The header is later soldered with the shield.
Soldered Header
2. Once soldered SIM is inserted.
Inserting SIM
3. Since the shield can be used either with UART or USB. It is needed to be selected with the switch available on the the shield. We select Pi here.
USB<>Pi Switch
4. Now it is connected to Raspberry Pi 3 Model B.
Shield with Raspberry Pi 3 model B
5. Connect Raspberry Pi to internet via WiFi or Ethernet.
Open the terminal(if you are using desktop or laptop you may connect raspberry pi with SSH. Also enable ssh from the Menu > Preferences > Raspberry Pi Configuration as shown in the figure below)
Raspbian interface
Raspberry Pi Configuration
6. Once Raspberry Pi is connected, run following command in order to update Raspberry Pi.
sudo apt-get update
Update command in Terminal
7. Now the getty service needs to be stopped on Raspbian. Getty manages a terminal line and it protects the system from unauthorized access. By default GPIO14 and GPIO15 of Raspberry Pi are active as console. So it need to be disabled as serial console is not being used. Moreover the service of serial console is to be deleted from cmdline.txt. Run the following commands (terminal is connected to /dev/ttyS0 in this case)
sudo systemctl stop serial[email protected] sudo systemctl disable serial[email protected]
As in previous versions Raspberry Pi terminal is connected to /dev/AMA0, following commands should be used instead.
sudo systemctl stop [email protected] sudo systemctl disable serial-[email protected]
Stopping getty
8. Now console has to be removed from the cmdline.txt. This can be done by running following command
sudo nano /boot/cmdline.txt
and removing ”console=serial0, 115200” or ”console=ttyAMA0, 115200” for Raspberry Pi other than version 3. Exit editor saving the changes.
Removing “console = serial0, 115200”
Now Raspberry Pi is rebooted.
9. UART is enabled by adding ”enable_uart=1” at the end of text which is obtained by following command
sudo nano /boot/config.txt
Adding “enable_uart=1”
10. In this step minicom will be installed, which is a serial communication program.
sudo apt-get install minicom
command will install the minicom to the Raspberry Pi.
installing minicom
11. The settings will be configured now by
minicom -s
Opening minicom
minicom settings
12. Serial port setup is selected
Selecting Serial port setup
This brings up following screen
Serial Port setup Screen
13. Following changes are to be made
Serial Device: /dev/ttyS0 and Hardware Flow Control: No
Changing Settings
14. The setup is saved as default
Saving the changes
This will open minicom screen.
minicom screen
15. In order to check either it working or not type ‘AT’ and enter. If it responds with ‘OK’ then its working properly.
For exiting this press CRTL-A Z then follow instructions
minicom screen
minicom screen
minicom screen
Indicating Power Up Button
16. Now before moving to next step POWER UP the shield with the press button available on the shield. Then blue led of State will blink which indicates successfully powered up of the shield.
The shield can also be Powered Up by making GPIO 25 HIGH for 2 seconds and then LOW, as GPIO 25 is connected to POWER KEY of the shield.
Pin assignment of the shield is provided below.
Pin Assignment of shield
17. This step includes the connection tutorial
Here ppp-creator.sh is to be downloaded. Installation is done with following commands:
wget https://raw.githubusercontent.com/sixfab/rpiShields/master/tutorials/tutorial2/ppp-creator.sh chmod +x ./ppp-creator.sh sudo ./ppp-creator.sh HOLOGRAM ttyS0
In the last command HOLOGRAM is the APN of the network operator. ‘ttyAMA0’ will be used instead of tty0 in case of other versions of Raspberry Pi.
18. Now the shield is ready to connect to internet. Disconnect Raspberry Pi from WiFi or Ethernet.
Type
sudo pppd call gprs
or
sudo pppd call gprs&
Here & sign is used to run the command in background.
(Open a browser and check a website)
Connecting to Internet
19. Just to check the status of shield and ip, type
ifconfig ppp0
Checking IP and status
Is there any way to have the shield automatically power on without having to press the power button?
I’ve an idea to use this in a remote unit to establish a PDP Context automatically, but that won’t work if the power has to be manually enabled every time the Pi has to restart.
Hi, GPIO25 is connected to the PWR KEY pin. if the GPIO25 made HIGH for 2 seconds then made LOW, the module will Power Up.
Thanks – I’ll try that.
Thanks also for the updated Tutorial – it helps a lot 🙂
Any chance you might be able to update the GPS one in the future please?
Yes, We will.
Thx a lot for this valuable content. Also here you can talk about AT+CSQ command to see signal strength, something like this http://m2msupport.net/m2msupport/atcsq-signal-quality/
Did you ever try your module with any 40-pin sensor HAT or SPI LCD? Have you seen any problem e.g. suddenly power down?
We haven’t tried yet. It may be about power, you can add external power for you HAT or LCD.
Metin, Thanks for the reply. I read the answer you reply to Lloyd and I got my answer at the same time. My problem is that my PIR sensor is installed on GPIO25 🙂 bad luck! So I cannot use it with Turta HAT absolutely… Can you share the detailed pin assignment of the GSM/GPRS shield?
I hope this will help you.
http://37.139.15.52/product/gsmgprs-shield/
Hello , i am new for this environment. In my ongoing project i want to have following feature with my Rpi3 .
1. IoT feature – I hope to get IoT server as Google IoT server.
2.I want to host my internet connection via WiFi.
I think Sixfab GSM/GPRS Shield is more enough for my requirement used than 3g shield because power and the price.But could i confirm from expertise that before buying the module.
Please note that i have to used sim integrated module because there is no any wifi AP modem.
Thank you.
https://frillip.com/using-your-raspberry-pi-3-as-a-wifi-access-point-with-hostapd/
Only is necessary disable serial in the Raspberry pi configuration or run in the terminal raspi-config command, if rasperry pi is version 1 B, B+ or Zero use ttyAMA0. For higher versions use ttyS0.
Hello,
Is it possible to use the GPRS module with GPS and with the Rasp Zero? I want to send GPS data to an external server.
Thanks
Yes, You can use it like Rpi3.
What’s the 1-wire (gpio 4) for? I noticed in the raspian config screenshots here, they don’t show 1-wire enabled. My guess is that it’s an optional feature, can you tell us more? Thanks!
How do you use 1-wire? > Your answer in this blog entry! > http://37.139.15.52/tutorial-6-raspberry-pi-ds18b20-temperature-sensor-logger-with-sixfab-xbee-shield/
Cannot type into minicom.
Followed instructions. As I run minicom and try to test by typing AT, nothing appears.
I’m using Putty through SSH
Thanks
Do you select switch into Uart?
Do you Power-Up your module with POWER UP button ?
Tried to power up the module with setting the GPIO pin 25 to high, but the module does not power up. Measured the voltage in GPIO 25 and it was 3.3 volts.
Can You tell me what I am doing wrong?
What is version of shield ? if no version on pcb , please use GPIO26
Version V1.5, I received a couple of weeks ago.
GPIO26 is correct pin for V1.5. And works fine to start modem. How can I check if modem is started before try to start with GPIO26?
You can check with VDD_EXT ( PIN19). When module powered up, VDD_EXT pin goes HIGH.
Thank you very much Metin. It works.
Status update: GPIO 26 did it. It did start up.
Is there a way to check if shield is on with python? My plan is to use without display/keyboard or other peripherals.
Another problem raised: The internet connection fails to open. Did the setup exactly as in this tutorial, but the module does not respond to AT commands at all in minicom. The setup is:
– raspberry pi zero W
– Sixfab GSM/GPRS Field V1.5
– Latest rasbian OS
Tested the raspi with sim800c raspberry module, and the connection succeeded immediatelly.
Is there any trouble shooting instructions?
Hello,
I am using GPIO 3 shutdown and start raspi.
I have a led button that I want to indicate when device is sending data. What GPIO pin is free for driving the LED? Is there a pin that is not connected to shield so I could safely use it as light up the LED?
I got”LCP terminated by peer” error:
https://prnt.sc/ijwu9c
Please help me whats wrong?
(Yardım beklemekteyim.)
Can you send all log? This is some part.
Hello,
I followed all the steps in this tutorial and it seems like I am connected to the Hologram network. This is confirmed when I log into my Hologram Dashboard and it shows that my sim card is active on the T-Mobile network and my device is being logged.
The problem is that I can not send any data to or from my device when I am connected via the gprs modem. I have tried to open a web browser and surf to google.com, but no dice. I have also tried sending TCP sockets, and HTTP using the Rest API for Hologram and nothing seems to work. I also tried to ping google.com and nothing.
Can anyone please give me some advice? I am wondering if it is a low signal issue, maybe I need an antenna? It looks like there is no CLI to support this product so I am wondering if there is a way to check the signal strength.
I contacted Hologram and they said that the Hologram CLI can work with other modems but the code which is available on github needs to be modified to work with the Quectel modem on the shield.
Please run those commands.
sudo route del default
sudo route add default ppp0
YES! Thank you, thank you, thank you. Finally, I am moving on with my project. If all goes as planned I will be contacting you to get more gprs shields soon. Thank you.
Hello;
I tried and practiced this practice. I got an IP but I could not connect to the ssh server from the outside with the ip I got. Could you help me with the subject.
Thank you,
Good work.
Because this IP is virtual, you have to get static IP from your operator.
Is there any way to have the shield automatically power on without having to press the power button when the shield is connected to Raspberry via USB?
Please use script like this
#!/bin/sh
gpio mode 26 in
gpio mode 23 out
while true; do
if [ $(gpio read 26) = "0" ]; then
echo "Power up"
gpio write 23 0
gpio write 23 1
sleep 2
gpio write 23 0
else
NCHECK='ifconfig ppp'
NCHECK1='echo $NCHECK | cut -d " " -f 1'
if [ "$NCHECK1" = "ppp0" ]; then
echo "Connection up, reconnect not required..."
exit 0
else
echo "Connection down, reconnecting..."
sudo /sbin/ifdown ppp0
sudo /sbin/ifup ppp0
fi
fi
sleep 1
done
Hello,
It stops internet and pings after some time. Anyone facing this problem.
It works! Was able to get online.However, I can’t figure out how to disconnect or hangup the connection once established! ifdown ppp0 does nothing.
Thanks!
Please use sudo ifdown ppp0
If I am connected to the network with pppd, how can I get the signal strength for the board from userspace without killing the connection?
Thanks
My M66 does not power off after issuing AT+QPOWD=1. It prints “NORMAL POWER DOWN” on the serial line, and indeed powers off, but after 5 seconds it powers on again, and connects to the GSM network.
Do you have an idea why this happens?
Please check PWRKEY pin, You have to set it to LOW.
Hi,
I get such an error ..(https://prnt.sc/ijwu9c)
Why?
meanwhile
are you turk?
Did you activate HOLOGRAM?
Hello, can you please advise me the best way to get the modem location while connected to PPP? I tried to connect to minicom to issue the quecklocator command but it says “minicom is locked”. I also tried to use the Hologram SDK but it says “modem not detected”. I really need to be able to get the location of the device for it to work with my use case. Please help. Thank you.
Hi everyone,
I’ve read that some people had problems with the disconnection process, as I had. I have figured out that the script: quectel-chat-disconnect seems to be wrong:
With this one, the error in the disconnection process disappeared:
ABORT “ERROR”
ABORT “NO DIALTONE”
SAY “\nSending break to the modem\n”
“” +++
“” +++
“” +++
SAY “\nGoodbye\n”
I hope it helps.
Best regards.
Hello everyone,
I am asking this to experienced users or admins, can i use this module to connect internet by not using UART but using USB serial communication (micro usb power socket). I can use usb socket to send and receive data by minicom or cutecom but is there no way to use for internet ppp?
Thanks for the reply.
Hi,
Yes you may use USB instead of UART. For this you will need to switch towards USB. Then Start from step 17 of the tutorial.
Use ttyUSB0 instead of ttyS0.
Thank you for the reply Saeed! I will try to connect internet using micro-usb port and let you know the results.
Have a nice day.
Hello,
Is there any instruction similar to this:
https://sixfab.com/updated-tutorial-2-make-a-ppp-internet-connection-with-sixfab-gprs-shield-on-raspberry-pi/
But for shield Cat-m and nb-iot with quectel BG-96?
I would need to control robot remotely through Massive IoT network.
Thanks and best regards
Oscar
Hey,
You can find all of our available tutorials in this link https://sixfab.com/tutorials/
If you are looking for ppp connection with Raspberry Pi Cellular IoT Application Shield then we will be publishing it soon.
Thanks
Hi community!
I managed to setup a ppp connection.
Is it possible to remotely connect to this ppp connection?
Regards
David
Hello,
Yes, it is possible by connecting remotely to Raspberry Pi.
Hi,
Is it possible to use a VPN connection with this shield (M66) and pppd?
Is there any tutorial?
Best regards
Hello, Yes it is possible to connect. But the speed is very low around 38kbps.
Are there any examples or howto’s of having a gprs data connection active and detecting mobile phone calls (RING) *at the same time*? A feat every single phone can manage, but I can’t seem to replicate.
Hello,
PPP connection and MAnaging call at the same time is not possible with 2G.
Followed this set up.
Failed at number 14 setting up minicom.
Cant write to file.
Using sudo file written but cant enter AT or anything else.
HELP
Please follow PPP installer
(JUST FOR RECORD)