UART with GSM SIM800L
Posted: Sat Sep 10, 2016 3:48 pm
Hello guys (and girls),
I am currently trying to work with a GSM module: the SIM800L (http://wiki.seeedstudio.com/images/4/46 ... _V1.00.pdf)
I connected my UART 1 Pins to the RX and TX of the board but I could not get anything from the board: when I send an ATI message, I get nothing back.
My code is:
And the output of the commands I send are:
So, it seems I sent 5 bytes but get nothing in return while I should have something...
Could someone help me with that? Am I initializing the UART correctly? Might it be an issue with the SIM card (I am not sure it is activated yet, that's why I only sent the ATI message)
Thank you
I am currently trying to work with a GSM module: the SIM800L (http://wiki.seeedstudio.com/images/4/46 ... _V1.00.pdf)
I connected my UART 1 Pins to the RX and TX of the board but I could not get anything from the board: when I send an ATI message, I get nothing back.
My code is:
Code: Select all
from machine import UART, Pin
TERMINATION_CHAR = '\x1a'
TXD_PIN = 'GP16'
RXD_PIN = 'GP17'
RST_PIN = 'GP22'
RST = Pin(RST_PIN, mode=Pin.OUT)
RST.value(0)
uart = UART(1, baudrate=115200, pins=(TXD_PIN, RXD_PIN))
RST.value(1)
Code: Select all
>>> uart.write('ATI\r\n')
5
>>> uart.any()
0
>>> uart.readall()
>>>
Could someone help me with that? Am I initializing the UART correctly? Might it be an issue with the SIM card (I am not sure it is activated yet, that's why I only sent the ATI message)
Thank you