Adding a serial port through an RJ45 connector

[Mike Lu] likes to add serial ports to his routers to use for debugging but he didn’t want to drill holes in his new RT-N12. After a bit of head-scratching he thought about repurposing the four unused wires on one of the RJ45 Ethernet connectors. This would allow him to interface with the necessary signals and still have the option of using that port for a network connection. The first step was to build the circuit to output the correct serial levels and connect it to the unused pins on the jack. Next, to separate serial and Ethernet on the outside of the router he build a short adapter cable.

This is an elegant solution if you’re looking for zero case modifications. But if you don’t mind a few inconspicuous holes we love the serial port used on this Dockstar.


  1. Pedro says:

    “This is an eloquent solution”

  2. alankilian says:

    I’m not giving away any coprorate secrets here,
    but the Cray XT3, XT4, XT5 and XT6 all used this
    technique to sneak a differential serial bus from
    the rack controller up to each chassis along with
    a 100base-tx Ethernet signal.

    It was interesting when people in the field
    couldn’t power up a chassis and we said “Change
    the Ethernet cable” and it would then power-up.

  3. 2bithacker says:

    Just keep in mind you can’t do this with 1000base-T.

  4. Pilotgeek says:

    Isn’t this mostly just common sense?

    What’s next, sending some sort of crazy power source through an RJ45/Ethernet port?

  5. Andrew says:

    Eloquent solution? I appreciate the attempted use of eloquent language, but the word you were looking for is elegant.

  6. BiOzZ says:

    haha i think nothing looks better than a radioshack DB-9 connector drimmel cut on to any electronic device XD
    i guess thats just me

  7. Eric says:

    Andrew, I hope you’re kidding.

  8. Mike Szczys says:

    @Pedro and Andrew: Thanks, Fixed.

  9. @2bithacker, If you are refering to todays GigE, then yes you can. In emergency situations where I dont have an additional run, I have split the pairs, I run 12vdc on blue, and video on brown, GigE on std orange/green.

  10. Bill Porter says:



    From Wikipedia

    “In a departure from both 10BASE-T and 100BASE-TX, 1000BASE-T uses all four cable pairs for simultaneous transmission in both directions”

  11. Bill Porter says:

    In your emergency Michael, apparently you haven’t been getting true GigE.

    “If two gigabit devices are connected through a cable with two pairs only, negotiation takes place on two pairs only, so the devices successfully choose ‘gigabit’ as the highest common denominator (HCD), but the link never comes up. Most gigabit physical devices have a specific register to diagnose this behaviour. Some drivers offer an “Ethernet@Wirespeed” option where this situation leads to a slower yet functional connection”

  12. GCL says:

    A very good friend has a saying from his engineering days, “If it works, leave it alone!”.

    So there you go folks. I say the fellow came up with an excellent solution. It is the fault of the router designers to not make it easier on the users for the fact that these routers do have serial console points.

  13. osgeld says:

    @BiOzZ, nah I think so too

  14. Jaspel says:

    Exactly the type of ‘hack’ worthy of this website. Inspiring and easy to understand, yet creative.

  15. Life2Death says:

    do you work at the old cray HQ down the road from my house, in Chippewa Falls?

  16. cantido says:

    Running stuff over the two spare pairs is nothing new really. Neat idea, I personally hate having to have adapters etc though. Like Cisco stuff.. Why couldn’t they have just fitted a normal DB9 serial port? Nope, because people loose the one they had and nick one of off a random switch you always you have to dig around in your junk box for the fecking adapter when you come to work on that switch. grrr.

    Why not fit a bluetooth UART module?

  17. osgeld says:

    heh after my recent experience trying to download a simple wifi cardbus driver from cisco, they can go sit on a stick

  18. detn8r says:

    Whats the use of a serial port on a router?

    How is it used?

  19. GCL says:

    @detn8r Note what he’s running on the router in place of what it was running before.

    Sometimes it requires extensive debugging to work properly. The only way to accomplish that is to watch the router startup via a serial connection to the router.

  20. @bill, wikipedia is not always correct, now 1000base t4 may use it, however, the switches and my pc, do not. I had to split pairs in a remote office (150ft away) due to the fact there was not enough copper running into the building, and I did POE ethernet to a VoIP phone on the 2nd set of wires (blue,brown) and I did GigE over first 2 (orange,green) and GigE rated 1000 on my test equipment, and I run PCoIP to those desks.

  21. Bill Porter says:


    How about Cisco?

    Beter then wikipedia?
    If you remove the other pairs, it will still negociate at GigE, but won’t run that fast since it’s 250mb/s per pair. Have you run real world speed tests on your magic spec defying link?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,388 other followers