[May 11] LibreELEC(KODI) - 20190324 - Pine A64 (+) |[May 11] LibreELEC(KODI) - 20190324 - PINE A64-LTS / SOPINE | [May 09] NEMS Linux 1.5 - Build1 - Pine A64 (+) | [May 09] NEMS Linux 1.5 - Build 1 - Rock64 | [May 09] NEMS Linux 1.5 - Build 1 - PINE A64-LTS / SOPINE | [May 09] NEMS Linux 1.5 - Build 1 - RockPro |[April 23] Q4OS ver 2.7-r5 - 1080P Pinebook / Pinebook

Project Inspiration | Get Started | IRC Logs | Forum Rules/Policy


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! )
Reply
#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?
Reply
#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
Pine64.xyz IRC network operator, developer of various software bits for the Rock64.

SADIE -- Simple Android Download and Install Executable (for Rock64)
Reply
#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?
Reply
#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! )
Reply
#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.
Reply
#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
Pine64.xyz IRC network operator, developer of various software bits for the Rock64.

SADIE -- Simple Android Download and Install Executable (for Rock64)
Reply
#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.
Reply
#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
Pine64.xyz IRC network operator, developer of various software bits for the Rock64.

SADIE -- Simple Android Download and Install Executable (for Rock64)
Reply
#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
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Sad Bad first experience with rock64. Performs worse than my pi :( ekg 8 1,057 05-19-2019, 05:25 PM
Last Post: default_user8
  Rock64 v3 and SD-Cards Humberg 6 655 05-16-2019, 02:50 PM
Last Post: ketominer
  Rock64 hangs without trace szus 12 1,037 05-14-2019, 01:59 AM
Last Post: petesobs
  Python GPIO Library for the Rock64 (R64.GPIO) Leapo 32 11,510 05-12-2019, 02:46 PM
Last Post: tllim
  Rock64 LCD compatibility for linux. AmroIb 0 73 05-04-2019, 09:09 PM
Last Post: AmroIb
  rock64, compile problems "illegal instruction", "memory fault" -> ddr_333Mhz? hunderteins 4 216 04-25-2019, 02:26 PM
Last Post: mcerveny
  Rock64 generally unstable? Sputnik 9 792 04-20-2019, 01:33 PM
Last Post: huey
  Rock64 LTS gops 3 246 04-15-2019, 02:52 PM
Last Post: tllim
Lightbulb NAS + ​Pine64 ROCK64 = Few Important Questions FilipWozniak 8 445 04-14-2019, 09:21 AM
Last Post: default_user8
  Rock64 no network ripcord 6 166 04-08-2019, 02:54 AM
Last Post: ripcord

Forum Jump:


Users browsing this thread: 1 Guest(s)