Jump to content

UART unreadable characters


Luis Daniel

Recommended Posts

Hello ppl.

I have an Orange Pi Zero, and I have some issues using UART interface, it give me an output like this:

                                            ▒▒▒I▒%E▒Y=7▒g!=7▒Y=5▒[s▒i-''▒Y-9/▒Y=▒▒▒RrR▒▒▒V▒▒
            ▒▒▒I▒%E▒Y=7▒c5!e=#=15Q=-▒a#'-#5▒▒▒RrR▒▒▒V▒▒
                                                       ▒▒▒I▒%E▒[5=9/57▒=5▒c5!-▒a'▒7==;=5▒57=5%!#▒▒▒▒▒▒▒▒▒▒▒▒▒▒]▒m]▒▒▒▒gY{▒▒}=9/5▒▒5;▒5▒▒▒▒▒▒▒▒▒▒▒▒▒]▒m]▒▒▒▒gY{▒▒}7=#957▒muuu▒▒▒▒▒▒▒▒%=#=15%5#▒7=5%!#▒▒▒▒▒▒▒▒▒▒▒▒▒▒]▒m]▒▒▒▒gY{▒▒7-)▒5%5▒%!#-!▒7=5%!#▒▒▒▒▒▒▒▒▒▒▒▒▒▒]▒m]▒▒▒▒gY{▒▒Y=cW_▒7=5%!#▒▒▒▒▒RrR▒▒▒V▒▒
                                                        ▒▒▒I▒%E▒Y=7▒▒59▒▒'!9='▒y▒▒▒R▒%I▒▒▒▒%▒▒ai▒▒▒I▒%E▒Y=7▒gY{▒▒}7=#957▒muuu▒▒▒▒▒▒▒▒%=#=15%5#▒7=5%!#▒▒▒RrR▒▒▒V▒▒
Y▒▒▒▒R▒%I▒▒▒▒%▒▒ai▒▒▒I▒%E▒[5=9/57▒=5▒g!1-#▒_▒▒RrR▒▒▒V▒▒▒▒I▒%E▒Y=7▒Y5'▒q5
                                                       ▒▒▒I▒%E▒Y=7▒gY{▒▒Y=cW_▒7=▒▒▒▒▒U▒▒▒Q▒▒▒▒;]e▒!#15-
Y▒▒▒▒▒H▒▒▒▒jZ▒▒        5
               ▒;
                 ▒jZ▒

I already tried other speeds than 115200, even changed the charset of putty and nothing works. It shows the same issue with other PC.

I'm connecting through serial port of PC, no USB-to-PC, using windows 7 64 bit and putty 0.63. It works fine through internet.

Using ARMBIAN 5.25 stable Ubuntu 16.04.2 LTS 3.4.113-sun8i, as it outputs after login.

Using the command:

stty -F /dev/ttyS0

It outputs:

speed 115200 baud; line = 0;
min = 1; time = 0;
-brkint -icrnl -imaxbel iutf8
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

But if I change the interface:

stty -F /dev/ttyGS0

I get:

speed 9600 baud; line = 0;
min = 1; time = 0;
-brkint -icrnl -imaxbel iutf8
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

 

Anyone can help me with this issue?

Thanks for reading this.

Link to comment
Share on other sites

I think a directly connected RS-232 port expects voltages of +3..15V for a logic "0" and -3..15V for a logic "1".

Your opi outputs signals that use 0V for "0" and 3.3V for "1".

hth,

gnasch

Link to comment
Share on other sites

Thank you ppl for your help.

Now I get something more readable like this:

         Starting Load/Save RF Kill Switch Status...
[  OK  ] Started Load/Savd RF Kill Switch Status/
[  OK  ] Started Network Manager Wait Online/
[&▒[z-▒ڴju▒▒U▒▒▒▒▒▒▒▒ɝ▒сr▒▒ݽɭ▒J́z▒▒▒▒▒▒j
                                       PTTY         Startiog LSB: Apache2 web servdr...
         Starting /etc/rc.local Compatibilhty...
         Starting LSB: Start OTP daemon./.
         Stasting LSB: Start and stop the mysql database seqver daemo         Starting LSB; Advanced IDEE 802.11 m`nagement dadmon...
         St`rting LSB: disk temperature monitorhng daemon../
[  OK  ] Started /etc/rc.local Compatibilhty.
[  OK  ] Started LSB9 Advanced IDEE 802.11 lanagement d`em
                                                          [  OK  ] Started LSB: disk temperature lonitoring d`emon.[  OK  ] Started LSB: Start NTP d`emon.
[  OK  ] Startdd Getty on tty1.
[  OK  \ Started Sesial Getty oo ttyS0.
[  OK  ] Started Sdrial Getty on ttyGS0.
[  OK  ] Seached targdt Login Prompts.

Ubuntu 16.04.2 LTS orangepizero ttyS0

orangepizero login:

As you can see, sometimes i get some error, that can be some communication error.

I use a Chinese arduino as serial communication or maybe the arduino program,  anyway, now I have an interface to read and interact.

 

I have other issues to solve like copy from one SD to other, I already copied but need to create the boot. But this will be to other post or deep search.

 

Again thanks and see you again ppl.

Link to comment
Share on other sites

Hello again.

After some time waiting for RS232 to TTL, I can say, it works fine when receive data. But when I type something, the putty add garbage to each character.

Anyone know how to solve this or know why?

 

best regards,

Luis Daniel

Link to comment
Share on other sites

chinese arduino with CHG340/341 or with FTDI. If FTDI, they are mostly fake and I had a lot of trouble on higher baudrates (more than 9600 :P) with those fake FTDI (have also one surely  faked FTDI which doesn't make trouble).

Link to comment
Share on other sites

11 hours ago, Luis Daniel said:

it uses MAX3232

Those are RS232-TTL converters. This means that your PC has a real RS232 DB9 port, and you're actually use it with a converter, right ?

If you're using a USB-TTL dongle, you don't need such converters, since they are already TTL level.

Link to comment
Share on other sites

35 minutes ago, martinayotte said:

Those are RS232-TTL converters. This means that your PC has a real RS232 DB9 port, and you're actually use it with a converter, right ?

If you're using a USB-TTL dongle, you don't need such converters, since they are already TTL level.

Yes i'm using a RS232 port and MAX3232 between them to convert signal.
What upset me is, now I have a clear message from orange pi, but when I try to send something trough putty (i didn't use any other) it add some garbage.

Link to comment
Share on other sites

Let me give you what I mean.

root@orangepizero:~# ▒a▒p▒t▒-g▒et u▒p▒d▒a▒t▒e▒
Hit:1 http://ports.ubuntu.com xenial InRelease
Get:2 http://ports.ubuntu.com xenial-security InRelease [102 kB]
Hit:3 http://apt.armbian.com xenial InRelease
Get:4 http://ports.ubuntu.com xenial-updates InRelease [102 kB]
Get:5 http://ports.ubuntu.com xenial-backports InRelease [102 kB]
Get:6 http://ports.ubuntu.com xenial-updates/main armhf Packages [510 kB]
Get:7 http://ports.ubuntu.com xenial-updates/universe armhf Packages [446 kB]
Fetched 1,263 kB in 5s (224 kB/s)
Reading package lists... Done
root@orangepizero:~#

 

Link to comment
Share on other sites

1 minute ago, martinayotte said:

This means that OPi TX is Ok, but RX isn't ...

How do you power the MAX3232 ?

If it is with 5V, you will need to add a voltage divider on RX output of the MAX, because OPi is 3.3V.

 

Using 5V the MAX3232 get's to hot and doesn't work, so, i'm using orange pi to power it with 3,3V.

Link to comment
Share on other sites

On 29.05.2017 at 4:28 AM, Luis Daniel said:

I'm connecting through serial port of PC, no USB-to-PC, using windows 7 64 bit and putty 0.63. It works fine through internet.

Compared to other boards Orange Pi Zero doesn't have any protection on its serial console pins, and PC COM port voltage levels go way above H3/H2+ absolute maximum ratings recommended operating conditions, so you can't rule out that SoC was damaged because of that connection attempt.

Link to comment
Share on other sites

1 hour ago, zador.blood.stained said:

Compared to other boards Orange Pi Zero doesn't have any protection on its serial console pins, and PC COM port voltage levels go way above H3/H2+ absolute maximum ratings recommended operating conditions, so you can't rule out that SoC was damaged because of that connection attempt.

 

Thas was my first thought after reading the OP. Best case that was only +-5V coming from the PC side, worst case +-12V... so the RX pin on OPi or at least it's ESD diodes could be shot...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines