Home/Support/Support Forum/How do you disable control characters from unintentionally calling certain REPL commands?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How do you disable control characters from unintentionally calling certain REPL commands?

0 votes
Hello all, I'm stumped on how one would keep the REPL on an XBee3 LTE-M modem from unintentionally going into "Paste" mode or other mode when receiving raw data via the UART. I'm reading in data from the UART using "stdin_data = sys.stdin.buffer.read(-1)" but the trouble I'm having is that I have a lot of data with control characters. For example a line ending of 0x0d resets the REPL. How can you avoid this? I see there is a raw REPL mode but again a control character received of 0x0b would knock it out of this mode.
asked Apr 30 in Python by samson49 New to the Community (2 points)

Please log in or register to answer this question.

1 Answer

+1 vote
 
Best answer
Samson,

Try using the Micro Python UART instead of the REBL interface for your data going in and out of the XBee. That should take care of the issue.

Digi Support
answered Apr 30 by mvut Veteran of the Digi Community (13,489 points)
selected May 1 by samson49
Can you elaborate on what you mean?  Technically I am using the primary UART with the sys.stdin command in Micropython.  Are you saying use the secondary UART?  If so my hardware is tied to the primary unfortunately.  Not sure I follow what you're suggesting.
Yes, that is what I am referring to. The secondary UART is designed for sending data to the Micro Python interface when it is enabled where by the primary uart is the REBL interface only.
Thanks for the reply mvut.  I have a follow-up question related to this, can the secondary UART be used for API mode w/o escapes or is that only possible on the primary UART?
The primary UART will not function with API frames when you are in Micro Python mode so I don't see how that would have worked.

As for the Python serial port, I don't know as I have never tested that.
...