How to Setup Serial Console Cable Over the Rock64 SBC

The purpose of this photo blog is to provide a tutorial on setting up a serial console over the Rock64 ( or any other SBC ) from the Pinebook ( or any other notebook ) !

Materials & Preparation

You will need a usb extension cable ( two 1m cables will do ) and the CH340g usb to serial ttl bridge adapter carried by the Pine store.  Also you will need to have three  6"  F-F  jumper wires;  the ch340g is placed in short proximity to the Rock64 board and is attached to the Rock64 via the three F-F 6" jumper wires to the PI-2 bus, pins ( 6, 8, 10 ) covered later.  The usb extension cable(s) then run from the ch340g adapter to the notebook computer;  in this case the Pinebook.  You will also need to make sure you have serial terminal software installed ( I recommend the old standby minicom ).  We'll talk about that later as well.

Theory and Pinebook caveats

The theory is fairly straight-forward;  the Rock64 has a uart serial console port on the PI-2 bus pins (6, 8, 10) which allows another computer ( Pinebook ) to connect from usb port via the serial console adapter ( ch340g ).  

With the terminal software running , and all connections correct , you will be able to see the console messages from the Rock64 when the SBC boots, on the serial console terminal.  You can debug boot-up messages, also shutdown messages, as well logon to the Rock64 from the serial console after boot-up. 


The Pinebook usb ports are not identical.  For one thing the correct port ( pic on right ) is on a usb hub, and is designed to be used as a console.  The "incorrect" port to use ( pic on the left ) should not be used as a console.  Failure to heed the warning to use only the correct port ( the right-hand usb port ) will cause you endless frustration, grumpiness, and probably hair loss.  


Make the Connections to the CH340g


The pic at the left shows the connections on the CH340g;  the pic at the right shows the connections at the Rock64 SBC.  I like to Scotch tape the CH340g to the table top in close proximity to the Rock64;  so that the 6" F-F jumper wires can easily be connected.  The Tx, Rx, and gnd are in reference to the Rock64 SBC.  You will notice that the Rock64 Tx is connected to the CH340g Rx, and the Rock64 Rx is connected to the CH340g Tx.  The ground from the Rock64 is connected to the ground on the CH340g.  

                Rx-->Tx,   Tx-->Rx,    ground--ground

Notice that the gold jumper on the CH340g is set to select 3v3 logic level for the adapter.  This is critical.  Failure to observe this will irrevocably damage your Rock64 !  (words to the wise) 

The red LED on the CH340g is a power indicator;  there are other green LED(s) by the connectors which flicker during comms.  

Do not plug in the green Rx wire at this time;  this is the transmit (Tx) line from the CH340g and usually carries 3v3 even in idle which will "back feed" or bleed current into the Rock64 often keeping it from booting up !  We will wait to plug in the Rx line until after the boot-up and when we have a logon prompt on the console.

Plug in the usb cable extension into the CH340g;  this will run over to the Pinebook ( or other notebook ).

Plug in the USB Cable on the Pinebook and Start the Terminal Software 

Plug the other end of the usb extension cable into the Pinebook right-hand usb port ( note that the left-hand usb port is not suitable as a console port ).  Open a terminal on the Pinebook.  This terminal will become the serial console.  For now issue the following command to verify that the Pinebook can "see" the  CH340g serial adapter:

          dmesg  |tail  -n  10

You should see a line that says, " usb ch341-uart converter now attached to ttyUSBx ".  Pay attention to the ttyUSBx!  This will probably be ttyUSB0,  but it may be another value;  this is the device that you will enter when you start the minicom terminal emulation software for serial comms with the Rock64.

Start the console terminal emulation software ( minicom ) with the following command sequence:

          sudo  minicom  -s  -D  /dev/ttyUSB0  -b  1500000  --color=on

The  -s  flag will open the configuration menu when minicom initiates;  select "Serial Port Setup" and press enter.  On the serial port setup dialogue check your defaults ( 1500000 8N1  /dev/ttyUSB0 ) and make sure that hardware and software flow control are both NO;  then press the enter key.

Select  'Exit'  from the menu, and press the enter key;  the terminal emulation software will be running.

Note:   If your device ( found with dmesg ) was not /dev/ttyUSB0 then use your device in the minicom initialization command sequence !

Boot the Rock64 SBC

Apply power to the Rock64 SBC board and almost immediately the Rock64 boot-up messages will begin scrolling down the serial console terminal emulation software running on the Pinebook.  Congratulations! --  you have setup a serial console over your Rock64, using your Pinebook !   ... nice job.

When the logon prompt appears on the serial console then plug the green Rx line from the Rock64 into the CH340g Tx pin, and then logon to the Rock64 from the serial console on the Pinebook.  To shutdown the Rock64 enter:

                 sudo halt

You will be able to see the shutdown messages as well ! 


The pic above is the serial console running on my Pinebook over my production Rock64 running xenial-mate 0.4.16 #83.  You will notice the RED status bar at the bottom of the terminal.  You will not see this unless you grab the bottom edge of your terminal with your mouse and pull the bottom of the terminal down ONE line  ( 80x25 ). 

marcushh777    Cool

please join us for a chat @   or ssl

( I regret that I am not able to respond to personal messages;  let's meet on irc! )

Messages In This Thread
How to Setup Serial Console Cable Over the Rock64 SBC - by MarkHaysHarris777 - 08-26-2017, 08:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Are HW design files available for ROCK64? irenek 2 2,474 06-15-2022, 07:06 AM
Last Post: Brant454
  Where can I find the ROCK64 POE HAT Zoz 2 116 06-08-2022, 12:44 AM
Last Post: Zoz
Smile wooden case for ROCK64 killor 13 9,778 03-04-2022, 06:56 AM
Last Post: killor
  1wire DS18b20 on Rock64? mypineme 6 2,958 09-28-2021, 03:07 PM
Last Post: TRS-80
  Rock64 4K60P HDR Media Board Computer 64 bit MarkHaysHarris777 8 12,076 07-14-2021, 11:52 PM
Last Post: jontumontu
  Any way to tell the rock64's hardware revision? kittyland 1 1,290 07-01-2021, 09:42 PM
Last Post: evilbunny
  Configuring Python GPIO Pin Control Rock64 www139 3 5,157 06-22-2021, 06:57 AM
Last Post: Mrfixit2001
  POE support for the Rock64 v3 h64poe 0 988 05-30-2021, 07:40 AM
Last Post: h64poe
  3D-Printable Button Pegs for the ROCK64 Aluminium Case CounterPillow 1 1,457 05-21-2021, 05:44 PM
Last Post: tllim
  How to enable ES9023-based DAC hat on Rock64? lowry 2 1,825 03-18-2021, 03:44 PM
Last Post: zborgerd

Forum Jump:

Users browsing this thread: 1 Guest(s)