Page 1 of 1

NanoPI NEO Uarts Showing Garbage

Posted: Fri Mar 09, 2018 9:36 pm
by bwilcutt
I have NaoPI Neo, just opened it out of the box yesterday and was testing the uarts.

I'm hooked to pins 6 (gnd), 8 (tx) and 10 (rx), running to my PC's pin's 2/3/5 (9-pin serial port).

My serial port is setup as:

# root@NovusOne:~# stty -F /dev/ttyS1
speed 9600 baud; line = 0;

I'm running Putty on my computer, serial port is set to 9600/8/N/1.

On the Nano, I do a simple:

# cat /dev/ttyS1

Which dumps out whatever shows up at the com port. On the Putty, I dump a small text file (I'm lazy). I get garbage.

# cat /dev/ttyS1
5�Wy_�_=9)��Y5�����g5#����囋�_!
��g!9='��}!�;5�=/5�!
%;/5�m_�=9)�����7���s'=1����Wy_�_!9)��Y5�����}9)�����g5#���噋�g!9='��_!
5�Ya9)�g=
5#�9!%��#���y!##-!#��y'!5��#�廡�#��嗋���}5=�!!�%=#

It's consistent at any baud rate with any bit/parity setting. I was unable to get ttyS0 to work at all [no response]. Device Tree file has been untouched. An interesting effect is I get the same pattern of garbage if I continue to repeat the paste operation. So, that tells me it's some kind of configuration.

Anyone have any idea what is going on?! Is my nanopi broke?

Thanks

Re: NanoPI NEO Uarts Showing Garbage

Posted: Fri Mar 09, 2018 11:44 pm
by bwilcutt
UPDATE:

I ran minicom on the port instead of doing a "cat /dev/ttyS2". Minicom is spewing out garbage as well. I played with all the parity and stop bit settings.. no luck. I even checked my cable for continuity and connections... all is fine.

Anyone have any clues?

Re: NanoPI NEO Uarts Showing Garbage

Posted: Sat Mar 10, 2018 12:27 am
by davef
And the baud rate? Try 115200

Re: NanoPI NEO Uarts Showing Garbage

Posted: Sun Mar 11, 2018 6:02 am
by bwilcutt
Okay, from what I can tell the Nano is bit flipping every bit. All 1's are turned to 0 and vise versa. Is there some kind of Linux setting to do this? (I've never heard of it)

Re: NanoPI NEO Uarts Showing Garbage

Posted: Sun Mar 11, 2018 9:13 am
by davef
Had to Google <serial port inverted> seems a few people have had this issue.

However, I went back and re-read your original post ... specifically about how you are wiring these two units. As far as I am aware a DB9 connector on a PC is a real RS-232 item, ie voltage levels like +/-15 Volts and you can not just wire them up to a UART running probably 3V.

So, do you have something between thee two units to provide a proper voltage interface?

Re: NanoPI NEO Uarts Showing Garbage

Posted: Sun Mar 11, 2018 9:23 am
by davef
https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=22258
Maybe, this sheds light on the potential problem space.

Re: NanoPI NEO Uarts Showing Garbage

Posted: Sun Mar 11, 2018 1:08 pm
by guidol
bwilcutt wrote:
I'm hooked to pins 6 (gnd), 8 (tx) and 10 (rx), running to my PC's pin's 2/3/5 (9-pin serial port).
Anyone have any idea what is going on?! Is my nanopi broke?

For DB9 to the NanoPi serial Port you need a TTL-Levelshifter and 115.200 Baud

Re: NanoPI NEO Uarts Showing Garbage

Posted: Sun Mar 11, 2018 10:38 pm
by bwilcutt
Thanks for the heads up! I didn't realize I need a voltage leveler. Is there any place I can readily pick up one?

Re: NanoPI NEO Uarts Showing Garbage

Posted: Mon Mar 12, 2018 12:17 am
by davef
FriendlyArm's PSU-ONECOM

Good chance your NEO's UART has been damaged.

Re: NanoPI NEO Uarts Showing Garbage

Posted: Mon Mar 12, 2018 5:14 am
by guidol
davef wrote:
FriendlyArm's PSU-ONECOM

http://www.friendlyarm.com/index.php?ro ... duct_id=89