Home/Support/Support Forum/Receiving b'' when trying to enter command mode
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Receiving b'' when trying to enter command mode

0 votes
I am trying to enter command mode by sending the command character. Instead of receiving "OK" I am receiving b''. Here is my code:

def command_mode(command):
for _ in range(10): # Limit retry count
time.sleep(0.1)
ser.write("+".encode("ascii"))
time.sleep(0.1)
ser.write("+".encode("ascii"))
time.sleep(0.1)
ser.write("+".encode("ascii"))
print("+++")
receive = ser.read(ser.in_waiting)
print(str(receive)) # I am receiving b''
if str(receive).find("OK") != -1:
ser.write((command + "\r").encode("ascii"))
break
asked Jul 9 in Python by dpatel New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
That sounds like you are entering the bootloader and not AT command mode. Check and see if you are holding the DI line low.
answered Jul 9 by mvut Veteran of the Digi Community (12,834 points)
...