Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Post Reply
Tact123
Posts: 9
Joined: Mon Jun 25, 2018 2:58 pm
languages_spoken: english
ODROIDs: Many ODroid HC1s
Has thanked: 2 times
Been thanked: 0
Contact:

Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Unread post by Tact123 » Fri Sep 20, 2019 2:24 am

It's been a long time since I worked with old-style serial connections.

So, imagine I have the official Hardkernel USB-to-Serial board but I take ONLY the little 6 inch cable that normally connects the USB serial converter to the ODroid.

Image

Question: If i ONLY use the tiny 6 inch pigtail with 4-pin female connectors on both ends (the one on the right of the picture above), can I use that connector to directly connect two different ODroids by their Serial ports and let the first Odroid act as the debugging terminal for the second?

Or, do I simply need to SWAP the receive/transmit wires so that both of them are able to communicate?

Or worse, would such a connection from ODroid-serial to ODroid-serial require some sort of additional hardware between the two devices (like pull-up or pull-down resistors, or something else to protect from electrical damage?


Note: for my purposes you can assume that both ODroids are:
1) Connected to the same 5Volt regulated power supply
2) The distance between the devices is less than 18 inches (0.5 meters)
3) ODroid 1 is an XU4
4) ODroid 2 is an XU4, HC1, or HC2 (basically all are the same devices)

User avatar
odroid
Site Admin
Posts: 32552
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 189 times
Been thanked: 352 times
Contact:

Re: Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Unread post by odroid » Fri Sep 20, 2019 10:24 am

You need only three wires for Rx, Tx and GND. Don't connect the VCC(1.8V) rail. Don't forget Rx and Tx must be cross connection.
https://wiki.odroid.com/accessory/devel ... _connector

You can use /dev/ttySAC0 on the 30pin header with minicom on your host ODROID ( ODroid 1 ).
https://wiki.odroid.com/odroid-xu4/appl ... /gpio/uart

I think 0.5meter must be fine at 115200bps.
These users thanked the author odroid for the post:
Tact123 (Fri Sep 20, 2019 4:50 pm)

User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Unread post by mad_ady » Fri Sep 20, 2019 1:09 pm

You can use dupont femail jumper wires instead of butchering the serial cable.
If you wsnt networking over this serial connection have a look here: https://www.google.com/url?sa=t&source= ... X2IByV0-LJ
These users thanked the author mad_ady for the post:
Tact123 (Fri Sep 20, 2019 4:50 pm)

Tact123
Posts: 9
Joined: Mon Jun 25, 2018 2:58 pm
languages_spoken: english
ODROIDs: Many ODroid HC1s
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Unread post by Tact123 » Fri Sep 20, 2019 5:54 pm

odroid wrote:
Fri Sep 20, 2019 10:24 am
You need only three wires for Rx, Tx and GND. Don't connect the VCC(1.8V) rail. Don't forget Rx and Tx must be cross connection.
https://wiki.odroid.com/accessory/devel ... _connector

I think 0.5meter must be fine at 115200bps.
@Odroid: Thanks for reminding me of this.


You can use /dev/ttySAC0 on the 30pin header with minicom on your host ODROID ( ODroid 1 ).
https://wiki.odroid.com/odroid-xu4/appl ... /gpio/uart
OK, I can't test it on an XU4 right now (no XU4s at this location), but I have two of the HC1s with me. I can make a crossover cable (minus the VCC :) ) and then use one HC1 on the LAN and SSH to it, then use that SSH connection to Serial-out to the second HC1 in the serial-to-serial terminal connection.

I will try that over the weekend.

So, three more questions:
1) I looked at the both links shown above for the Serial Connector and for the XU4 gpio uart.
So, are the Serial connectors on an HC1/HC2 also subject to the zero to 1.8 volt maximum voltage limit? If so, then does that mean I can *not* connect a standard serial terminal to them in the future. (Like trying to use an off-the-shelf USB to serial adapter and just jumpers over to the HC1's serial connector)?
So, basically all devices I connect serially *must* be running at a maximum of 1.8 volts?

2) If I am *not* using the XU4 and its GPIO, but instead I use the HC1 serial connector, should I use the same `/dev/ttySAC0` linux device or is it a different device?

3) *WHERE* can I source the connector (or *BETTER*, a pigtail) to make my own longer crossover cables (so I don't have to cannibalize the tiny one, or use ad hoc methods like DuPont connections)?
I *did* test the DuPont connectors and they are *very* difficult to insert because they are larger than the normal connector and they end up hitting the plastic shroud of the on-board serial connector. It took me 5 minutes to insert just 3 of them, and I fear others might destroy the on-board connector if they attempt to use DuPont.
I *did* find a US-supplier (I think it was Newark) who sell the female connectors for 40 cents and the pins for 5 cents apiece. But their order system is not meant for small purchases of $1.20, and their shipping is not fast like an eBay or Amazon.
I could *not* find the connectors on eBay or Amazon — which is pretty bad for a guy trying to accomplish debugging in the US.

Worse, right now I am *outside* the US trying to set this system up so that others can debug it when I leave, but there is no supplier in-country for this connector (I spent the day driving to every supplier in country), and shipping from the US would take a month or more.
That seems very short-sighted on ODroid's part to build a board with a connector that is so rare when the board could have easily used a standard set of vertical pins with standardized spacing as a header (just like we use for PC jumpers etc) that way we could have easily attached DuPont for quick tests, or a 4-pin female to the header, and that is a very common connector. It would probably help us poor users out in the field not to have to rely on such "exotic" connectors for such commonplace needs (like serial debugging).

Anyway, thanks for the info you have given so far, and any answers to #1,2,3 above (especially if you can tell us where to find low-cost pre-made pigtails, or some other more common connector that can work as a substitute in an emergency). For now, I am trying to make the DuPonts work.

Tact123

Tact123
Posts: 9
Joined: Mon Jun 25, 2018 2:58 pm
languages_spoken: english
ODROIDs: Many ODroid HC1s
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Unread post by Tact123 » Fri Sep 20, 2019 6:02 pm

mad_ady wrote:
Fri Sep 20, 2019 1:09 pm
You can use dupont femail jumper wires instead of butchering the serial cable.
If you wsnt networking over this serial connection have a look here: https://www.google.com/url?sa=t&source= ... X2IByV0-LJ
@mad_ady: I tried the DuPonts earlier today, and I couldn't make them fit inside of the plastic shroud of the HC1's serial connector. I stopped because I didn't want to break the on-board connectors.

After I read your post I decided to try again. It took about *five* minutes to push on three DuPont connectors onto just one board. I finally got them on, but I haven't tested continuity, or tried to pass data.

It is good to know that I can get the DuPonts to work in an emergency, but I would *love* to be able to buy the official connectors (especially with pre-made pigtails). I've got old eyes, and I would prefer not to do such tedious work — give me something refreshing like debugging — which was the whole point of trying to get the serial port running :)


Anyway, I had *no idea* that it was possible to do the PPP on the serial connection, so I will have to keep that in my "bag of tricks". I don't need it right now, but I'm sure I will in the future.

Thanks again,

Tact123

User avatar
odroid
Site Admin
Posts: 32552
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 189 times
Been thanked: 352 times
Contact:

Re: Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Unread post by odroid » Fri Sep 20, 2019 6:07 pm

You have to disable the console function on the HC1 UART port to use it as a generic UART and this wiki page must be helpful.
https://wiki.odroid.com/odroid-xu4/trou ... le_console

Tact123
Posts: 9
Joined: Mon Jun 25, 2018 2:58 pm
languages_spoken: english
ODROIDs: Many ODroid HC1s
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Unread post by Tact123 » Fri Sep 20, 2019 6:25 pm

odroid wrote:
Fri Sep 20, 2019 6:07 pm
You have to disable the console function on the HC1 UART port to use it as a generic UART and this wiki page must be helpful.
https://wiki.odroid.com/odroid-xu4/trou ... le_console
@Odroid:

Yes, this link was very helpful.

It also showed how to convert the port back to standard GPIO pins which I'm sure I will want to use some time in the future on the HC1/HC2, so that was cool to know also.

Thank you

I'll try to figure out the rest over the weekend.

Enjoy your weekend.

Tact123

User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Unread post by mad_ady » Fri Sep 20, 2019 6:47 pm

And yes, anything you connect to UART needs to be 1.8V.
I think this may be the reason for a non-standard connector - so that you can't easily plug in a 3.3/5V UART and fry the board.
I think the dev could be /dev/ttySAC2

Tact123
Posts: 9
Joined: Mon Jun 25, 2018 2:58 pm
languages_spoken: english
ODROIDs: Many ODroid HC1s
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Unread post by Tact123 » Sat Sep 21, 2019 1:13 am

mad_ady wrote:
Fri Sep 20, 2019 6:47 pm
And yes, anything you connect to UART needs to be 1.8V.
I think this may be the reason for a non-standard connector - so that you can't easily plug in a 3.3/5V UART and fry the board.
I think the dev could be /dev/ttySAC2
@mad_ady: OK. That's important to know about the voltage. I had another 3.3V device I was considering connecting. I guess I'll have to figure out how to change that electrically - it's been a long time since I've done electronics. If I ever get to the 3.3Volt project then I'll have to ask here how to do it.

As for the dev to use: I will try ascending numbers for the `/dev/ttySACx` and I usually keep a manual log of the process. Then I will try to post a follow-up post here in case anyone comes looking in the future (probably me when I forget what I did) :)

Thank you again!

Tact123

User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Unread post by mad_ady » Sat Sep 21, 2019 1:51 am

Look up either a level shifter that supports 3.3V to 1.8V (they are rare), or a voltage divider out of two resistors. The RX pin in the XU4 needs to be protected. The TX, though it outputs 1.8V should be able to talk directly to a 3.3V RX.

Tact123
Posts: 9
Joined: Mon Jun 25, 2018 2:58 pm
languages_spoken: english
ODROIDs: Many ODroid HC1s
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Can I use the Serial Debug port to debug between two ODroids (XU4 to HC1 or HC2)?

Unread post by Tact123 » Sat Sep 21, 2019 7:21 am

mad_ady wrote:
Sat Sep 21, 2019 1:51 am
Look up either a level shifter that supports 3.3V to 1.8V (they are rare), or a voltage divider out of two resistors. The RX pin in the XU4 needs to be protected. The TX, though it outputs 1.8V should be able to talk directly to a 3.3V RX.
@mad_ady: Thank you again. When I get to the 3.3V project, then I will have to look up the voltage divider.

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: algirdasc, tony.hong and 3 guests