How to Setup Serial Console Cable Over the Rock64 SBC
#1
Information 
Greetings,

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.  

Procedure

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 ). 

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! )
  Reply


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 3 4,740 12-11-2023, 09:31 PM
Last Post: tllim
  Rock64 is unreliable after 3 years of service - power problem? ReleaseTheGeese 0 324 11-23-2023, 05:05 AM
Last Post: ReleaseTheGeese
  Rock64 PoE compatbility with Pi4 Hatt recent Single Board Computer offering from PINE kharak 1 1,051 04-26-2023, 11:38 PM
Last Post: tllim
  Case for the rock64 that supports the POE hat. o1CRiMSON1o 0 615 03-21-2023, 03:48 PM
Last Post: o1CRiMSON1o
Brick Rock64 usb2.0 Power Control Floating GPIO Tutorial Files & Notes MarkHaysHarris777 6 13,188 01-15-2023, 10:36 AM
Last Post: ds00
  rock64 totally brick dakobg 2 1,727 11-07-2022, 05:45 PM
Last Post: olivercfc
  3D-Printable Button Pegs for the ROCK64 Aluminium Case CounterPillow 2 3,492 08-04-2022, 01:31 AM
Last Post: Vicky Weimann PhD
  Where can I find the ROCK64 POE HAT Zoz 2 2,598 06-08-2022, 12:44 AM
Last Post: Zoz
Smile wooden case for ROCK64 killor 13 16,458 03-04-2022, 06:56 AM
Last Post: killor
  1wire DS18b20 on Rock64? mypineme 6 6,980 09-28-2021, 03:07 PM
Last Post: TRS-80

Forum Jump:


Users browsing this thread: 1 Guest(s)