[GUIDE] USB to Serial UART Port Connection for Console Access


#1

This guide will demonstrate how to connect to the internal serial UART (Universal Asynchronous Receiver/Transmitter) port to gain console access for diagnosis and testing purposes.

WARNING: THE FOLLOWING PROCEDURES MAY VOID YOUR WARRANTY OR BRICK YOUR NAS - USE EXTREME CAUTION AT ALL TIMES

BASIC COMPUTER SKILLS AND SOME FAMILIARITY WITH ELECTRONICS ARE REQUIRED

Never try to interface with hardware unless you have the proper experience and tools for the job. One wrong move and the hardware can be permanently damaged.

The following instructions are based on the WD My Cloud PR4100 NAS, but may be applicable to other WD My Cloud models, possibly with minor variations applied as needed.

PREREQUISITES: A 3.3 Volt USB to Serial Breakout Board and appropriate connectors are required. A good multimeter is required, but an old analog multimeter will often work just fine. A decent terminal emulator program is also a must, with PuTTY being one of many good programs to use.

Shut down the NAS and remove the power cord, before removing the outer case, which is held on by three phillips head screws located on the back panel. The outer case slides back, then up. Be very careful not to hit any of the internal components.

The internal UART port is fitted with a standard JST 4 pin connector. These connectors were commonly used on the audio interface of older CD ROM drives. With the front of the NAS oriented to the right, the pinout of the internal UART port is (GND, TX, RX, VCC). This is may change, so one should ALWAYS VERIFY that the pinout is correct before trying to make a connection. Only the GND, TX and RX pins are required. Leave the VCC pin disconnected or damage to the NAS motherboard may occur.

To verify the pinout of the UART port, first identify the GND pin by measuring the resistance between each pin and a known grounding point such as the metal frame or a heat shield. The power plug of the NAS must be removed to measure resistance. The TX pin can be identified using an analog voltmeter to measure the voltage of each pin as the NAS is booting up. The voltage should vary slightly, before finally settling at around 3.3 volts. The RX and VCC pins can be a little more difficult to identify without actually testing for a connection. The problem with the RX pin is that its voltage can vary from device to device. Sometimes the RX pin is pulled high (3.3 volts), sometimes it’s pulled low (around 2 volts), and sometimes it’s left to drift until data is sent… making the voltage vary wildly. The VCC pin will tend to have a rock solid 3.3 volt reading, and it often has slightly less resistance than the TX and RX pins when measured against ground.

Again, the power cord must be removed when measuring resistance and one should be very careful to avoid shorting any pins while measuring voltage with the NAS powered on. A USB Logic Analyzer is another way to identify the TX, RX, and VCC pins. However, one has to know how to interpret the readings it provides, which is beyond the scope of this guide.

To connect the 3.3 Volt USB to Serial Breakout Board to the internal NAS UART port, use the following as a guide for making the connection. Note that the TX and RX pins must be crossed for communication to take place. NEVER connect the VCC pin or damage to the NAS motherboard may occur.

GND <--> GND
 RX <--> TX
 TX <--> RX
VCC <--> NO CONNECTION

After the pinout has been verified and a physical connection has been made, the terminal emulator program must be configured to establish a serial connection using the following parameters. The COM port is determined by device drivers, which can be viewed using the OS Device Manager.

Bits Per Second: 115200
Data Bits: 8
Parity: None
Stop Bits: 1
COM Port: COM5 (Determined by OS device drivers)

After all connections and settings have been verified, open the terminal emulator program and power on the NAS. If a successful connection has been made, a series of boot messages should start appearing in the terminal emulator program window. Eventually the opportunity to enter a Linux command prompt will appear.

When finished, shut down the NAS and remove the power cord BEFORE removing the physical USB to UART connection and/or replacing the outer cover.

Lastly, this procedure should NEVER be attempted without the proper skills and a good reason for doing so. While it can be used as a means of unbricking the NAS or for testing purposes, it should not be taken lightly. The risk of permanent damage to the NAS is VERY REAL, so one should always use EXTREME CAUTION.


[GUIDE] How to Boot from a USB Stick
[GUIDE] How to Build Custom Firmware
[WARNING] Custom Firmware Build
Totally bricked PR4100 - drive LEDs blinking red?
My Cloud PR4100 Firmware Analysis
[GUIDE] How to Install Debian Linux on the My Cloud PR4100 NAS
My Cloud PR4100 Firmware Analysis
#2

Thanks for taking the time to share this guide with us.


#3

While i am connected i am getting directly in the beginning before the “going to bios” is showing up
Error: Class:1000000 Subclass:30000 Operation 6

is this the same for you guys?


#4

I believe the error is generated by the UART adapter and it doesn’t seem to be any cause for alarm, or at least it has never caused any issues when I’ve used it.


#5

Thanks for the guide. My PR4100 started with the blinking blue power led , nothing changed during so I assume a faulty FW update. I tried this guide but putty is showing nothing when booting. I tested my serial board using a loop and works fine but when booting the NAS absolutely nothing happens nor is displayed in the term window. Any help will be appreciated…


#6

Hello, I am in the same process right now…bought serial board from amazon
Installed putty, and changed the bits per second, data com port etc, an when I click done…nothing happens, Wonder what I am doing wrong
realised as well that the serial board had a tiny shunt, to shift from 5volts to 3volts and it was on 5volts, will try to change the shunt to 3 tonight and try
when no board is connected, and in putty we press ‘done’…is there a window that opens ?
on my pc, nothing happens even when tripple checked that driver is good and COM is the right one


#7

Yes putty should open a window. You can always try using a loop in your serial board (Tx-Rx) and when opening the putty session whatever you type should be seen in the putty screen. At least it should tell you that the serial board is working fine.


#8

I installed the x64 bit version, I will try with 32bit to see, thnx


#9

Im using x64 too. It shouldn’t make any difference but let me know. I will try connecting to the WD agian tonight using my Linux machine…


#10

Thank you for this guide! I have an EE degree but it’s been a long time since I’ve gotten my hands dirty. Do you think I can do this with just the USB to TTL Serial Cable so I don’t have to buy a soldering iron, etc.?

To verify the pinouts would you recommend that I purchase a USB Logic Analyzer - 25MHz/8-Channel or a multimeter?


#11

Maybe, but I can’t say for certain.

I would use both.


#12

I bought that cable and the problem was that the uart pins on motherboard are a bit close together, so you can’t fit 3 of them (GND, READ, WRITE) with the black plastic on it. Solution was to go read-only …
Apart from that, it works fine.

Maybe I should get this: https://www.sparkfun.com/products/14425

EDIT: you need a 2.0mm 4-pin JST connector


#13

@Tfl Thanks for letting me know about your experience. I just ordered the other cable you mentioned and will let you know how it goes.

@dswv42 Thank you again for your advice. I bought the logic analyzer and a multimeter at your recommendation and am excited to get all of this working.


#14

Success report:

The pinouts on my PR4100 are GND , TX , RX , VCC as in @dswv42’s guide.

I used the USB to TTL Serial Cable and was able to connect it for read-only access as @Tfl did.

I connected on macOS using the instructions here: https://software.intel.com/en-us/setting-up-serial-terminal-on-system-with-mac-os-x

I had to go through this process because I had inadvertently broken my Debian PR4100 without knowing how. I had unplugged the ethernet cable from the first port to use it temporarily for another purpose. When I plugged it back in, I plugged it into the second port without thinking and that prevented the DHCP client from getting a lease on boot. :man_facepalming:

@Tfl, I also tried the https://www.sparkfun.com/products/14425 cable you suggested and the connector is way too small. In retrospect it would have been more useful to buy the JST Jumper 4 Wire Assembly suggested by @dswv42.


#15

Speaking of two ethernet ports, why does this box have two power ports? I’ve never seen that before.


#16

It’s to hook up an additional universal power supply to be able to shutdown gracefully on power outages.
Sorry about wrong cable suggestion… my bad.


#17

There are many different JST style connectors, and as you discovered… the Qwiic cable connector isn’t correct. In this case, the PR4100 UART port uses a JST PH connector, and the Qwiic connector is actually a JST SHR connector.

The JST PH connectors were commonly used as CD audio connectors for SoundBlaster sound cards, way back when one typically had to manually configure the card’s IRQ and DMA address settings using jumpers, but that’s during a time when many of today’s computer users were still wearing diapers.


#18

That doesn’t make sense to me :thinking:; normally a UPS is placed inline with a power adapter.

No worries, it looked promising to me too.

Oh yes, I remember! And setting master/slave configurations on IDE drives with jumpers too!


#19

My understanding is that the second PR4100 power supply port is for a second power supply, in the event that one of them fails. It’s rare, but it can happen. Basically, this use-case scenario would be for users who can’t afford down time.

However, finding the proper power supply (without the appropriate specs) can be a challenge since WD does not appear to sell them separately. Fortunately, the specs are known, and suitable power supplies are widely available for a reasonable price.

BTW: It’s just an ordinary laptop power “brick”, nothing special, but the specs must be correct.


#20

Oh interesting, thanks for explaining that. That just led me to learn that all power supplies wear out over time, same as drives.