8

I am confused about how to connect SIM800 GSM module to RaspBerry PI 3. I connect the module to RaspBerry PI using the GPIO pins. What happends now?

Are those GPIO pins automatically connected to RaspBerry PI? Should it already work? I no, do I have to connect the module using UART TTL USB converter anyway using 6, 8 and 10 GPIO pins? Even if it is connected to RaspBerry PI using all GPIO pins?

Crazyjavahacking
  • 189
  • 1
  • 1
  • 4

3 Answers3

6

Assuming you are talking about one of these that looks like this you should go over this to test your device.

RPI SIM 800 GSM

From what I can see

  • This device communicates over serial port (USART) using board pins (8-TX, 10-RX) and supports the AT commands
  • When you connect this device to the PI, the required USART pins are connected to module and the rest of the pins are brought out so that you can connect another 'hat' on top.
  • Make sure to first disable the default console that takes control over the serial port on startup before trying to communicate with this device
  • You can use a serial terminal such as minicom to send and receive AT commands and responses and verify the device works as expected
  • Having worked with a similar device before (SIM 900A), I strongly recommend using a external power supply (2A+ capacity) via the micro-usb connector to power this hat as it requires quite a bit of power as quoted here
  • GSM works best with clear LOS to satellites (meaning doesnt work great indoors) you might need to go outside to check

If SIM800 will drop off while working, please connect a external at least 5V/2A power supply to this micro usb.

If this is not the device, share more details (a picture would be nice :) )

HTH

Shreyas Murali
  • 2,416
  • 1
  • 14
  • 20
  • Waw! Awesome answer, thanks I will try. How did you find out that the required USART pins are connected and the rest are free to use? – Crazyjavahacking Sep 23 '16 at 04:16
  • if you look closely at the zoomed in image [here](https://www.itead.cc/wiki/images/3/3b/IM150720001-Raspberry_PI_GSM_SIM800_Add-on_V2.0_%288%29.jpg) you can see where the traces on the PCB is going. Typical design of 'hats' is to have traces that connect the required pins to the module and pass the rest through so that the other hats can do the same. – Shreyas Murali Sep 23 '16 at 04:37
  • Sorry to revive this thread, but is this shield compatible with Raspberry Pi 3 Model B+? – r2b2 Jul 28 '19 at 04:23
  • @r2b2 I'd assume so. AFAIK the pin headers have always been pin compatible from the original A+ (the first model A/B had less pins exposed). some details [here](https://www.raspberrypi.org/forums/viewtopic.php?t=121101) and [here](https://en.wikipedia.org/wiki/Raspberry_Pi#Connectors). Compatibility is usually a great USP for any product series – Shreyas Murali Jul 28 '19 at 04:48
5

I was having trouble making my SIM800 hat work with my Raspberry Pi Zero W; I thought it could be because of burnt gpios... So I tried with my Raspberry Pi 3. Same trouble.

I then found this solution and it works on my RPI III (I have not tried on Zero):

https://www.modmypi.com/blog/how-to-connect-your-raspberry-pi-to-a-3g-network

In this tutorial we will show you how to connect your Raspberry Pi to a 3G network using the Itead Raspberry Pi GSM Board (SIM800). This breakout board communicates to the Pi over serial, but as we know the serial ports of the Pi are initally already in use, so we will need to do a bit of jiggery pokery to free up the serial ports.

Free up your serial ports

First we need to edit the /boot/config.txt file

sudo nano /boot/config.txt

Add the following lines

dtoverlay=pi3-miniuart-bt
enable_uart=1
force_turbo=1

Now we need to edit the /boot/cmdline.txt file

sudo nano /boot/cmdline.txt

Remove all references of "console=", for example, if the line reads:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

Change it to:

dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

Next, we need to edit the /lib/systemd/system/hciuart.service file:

sudo nano /lib/systemd/system/hciuart.service

Comment out the After= line (by adding the # symbol at the begining of the line) and add the following on a new line

After = dev-ttyS0.device

Comment out the ExecStart= line (by adding the # symbol at the begining of the line) and add the following on a new line

ExecStart = /usr/lib/hciattach /dev/ttyS0 bcm43xx 460800 noflow -

I hope it helps someone!!

karlphillip
  • 103
  • 3
Rubens
  • 51
  • 1
  • 1
2

I have the SIM800 GSM addon hat for a Raspberry Pi 3 and got it to work with T-Mobile amazon link

Using this website as a reference: https://www.rhydolabz.com/wiki/?p=16325

I followed these steps:

sudo apt-get update
sudo apt-get install ppp screen elinks
sudo -i
nano /etc/ppp/peers/rnet

Add the following to the file

#t-mobile is the apn
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T fast.t-mobile.com"
# For Raspberry Pi 3 use /dev/serial0 as the communication port:
/dev/serial0 
# Baudrate
115200 
# Assumes that your IP address is allocated dynamically by the ISP.
noipdefault 
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route to the internet.
defaultroute
# Makes PPPD "dial again" when the connection is lost.
persist
# Do not ask the remote to authenticate.
noauth
# No hardware flow control on the serial link with GSM Modem
nocrtscts 
# No modem control lines with GSM Modem
local

Then activate your new ppp connection

sudo pon rnet

If everything works you can do ifconfig and you should see a new ppp0 connection

ifconfig

It pulls an ip address from my sim. My only issue is the connect speed is really slow. I pull up yahoo.com and it takes a good 30 seconds to load. Speedtest.net barely loads. Trying figure out why that is. If I put my sim card into a GSM backup router I get about 8-10mbps down, so I know the signal and sim data package is good. Any further suggestions?

Chad Priddle
  • 121
  • 2