Using UART
#1
Hi Everyone,

Just wonder if there's any guide on how to read the console via UART?

I've done everything written in the wiki:

1. Bought the USB to DB9 cable.
2. Soldered a 3.5mm audio jack to it (pin 2 - to the tip, pin 3 - to the ring, pin 5 - to the sleeve).
3. Switched the UART toogle on.
4. Plugged everything in.
5. Ran screen /dev/ttyUSB0 1500000.
6. Powered on the PBP.
7. Saw nothing.

Am I missing anything here?
#2
(11-19-2019, 07:39 AM)VoxUnius Wrote: Hi Everyone,

Just wonder if there's any guide on how to read the console via UART?

I've done everything written in the wiki:

1. Bought the USB to DB9 cable.
2. Soldered a 3.5mm audio jack to it (pin 2 - to the tip, pin 3 - to the ring, pin 5 - to the sleeve).
3. Switched the UART toogle on.
4. Plugged everything in.
5. Ran screen /dev/ttyUSB0 1500000.
6. Powered on the PBP.
7. Saw nothing.

Am I missing anything here?

I'm not certain but I think you are supposed to use a USB to Serial (TTL = 5v max) adapter i.e. not a true RS232 voltage adapter (one that produces positive and negative data voltages). An adapter originally with a DB9 connector will have true RS232 voltages on it (5/9/12 whatever - but NOT TTL).

Did you also note that by default the headphone jack is switched to Audio and needs to be toggled into "console" mode by opening the case and flicking the switch?
Edit: Oops - sorry - you did say you'd found the switch.
#3
(11-19-2019, 08:15 AM)neilman Wrote:
(11-19-2019, 07:39 AM)VoxUnius Wrote: Hi Everyone,

Just wonder if there's any guide on how to read the console via UART?

I've done everything written in the wiki:

1. Bought the USB to DB9 cable.
2. Soldered a 3.5mm audio jack to it (pin 2 - to the tip, pin 3 - to the ring, pin 5 - to the sleeve).
3. Switched the UART toogle on.
4. Plugged everything in.
5. Ran screen /dev/ttyUSB0 1500000.
6. Powered on the PBP.
7. Saw nothing.

Am I missing anything here?

I'm not certain but I think you are supposed to use a USB to Serial (TTL = 5v max) adapter i.e. not a true RS232 voltage adapter (one that produces positive and negative data voltages). An adapter originally with a DB9 connector will have true RS232 voltages on it (5/9/12 whatever - but NOT TTL).

Did you also note that by default the headphone jack is switched to Audio and needs to be toggled into "console" mode by opening the case and flicking the switch?
Edit: Oops - sorry - you did say you'd found the switch.

Thank you.

I'm using Prolific PL2303. Is the cable type that PBP needs documented anywhere? How would people know?
#4
(11-19-2019, 08:35 AM)VoxUnius Wrote:
(11-19-2019, 08:15 AM)neilman Wrote:
(11-19-2019, 07:39 AM)VoxUnius Wrote: Hi Everyone,

Just wonder if there's any guide on how to read the console via UART?

I've done everything written in the wiki:

1. Bought the USB to DB9 cable.
2. Soldered a 3.5mm audio jack to it (pin 2 - to the tip, pin 3 - to the ring, pin 5 - to the sleeve).
3. Switched the UART toogle on.
4. Plugged everything in.
5. Ran screen /dev/ttyUSB0 1500000.
6. Powered on the PBP.
7. Saw nothing.

Am I missing anything here?

I'm not certain but I think you are supposed to use a USB to Serial (TTL = 5v max) adapter i.e. not a true RS232 voltage adapter (one that produces positive and negative data voltages). An adapter originally with a DB9 connector will have true RS232 voltages on it (5/9/12 whatever - but NOT TTL).

Did you also note that by default the headphone jack is switched to Audio and needs to be toggled into "console" mode by opening the case and flicking the switch?
Edit: Oops - sorry - you did say you'd found the switch.

Thank you.

I'm using Prolific PL2303. Is the cable type that PBP needs documented anywhere? How would people know?

There is a suitable USB to 3.5mm jack "console" cable available in the Pine Store though I believe others have made their own cables.
The only information available on the Wiki is the connection as you've found - nothing about its "insides".
Yes some more documentation would be good.


I have the console cable myself, bought for the original PineBook, but I have not attempted to open my PineBook Pro to find and toggle that switch yet.

I measured the voltages on the plug which in my case was actually a tip-ring1-ring2-sleeve (4-connection) plug and at quiescent I was getting 5v on tip and ring1 with respect to ring2.
#5
Please only use 3.3V level UART adapters, neither A64 or RK33xx are 5V tolerant! The pinout of the headphone jack is on the wiki page.
Come have a chat in the Pine IRC channel >>
#6
Ok, thanks everyone. I'll try to get a proper cable and will update the thread.
#7
As Xalius mentioned, voltage matters! Standard RS232 serial could be as much as -15 to +15 (30v full swing) as opposed to the 3.3v/TTL that is required by the A64/RK3399 used in the Pinebook/Pinebook Pro. Meaning depending on how true that cable is to the spec, at minimum it could fry the RX/TX GPIO pins, and possibly fry the CPU completely.

Information on the pinout, baud rate, etc is here on the wiki.
#8
(11-19-2019, 05:03 PM)pfeerick Wrote: As Xalius mentioned, voltage matters! Standard RS232 serial could be as much as -15 to +15 (30v full swing) as opposed to the 3.3v/TTL that is required by the A64/RK3399 used in the Pinebook/Pinebook Pro. Meaning depending on how true that cable is to the spec, at minimum it could fry the RX/TX GPIO pins, and possibly fry the CPU completely.

Information on the pinout, baud rate, etc is here on the wiki.

Thank you.

Given that USB only provides 5V I highly doubt the cable can deliver 15V. Anyway, the CPU is alive.

Grumbling mode on.
This should've been written in capital letters right next to the audio port! It shouldn't have been made secret information only an elite group of people knows!
Grumbling off.
#9
What, didn't you have your invisible ink glasses on? :-P

If it survived, then all good. Looks like you have a cable that isn't using a RS-232 driver with built-in step-up (in the order of 30v... from -15 to +15... but typically nearer to 25v) Wink
#10
(11-19-2019, 09:08 PM)pfeerick Wrote: What, didn't you have your invisible ink glasses on? :-P

If it survived, then all good. Looks like you have a cable that isn't using a RS-232 driver with built-in step-up (in the order of 30v... from -15 to +15... but typically nearer to 25v) Wink

Nope. Neither have I found them in Pine store Smile

It wouldn't have been as funny if I (or someone else) had burnt the CPU. PBP is definitely not a device for the faint hearted.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Repurpose debug UART as GPIO wishindo 3 1,069 04-13-2023, 07:10 AM
Last Post: KC9UDX

Forum Jump:


Users browsing this thread: 1 Guest(s)