[Guide] The Enclosure Anthology

dvader

Adept
Hi Everyone,

Recently I migrated every last bit of my data onto my home NAS (Had it for a few years now but laziness is a b***tch) including the long-forgotten and mostly useless files stored in an external hard disk bought when I was still in college. I had a collection of 5 external HDDs (Among my family members ofc) all of them Seagates. Some of them were dying and one of them has died since then. Now I don't like to throw things if I can mend or fix them so I decided to find out if these enclosures could be reused.

All of these external HDDs were Seagate Expansions bought circa 2016 and onwards. I shucked the drives and found they used a JMicron JMS577 USB-SATA bridge/controller. These JMS577 are basically OEM JMS578 controllers (found in budget enclosures these days) and I found a way to reflash the firmware in these controllers to (noticeably) improve UASP performance, disable drive spindown to use these enclosures with RPi or PCs, get hot-swap functionality (don't know why you would need it but it's there).

There are two flash utilities available,

Note: For flashing just attach your enclosure to your PC (normally) with an HDD installed. JMS577/578/579 doesn't like to come up without a disk attached to its rear. Don't worry you won't do anything to your disk.

1. Windows: Simple and easy. However, no way to set extra options like disable spindown and enable hotswap. You will just be able to flash with default options. However this lets you see if you have a compatible controller, just attach your disk and open the utility to check your enclosure's info.

2. Linux: Odroid forums have a Linux flash utility with a full feature set however it's an Arm32 binary and as such only runs on ARM/AARCH64 Linux kernel. Which should be easy if you have an RPi or any other ARM-based SBC with Linux

Ref: https://wiki.odroid.com/odroid-xu4/software/jms578_fw_update

Note that JMS577 is just OEM JMS578

You need to flash the following firmware: "JMS578-Hardkenel-Release-v173.01.00.02-20190306.bin"

There are a couple of more recent firmware but they are either marked beta or extracted from untrusted sources

Now if you have bought a SATA enclosure recently, Orico has a few good options, and most of them (at least the ones available on Amazon and PiBox, --- 25PW1-XX) have the same JMS578 controller. These enclosures have been reported to have issues with TRIM, if you face these issues just re-flash to fix.

Buying a new enclosure today: I bought a few enclosures from PiBox [M.2(SATA and NVME) and SATA] just to test the Realtek 9201R(sata), 9210 (nvme), 9210B (nvme and m.2 SATA) controllers. And damn these are way better than the current options in the market. These are awesome and have replaced my Ventoy Sandisk Pendrive with an M.2 3.2 gen2 enclosure.

Note: Attached is the Windows Flash tool, for Linux Arm32 see above.

PS: Don't forget to dump your existing firmware. And as always t*ts or firmware flash at your own risk.
 

Attachments

  • FwUpdateTool_v1_19_16_24.zip
    579.7 KB · Views: 40
Last edited:
Got ORICO M.2 NVMe SATA SSD Enclosure Adapter Tool-Free, USB C 3.2 Gen 2 10Gbps NVME, 5Gbps NGFF SATA PCIe M-Key(B+M Key) , tried using a 240 gb sata pcie ssd on it.
Getting 340-350MB/s speed on copying video files, cant comment on temperature since its a chinese drive bought in 2018 and crystaldiskinfo always shows "40 C".
someone said that orico cables only work in a specific orientation but thats not the case in this piece.
The controller is RTL9210B-CG.

1000299335.png
 
Last edited:
I also vae
Got ORICO M.2 NVMe SATA SSD Enclosure Adapter Tool-Free, USB C 3.2 Gen 2 10Gbps NVME, 5Gbps NGFF SATA PCIe M-Key(B+M Key) , tried using a 240 gb sata pcie ssd on it.
Getting 340-350MB/s speed on copying video files, cant comment on temperature since its a chinese drive bought in 2018 and crystaldiskinfo always shows "40 C".
someone said that orico cables only work in a specific orientation but thats not the case in this piece.
The controller is RTL9210B-CG.

@dvader Should i worry about firmware updating or just keep using as it is?
I have updated the Orico enclosure with RTL9210B-CG to latest firmware 1.33.44 and the performance is better. It's better to flash the latest firmware as RTL9210B-CG is 1st Gen chipset and compatibility issues and bugs are constantly being resolved. I didn't face the orientation issue. The cable quality and USB C port of the Orico are somewhat on the down side when compared to PiBox M2-322-NE.
 
@ashokbishnoi can you link me to guide\video on how to do that.
Also how should i go about making a backup before flashing , if thats necessary.
I tried running the exe attached in the post but it didnt detect anything.
 
I don't have any idea of any video. This is what I have learnt over days regarding flashing RTL9210B-CG.
The firmware has 3 components. Config, GD firmware, Updated firmware.
There's no software tool to backup complete firmware from SPI chip. The software tool only allows to backup Config part.
Via hardware tools a dump(complete firmware) of SPI chip can be made, but I thought that was not necessary.
Here's how I did. Noted down the pre-installed fw version which was 1.23.15.

Made a backup of Config.

Downloaded the latest fw files from 1.33.44

Edited the Config file in downloaded fw files as per the backup Config.

Succesfully flashed.
Below is the backup config.

**************************************************************
Device : [Port9] : Realtek RTL9210B-CG #0
**************************************************************
U2PHY : 02 f4 9b e0 e1
U3PHY : 02 d4 09 00 d5 00 80
VID : 0x0bda
PID : 0x9210
MANUFACTURE : "Realtek"
PRODUCT : "RTL9210B-CG"
SERIAL : "012345679039"
SCSI_PRODUCT : "RTL9210B-CG "
SCSI_VENDOR : "Realtek "
USB_SELF_PWR : n/a
DISK_HOTPLUG : 0x00
LED : 0x01
PINMUX1 : 0x00070000
PINMUX2 : 0x00000000
U2_MAXPWR : 0xfa
U3_MAXPWR : 0x70
ASPMDIS : 0x00
PCIE_REFCLK : n/a
DISK_IPS_THRES : 0x0a
SWR_1_2V : n/a
EN_UPS : n/a
PD : n/a
CUSTOMIZED_LED : n/a
SUSPEND_LED_OFF : n/a
FORCE_USB_SPEED : n/a
FORCE_PCIE_SPEED : n/a
EN_U1U2 : n/a
FORCE_USB_QUIRK : n/a
FORCE_PCIE_QUIRK : n/a
FAN : n/a
DIS_SHOW_EMPTY_DISK : n/a
FORCE_SATA_NORMAL_DMA : n/a
UART_DBG_PIN : 0x05
FINGER_PRINT_EN : n/a
RM_INTERNAL_RD : n/a
HS_AUTO_SWITCH : n/a
UART_BAUD_RATE : n/a
CUSTOMIZED_DISK_IDENTIFY : n/a
HW_LED_CFG : n/a
CDROM_CFG : n/a
SUPPORT_HID : n/a
LATE_INIT_DISK : n/a
SCSI_WP_PIN : n/a
SD_MMC_TYPE : n/a
FORCE_PORT_TYPE : n/a
BCDDEVICE : n/a
SUSPEND_DISK_OFF : n/a
SCSI_WB_PIN : n/a
CUSTOMIZED_FEATURE : n/a
PERIPH_API : n/a
RAID_CFG : n/a

Boot Mode : Flash
FW Ver : 1.23.15
FW Build Date : 2020.11.16
IC Pkg Type : PCIE/SATA
UUID : n/a

Disconn_ForceUSB2 : false
I further edited the config file to modify manufacturer name, turn off LED when safely removed, etc.


Here's the content of the final cfg file -

VID = 0xbda
PID = 0x9210
MANUFACTURE = "Orico"
PRODUCT = "PWEM2-G2"
SERIAL = "012345679052"
DISK_IPS_THRES = 1
DISK_HOTPLUG = 0x0
PINMUX1 = 0x70
PINMUX2 = 0x0
U2_MAXPWR = 0xfa
U3_MAXPWR = 0x70
ASPMDIS = 0x0
FORCE_USB_QUIRK = 0x80
RM_INTERNAL_RD = 0x1
LED = 0x1
;HW_LED_CFG = 0x0
CUSTOMIZED_LED = 00 01
SUSPEND_LED_OFF = 0x1
UART_DBG_PIN = 5
 
Last edited:
Back
Top