logo elektroda
logo elektroda
X
logo elektroda

UART in HDD - snapshot elektroda.pl

TechEkspert 
Some hard drives have a serial interface with pins next to the SATA connector. Basic information can be found in the topic: Seagate and Samsung HDD FAQ plus terminal - short description . Communication with the disk via the UART interface is usually used for failure diagnostics or in some cases for defect removal (e.g. the once popular problem with ST3500320AS). The connector on which the serial interface can be accessed was once used to ensure the compatibility of SATA II disks with SATA I:








To connect to the disk, you will need a USB UART 3.3V converter (currently popular, among others due to Arduino). The TX HDD pin can be found experimentally, checking the next pins and waiting for the transmission to appear during the disk boot. The RX HDD pin can also be determined experimentally, for safety, including a 1k? resistor in the converter TX line. The baud rate is usually 9600 or 38400 or 57600bps.






The diagnostic interface can also be found on old PATA drives:


Some commands sent to the disk can damage data or the disk, so it is worth trying with a redundant hard disk.

Seagate:
When starting the Seagate HDD, we will usually see a short log, e.g .:
Code: Text
Log in, to see the code


In the case of the Seagate HDD, we can start by sending Ctrl + z,
then we can switch between command levels by entering "/ level_number" and enter eg / 2 second level.
Level-independent commands such as "." Are also available. current HDD status.
For example, on level 2 (/ 2), we can issue commands:
Z - disk spinning is stopped
U - start disk spin
and - damage in the current path
e.t.c.
At level 3, give the command:
b - park the heads for a moment
D - will perform the access speed test (in random mode)
but e.g. on level 7, issuing the same command means something different:
D - displays the temperature
We get the full list of commands at level C (/ C) by issuing the command:
Q - information about ASCII commands

For the disk under test, I received quite a substantial set of commands:

Code: Text
Log in, to see the code


Here: information about the Seagate HDD terminal commands .

There we find quite exotic commands, e.g. performing a test of the head positioning mechanism and displaying data to the Bode chart ...

Efficient Seagate disks at startup are not too "talkative" we usually get information about the correct startup, that. firmware or disk model data, memory amount, in the case of PATA disks with jumper configuration. Sometimes there is information about the date of the firmware compilation and sometimes about the author of the software.

Here: more information on attempts to access Samsung HDD "operating" system , and the continuation Link .

Samsung:
Samsung HDDs are more "talkative" during startup, we get information about the supply voltage, rotational speed temperature, test results, disk parameters, e.g .:

Code: Text
Log in, to see the code


From ENG> to DBG mode> switch to Esc key, return to ENG> with GO command.

The available commands can be obtained by typing:
HE
Code: Text
Log in, to see the code


Public command documentation is weaker for Samsung HDDs than for Seagate HDDs, for example:

RT - reset, restart
LB - information about HDD
DV - firmware information
LL - possibly sectors pending / damaged

Checking subsequent commands without knowing them exactly may result in disk damage (eg FE - it could be eg flash erase ...).

Why did I check this method of communication with HDD?
This method of communication with the disk is usually used when there is a problem with the HDD. I have two machines where I cannot read SMART disks. In one case the HDDs work in a simple RAID1 handled by the motherboard controller, in the other case the HDD is hidden behind the Intel(R) Smart Response controller. I wanted to use UART communication with the disk for continuous monitoring of the disk's condition (instead of SMART). Unfortunately, in both cases, they were WD drives, which most likely did not have the UART lines on the connector next to the SATA connector.

About Author
TechEkspert
TechEkspert wrote 6246 posts with rating 4908 , helped 16 times. Been with us since 2014 year.

Comments

spamove 15 Sep 2016 19:34

Sensational post, just a comment: Samsung drives sometimes have 2x2 pins, the interface is then this: http://obrazki.elektroda.pl/4783871800_1473953242_thumb.jpg As for pin z *, in some (mainly... [Read more]

TechEkspert 15 Sep 2016 23:43

Thank you for the interesting supplement. I wonder if SAS disks have such an interface and if SCSI disks did. I plan to look at an SSD and see if there is a debugging interface on the board inside... [Read more]

Łukasz_W 04 Feb 2022 10:17

Yes, at Seagate, for example. It is also present in some SSDs (SanDisk, Samsung). [Read more]

TechEkspert 04 Feb 2022 18:36

Thanks for the information! In SSD, UART is sometimes available inside the case as a PCB field. [Read more]