Cross-wired Uart Ports between two Pine Boards via Cat5 Cable
#1
   

A Cat5 ethernet cable has four twisted pairs of high quality telephone wire (24 AWG) which may be used to connect the uart ports of two pine boards very effectively ( or between a pine board and a PC using a cp2102 based adapter similar to the one in the following pic. In the pic above I have four colored pairs (blue, orange, green, and brown). Each pair has a solid ie [B (blue)] and its partner the white wire with the stripe ie [Bw].  So we have [ B:Bw, G:Gw, and BR:BRw ]. I am ignoring the orange pair. 

   

The idea is to connect the uart3 of PineA to the uart0 (serial console) of PineB;  and to connect the uart3 of PineB to the uart0 (serial console) of PineA. The uart(s) of each pine board are cross-wired so that each machine (on ttyS3) may monitor the other machines boot progress on serial console uart0;  not at the same time, of course. 

The machine pictured above is machine PineB. The cable has been constructed so that all of the cross-wiring happens within the cable, so that the yellow and orange jumpers of each end of the cable plugs into uart3 (ttyS3) on the euler bus,  and the green and white jumpers plug into the serial console of each board at uart0 on the EXP header. Orange yellow is crossed with green white,  also G:Gw is crossed with Gw:G, and B:Bw is crossed with Bw:B-- this so that it does not matter which wires plug where on either board as long as both boards are plugged the same way -- they must be consistent !

   

In the pic above machine PineA is shown.  I have debian mate running on PineA, and ubuntu mate running on PineB. On each board I have the green jumper plugged into uart0 Tx, and the white jumper plugged into Rx.  Again, because the cable is constructed as a cross-over both boards are plugged the same--as long as they are consistent it does not matter.  I have the yellow jumper of each board plugged into uart3 Tx on the euler bus, and the orange jumper of each board plugged into the uart3 Rx on the euler bus for each board.

With this setup I can now monitor the bootup of either board, from the other board; of course, not at the same time. Or, from either board I may signon to the other board without a network connection using the serial console. I am using the screen program to access the ttyS3 (uart3) of each machine with :

Code:
sudo  screen  /dev/ttyS3  115200

The ends of the Cat5 cable have been removed and replaced with standard male header pins (and spacers) ; again, the orange pair has been ignored. Brown is ground, Blue and Green are the uart3 & uart0 crossed pairs, each containing a crossed Tx and Rx line.  No adapters are required; the uart(s) are simply wired together. The cable is something less than 2M and is standard Cat5.

You may need to download the screen program:

Code:
sudo apt-get install screen

   

In the pic above I'm using the same Cat5 cable with the cp2102 serial ttl bridge adapter to monitor the serial console uart0 of my ubuntu PineB machine. Of course in this setup only one twisted pair is required, and ground.
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
Cross-wired Uart Ports between two Pine Boards via Cat5 Cable - by MarkHaysHarris777 - 08-29-2016, 02:07 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  RPi.GPIO python module for Pine A64/A64+ aquilegia 98 148,857 10-26-2024, 07:17 AM
Last Post: Garesdq1d
  Exp Header UART for TTL is True Serial Console (very nice) MarkHaysHarris777 12 19,173 08-01-2016, 10:37 AM
Last Post: MarkHaysHarris777

Forum Jump:


Users browsing this thread: 8 Guest(s)