I am trying to communicate with my module by using a Python file. I create line-break point to be sure that I will have an interruption while writing in the module.
But, I don't have any result for reading from the port communication. I need to display all data in my cmd.exe and that already diplayed on COM4 by using my python file
import serial
ser = serial.Serial(
port='COM4',\
baudrate= 230400,\
parity=serial.PARITY_NONE,\
stopbits=serial.STOPBITS_ONE,\
bytesize=serial.EIGHTBITS,\
timeout=0) # open serial port
print(ser.name) # check which port was really used
ser.write(b'hello') # write a string
str=ser.readline()
print str
ser.close() # close ports
That means that these two lines:
str=ser.readline()
print str
don't give me any results.