0
votes

I try to get my SIM7070G Cat-M/NB-IoT/GPRS HAT running with micropython on a ESP32 MC via UART. Unfortunately I did not find any libraries but I thought this can not be too difficult with micropython. I am working on this problem now for 3 days and do not get any response when sending commands with uart.

USB with computer: Sending AT commands gives an answer like sending AT and receiving OK.

Micropython:

from machine import UART
from time import sleep

sleep(1)
print("activate")
p = Pin(27, Pin.OUT, Pin.PULL_UP)
sleep(0.1)
p.on()
sleep(1)
p.off()

sleep(0.5)

print("activated")

uart = UART(1, 115200,rx=9,tx=10,timeout=5000)  
#uart.init(9600, bits=8, parity=None,rx=25,tx=26,stop=1)
uart.write(b'AT\r\n')
print("uart.write(b'AT\r\n')")
sleep(1)
data = uart.any()
print(str(data))

I just do not get a response. data is always 0.

What I tried:

  • checked connection 100 times, TX->RX and RX->TX, 5V, GND, PWR
  • different pins did not work
  • different baudrate... no difference.

Anyone a solution? That would be really great.

Link to manufacturer of SIM7070G HAT

1
The SIM7070 has 3 UARTS, but there is only one as AT-command interface. When you connect via USB port, it will open up two Serial ports, one for system boot log, one for AT-Command. If you want to use the UART to interface with the module, disconnect the USB port prior boot. The Sitcom module also has auto baud rate detection, so you need to send AT a couple time to get the `OK' acknowledgement. - hcheung
For more information about the UART interface, you can read section 3.3 of Hardware design documentation. - hcheung

1 Answers

0
votes

I figured out the solution. As @hcheung sais, I have to call AT command a few times (up until 10 times) to let the module get the baudrate. It will work than properly.