Hello,
I’m trying to interface a SIM7100A LTE module from SIMCOM. I installed the driver and I can see now ttyUSB0 to 4 on dev directory.
The issue is that my simple code which writes an AT command on serial port using python pyserial library and listens to the return doesn’t work.
In many cases it gets nothing, sometime it gets the respond but this cases are rare.
I tried Minicom and I can type AT commands on modem and get the respond from LTE module on the same port correctly. So I can make sure that the module is working, and the serial port settings are correct.
I also tried exactly same code on other system (Ubuntu 14 on my laptop and Ubuntu 16.04 on another processor iMX6)
My feeling is that the carriage return is different in TX2 environment.
I tried all of ‘\r’, ‘\r\n’ and ‘\n’ as new line at the end of the command but non of them are working.
Here is my simple code:
import time
ser=serial.Serial(port='/dev/ttyUSB2', baudrate=115200, timeout=1)
ser.write('AT\r')
while True:
response = ser.read()
print(response)
ser.close()