nemo
nemo

Reputation: 633

weird characters displayed during serial communication OSX

I have tried communicating via serial (OSX w/ prolific drivers -> USB RS232 adapter -> Tx,Rx and GND pins on device serial ttl port) to a device and done so successfully using

screen /dev/tty.usbserial 115200 8N1

I get to log in and use it as if I was SSH or TelNetted in...

However whenever I try to go into system recovery mode (holding CTRL+1) while the device is powering on, it starts displaying weird characters and until I close the screen session it will continue showing weird characters:

enter image description here

Of course when we tried doing the same thing on my boss' macbook running windows and PuTTY and everything worked fine, even in system recovery mode; characters were displayed properly.

What gives? Id like to learn the intuition to use because up till now I concluded that since I can bot into the system and see characters normally everything about the connection should be fine and its must have been the recovery partition that was broken. This was wrong of course...

Niko

Upvotes: 3

Views: 3067

Answers (2)

Heath Raftery
Heath Raftery

Reputation: 4209

I don't quite understand why it occurs either, since the serial line protocol is just an independent series of asynchronous packets. Each character should be decodable regardless of what comes before it.

But I assume this is some sort of "emulation" mode shift. For example, the terminal is in "Xterm" or "VT100" emulation mode, and some errant sequence has changed the emulation settings and now characters are being decoded incorrectly.

In a full terminal emulator, you would use the "Reset Emulation" function. IME it's just as effective as closing/restarting the session, and a lot less hassle.

Fortunately screen also supports this feature. Try ctrl-a, Z. That is, hold the Control key, and press the a key. Then after letting go of both, hold the Shift key and press the z key.

Upvotes: 0

user2343577
user2343577

Reputation: 36

Dunno if it is a OSX problem,

I had similar problems before. I fixed it either by changing the Baud rate of the com ports or by making sure the Ground on the circuit is the same as the ground of the supply.

Upvotes: 1

Related Questions