I've been trying to connect my sim800L to my Raspberry pi 3 model B (rasbian) but without success...
I'm at the very first step, and since I'm new to Raspberry pi, I don't understand very well how it works.
Here is how I'm trying to connect it:
After some research, I've found that I needed to add some things to the
/boot/config.txt file in order to enable the UART, so I've added this :
Edit : my version is My version is 4.4.50-v7+ so I don't need
After, I found out a code that matched what I'm trying to do, here it is:
import serial import os, time # Enable Serial Communication port = serial.Serial('/dev/ttyS0', baudrate=9600, timeout=1) # Transmitting AT Commands to the Modem # '\r\n' indicates the Enter key port.write('AT'+'\r\n') rcv = port.read(10) print rcv
But nothing is working in the Python Shell, no matter if I'm using ttyS0 or Serial0, when I try the AT command, which is supposed to answer OK if the sim800L is successfully connected. I'm getting some basic error (after typing AT):
>>> AT Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> AT NameError: name 'AT' is not defined
How can I resolve this error?