Serial Console for the Rock64
#1
Information 
Greetings;

The purpose of writing this tutorial is to provide guidance for using a serial ttl to usb bridge cable to connect the Rock64's uart (on the PI-2 bus) to a usb port on your PC or Mac, for the purpose of monitoring the boot-up process and logon from a serial terminal.

Please see this reference link:

It is important to select a bridge cable that supports at least 1.5M baud (default for Rock64 serial uart) and which has 3v3 logic ( measure the votage on the Tx pin must be no more than 3v3 !).

Most 3v3 cp2102, pl2303hx, and some ch340g chips will work.

The uart pins on the Rock64 PI-2 bus are in the same places as the RPi -- pin(6 gnd), pin(8 Tx), and pin(10 Rx).   The Tx pin of the ttl adapter goes to the Rx pin of the Rock64(10) Tx-->Rx;  and the Rx pin of the ttl adapter goes to the Tx pin of the Rock64(8) Rx-->Tx.  Connect the ground(s) together;  it is important that the ground leads are not left open.  DO NOT connect the red voltage wires anywhere.

The usb end of the ttl to usb bridge cable plugs into a usb port on your PC or Mac. Terminal software (like minicom, screen, cu, or putty) is then used on the PC or Mac to connect to the appropriate usb device.  The baud terminal settings are 1500000 8n1. 

With the serial console running you can monitor the boot-up messages on the Rock64 (or other SBC) and get diagnostic clues (if things aren't working properly) or in the case of certain procedures (like writing to the eMMC on the Rock64) you can interrupt the uboot three second timer with the serial console.

Please check out this link too, for using the PineA64 (or other SBC) as a serial console monitor:
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#2
So just to clarify,
Can I buy the serial console from the store (https://www.pine64.org/?product=padi-serial-console) and then use five 1-pin cables to connect it to the board's Pi-2 bus?
Or do I need some sort of dedicated cable?
#3
(08-17-2017, 04:14 PM)kershaw Wrote: So just to clarify,
Can I buy the serial console from the store (https://www.pine64.org/?product=padi-serial-console) and then use five 1-pin cables to connect it to the board's Pi-2 bus?
Or do I need some sort of dedicated cable?

That will work just fine. Loose wires is the usual way of doing it, unless someone is a bit OCD. Smile
Community administrator and sysadmin for PINE64
(Translation: If something breaks on the website, forum, or chat network, I'm a good person to yell at about it)

#4
Thanks :-)
Also, from Mark's description I understand that actually only 3 wires are needed (Console Tx/Rx/GND <-> ROCK64 Rx/TX/GND) and that the 5v/3.3v wires should remain disconnected.
Did I get it right?
#5
(08-17-2017, 05:59 PM)kershaw Wrote: Thanks :-)
Also, from Mark's description I understand that actually only 3 wires are needed (Console Tx/Rx/GND <-> ROCK64 Rx/TX/GND) and that the 5v/3.3v wires should remain disconnected.
Did I get it right?


Yes,  just three wires;  what may have confused you is that you will see 'four'wires in my pic;   that is because I have used two  pairs.  But,  one wire in each pair is a ground wire...  and the two ground wires are tied together at each end...  so electrically there are only three wires  (Tx-->Rx)   (Rx-->Tx)    ( ground )

   

In the pic above I have tried to make this more clear;  the three lines from the Rock64 are:

brown:  (ground)

orange: (Tx-->Rx)    from the perspective of the Rock64

yellow:  (Rx-->Tx)    from the perspective of the Rock64

I have used two pairs:  
    blue pair (the striped white is ground)  stripe is also blue
    brown pair  (the striped white is ground)   stripe is also brown

1)   yellow wire from the Rock64 is connected to the solid brown wire of the cable.

2)   orange wire from the Rock64 is connected to the solid blue wire of the cable.

3)   brown wire from the Rock64 is connected to the ground wires of the cable ( both striped & tied together at each end )

Hence,  three wires.  In the case of using a serial bridge cable you will also have three wires ( and all three wires are required if you want a reliable sound uart serial connection.

Shy
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#6
Thank you, Mark.
So if I have regular (non-paired) 1-pin cables, I can simply connect the ROCK64 GND to the serial console's GND pin directly, without "fusing" 2 separate wires?
This is my current understanding of how the serial console should be attached using only 1-pin wires:

Tx <---> Rx
Rx <---> Tx
GND <---> GND

Is this acceptable?
Thank again for your help.
#7
(08-18-2017, 03:20 AM)kershaw Wrote: Thank you, Mark.
So if I have regular (non-paired) 1-pin cables, I can simply connect the ROCK64 GND to the serial console's GND pin directly, without "fusing" 2 separate wires?
This is my current understanding of how the serial console should be attached using only 1-pin wires:

Tx <---> Rx
Rx <---> Tx
GND <---> GND

Is this acceptable?
Thank again for your help.

That is exactly how it is supposed to work. Smile
Community administrator and sysadmin for PINE64
(Translation: If something breaks on the website, forum, or chat network, I'm a good person to yell at about it)

#8
I too neglected to purchase the serial console with my initial order. Very clever Pine Microsystems, Inc., now I get to order more gear.  Smile
In the meantime, could I be tweaking the linux build of my choice on the card and when I have the serial console, use an imaging software (Clonezilla for instance) to write the SD to the emmc? Sorry if it's a ridculous question.
1. Image the sd build.
2. Use that image to write to the emmc (instead of pulling an image from the network).
3. Boot into the emmc build.
4. Wipe the sd card and use it for additional storage.
I'm guessing not at all that simple but thought I'd ask.
#9
(08-18-2017, 09:54 AM)Farley56 Wrote: I too neglected to purchase the serial console with my initial order. Very clever Pine Microsystems, Inc., now I get to order more gear.  Smile
In the meantime, could I be tweaking the linux build of my choice on the card and when I have the serial console, use an imaging software (Clonezilla for instance) to write the SD to the emmc? Sorry if it's a ridculous question.
1. Image the sd build.
2. Use that image to write to the emmc (instead of pulling an image from the network).
3. Boot into the emmc build.
4. Wipe the sd card and use it for additional storage.
I'm guessing not at all that simple but thought I'd ask.

Luckily, due to previous work by ayufan, it is actually that simple. That will work. Smile
Community administrator and sysadmin for PINE64
(Translation: If something breaks on the website, forum, or chat network, I'm a good person to yell at about it)

#10
Thanks for the detailed instructions Mark, I would have given up long before figuring this all out.

I tried a number of different terminal programs before digging out an old laptop with Ubuntu on it so I could "sudo apt install minicom" and follow your instructions here to the letter:
Quote:"I am running minicom in a terminal as my serial console software. In addition to setting 1500000 baud rate (ctrl-A o e aaaaaa) I also set flow control OFF (both) and set line wrap (ctrl-A w) and set off cr (ctrl-A a) and set off local echo (ctrl-A e)."
...legend.

I also had trouble with my USB serial adapter, which didn't help.
I followed your advice and bought a CP2102 based device, see this example which has nice high res pics.
The trouble was, it didn't come with any instructions, nor could I find any online to explain what dip switch settings to use, especially given it can do 5V TTL, 3.3V TTL, RS232 etc.

So in case someone else buys the same product, here are the settings which work:
Switch 1: ON
Switch 2: OFF
Switch 3: towards Switch 2 (it's not labelled)
   
I was a bit reluctant to blindly try different switch combinations given it can do 5V logic as well, but I found the right settings on the third try and the Rock64 seems to have come out unscathed.

Once that was sorted it was plain sailing to follow your instructions on How to Write an Image to the eMMC Module.
So again, thank you. I understand this board is newly released, but the support here has been amazing and invaluable.  Smile


Possibly Related Threads…
Thread Author Replies Views Last Post
  Rock64 No Audio @ Debian 12 dmitrymyadzelets 2 1,107 04-08-2024, 06:47 AM
Last Post: dmitrymyadzelets
  OpenWRT on the Rock64 CanadianBacon 14 10,767 04-03-2024, 08:48 AM
Last Post: helpmerock
  Rock64 bricked shawwwn 7 7,014 03-17-2024, 12:22 PM
Last Post: dmitrymyadzelets
  Rock64 won't boot luminosity7 10 6,013 03-16-2024, 08:33 AM
Last Post: dmitrymyadzelets
  Rock64 doesn't boot dstallmo 1 741 03-16-2024, 08:29 AM
Last Post: dmitrymyadzelets
  How well does Rock64 deal with HDR and Atmos on Kodi? drvlikhell 3 2,706 04-29-2023, 04:24 AM
Last Post: newestssd
  Rock64 board not working, no HDMI no Ethernet. EDited 3 4,284 01-17-2023, 02:31 PM
Last Post: Flagtrax
  ROCK64 v3 can it boot from USB? Tsagualsa 4 2,963 11-29-2022, 11:31 AM
Last Post: Macgyver
  rock64 v3 spiflash Macgyver 0 1,053 11-28-2022, 02:18 PM
Last Post: Macgyver
  my rock64 dosen't work rookie_267 0 1,247 10-07-2022, 07:50 PM
Last Post: rookie_267

Forum Jump:


Users browsing this thread: 1 Guest(s)