I'm just trying to setup a communication between a development board and my Ubuntu system through the serial port.
I'm using the pyserial package with python3.9.
if __name__ == '__main__':
ser = None
try:
ser = serial.Serial('/dev/ttyUSB2', 115200, timeout=5)
print('Successfully connected!')
except ConnectionError as msg:
print(msg)
cmd = b"AT\r\n"
#cmd = "AT"
#ser.write(cmd.encode)
#ser.write(cmd.encode('utf-8')
ser.write(cmd)
resp = ser.readline()
print(resp)
ser.close()
I've already tried to send that command 'ATE0' to turn off the ECHO, but it doesn't work.
Please, if you have any idea about this, I would appreciate the help.