I'am trying to setup my Raspberry using a SIM800L as GPRS link. I setted got back full UART to GPIO disabling BT in my board. I have a small python code snippet to test communication between both boards:
import serial
import RPi.GPIO as GPIO
import os, time
GPIO.setmode(GPIO.BOARD)
Enable Serial Communication
port = serial.Serial("/dev/serial0", baudrate=115200, timeout=1)
Transmitting AT Commands to the Modem
'\r\n' indicates the Enter key
port.write('AT'+'\r\n')
rcv = port.read(10)
time.sleep(1)
print rcv
I send a simple AT command wating an OK as answer. The problem is that sometimes works but other times I get weird chars printed and I am not able to identify where could be the mistake. Any ideas? Raspberry GND is connected to SIM800L GND.
I tested SIM800L module with another interface (BusPirate board) and it works ok...