3

I can find a lot of search results for connecting the SIM800L with arduinos, quite a few specs, some answers (1, 2, 3); but what i can't find is how to connect this GSM module to a Raspberry Pi B+ 1.2.

Am i missing something obvious? I'm tinkering with IoT stuff and a fritzing diagram or something would be amazing.

Edit01

Well i managed to connect it using the Pi's GPIO along with some textual description and a nifty image for Arduino.

SIM800l RPi GPIO
5VIN    2
GND     39
TXD     10
RXD     8`

I used this guide to do some basic testing, but either with python or minicom (on 9600 baud, even with AT+IPR=9600) sometimes it looks as though the serial connection just stalls.

I disabled echo (as per a link i lost) and use a 1s delay before sending a command, but it still kinda stalls.

The breakout is the one in the first link and it has two active LEDs: D6 NET: always blinking D2 RING: always on At regular intervals,they'll both turn off for 1-2s.

An antenna is connected (which largely improved the output of AT+COPS=?) but the thing can't seem to register.

Periodically I get back

+CFUN: 1
+CPIN:READY
Call Ready
SMS Ready`

when using minicom (sudo minicom -o -b 9600 -D /dev/ttyAMA0). I assume these are UCs but i don't think they'd interfere.

The /dev/ttyAMA0 line is commented out in inittab and this Pi has no /boot/cmdline.txt serial issues.Also, even after AT+CREG=2 with a corresponding OK, AT+CREG? The SIM doesn't need a PIN (always READY).

I'm out of ideas, i suspect it's some misconfiguration.

Suncatcher
  • 185
  • 1
  • 1
  • 9
vesperto
  • 151
  • 1
  • 1
  • 6

3 Answers3

2

This part:

SIM800l RPi GPIO
5VIN    2
GND     39

suggests that you're powering your GSM modem via your RPi. Don't do that! SIM800 can consume up to 2A during transmission, and your RPi doesn't have extra 2A lying around. Even if your power supply can provide 4.5A, your USB cable, micro USB plug and the over current protection circuit or the RPi are not designed to cope with such currents.

Get a separate power supply for the modem, and only connect GND, TX and RX pins between the RPi and SIM800.

Dmitry Grigoryev
  • 26,688
  • 4
  • 44
  • 133
1

If you periodically get back the info you stated, then maybe you have issues with power supply. Check if it is about 3,7 volt. If is it too low your sim module may restart sometimes. And also check if your power source can provide up to 2 A current.

Andy
  • 11
  • 1
0

I couldn't get it to work so i used a Huawei K3565 USB dongle instead.

Python code to send the message:

command = 'echo "your message here" | gnokii --config .config/gnokii/config --sendsms +351987654321'
output,error  = subprocess.Popen(command, universal_newlines=True, shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()

gnokii config file:

[global] 
port = /dev/ttyUSB0 
model = AT 
connection = serial 
[connect_script] 
[diconnect_script]

YMMV on the /dev, check dmesg.

vesperto
  • 151
  • 1
  • 1
  • 6
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year. – Ingo Mar 03 '20 at 12:57