It looks like they have made some significant progress on the EX4100 and EX2100 series of NAS to get Debian working. They do have the same issues though that you mentioned around LED and Fan control.
The file referenced is identical to the ones you are referring to in /usr/local/modules/etc/wd however, the EX4100 does not have a thermal_config.xml file. Instead has the following:
To dig deeper in the hardware, you might like this article: Writing an ACPI driver - an introduction [LWN.net]
It explains how to decode the ACPI tables and even how to write a driver
But some source code would be more helpful here. We shall see what the future brings.
It looks like the EMC1073 uses the EMC1403 lookup code, but the driver is to-be-written.
See here
However the datasheets are almost completely the same (when comparing the registers), except for 1 extra feature in the EMC1403: it has beta compensation.
All registers are the same, except for 0x25 and 0x26 is reserved for the beta compensation params in the EMC1403.
EMC1073 and EMC1403 have the exact same supplier code and model number, but thereâs 4 years between the datasheets and SMSC was bought by MicroChip.
Sensors-detect stops on the first match, which results in the detection of EMC1073⊠but Iâm quite sure itâs the EMC1403.
Iâm certain that there is an I2C device connected on the bus (the ST micro), it measures the temperature and itâs one of these 2 devices (as all the registers match).
The results are shown in WDâs fan_control program (it shows 4 + 4 + 1 temperature measurements), but debianâs sensors doesnât show the disk temperatures due the missing driver.
This is fixed by adding emc1403 to /etc/modules.
The fan is controlled by the BIOS. Here is the best overview I could find. I donât know how to get access to the RPM value.
# cat /sys/class/thermal/cooling_device0/type
Fan
# cat /sys/class/thermal/cooling_device0/device/uevent
DRIVER=acpi-fan
MODALIAS=acpi:PNP0C0B:
I had a look at GPL/kernel/linux-4.1.13/drivers/acpi/fan.c provided by WD. It has the commands to get the fan speed.
Iâm a python guy, so Iâd borrow some ideaâs here and use that to talk to /var/run/acpid.socket
Similar section on the EX4100 as well, but donât think it actually does anything.
# To protect from user _easily_ accessing reserved part7 and part8,
# we remove the device nodes.
# Anyone who want to access them must create the nodes itself.
for dn in `blkid | grep wdnas_reserve | awk -F ":" '{ print $1 }'`; do
rm -f $dn
done
In /dev/ have the following devices:
root@WDMyCloudEX4100 /dev # ls -al mt* ubi*
crw-rw---- 1 root root 90, 0 Nov 15 06:47 mtd0
crw-rw---- 1 root root 90, 1 Nov 15 06:47 mtd0ro
crw-rw---- 1 root root 90, 2 Nov 15 06:47 mtd1
crw-rw---- 1 root root 90, 3 Nov 15 06:47 mtd1ro
crw-rw---- 1 root root 90, 4 Nov 15 06:47 mtd2
crw-rw---- 1 root root 90, 5 Nov 15 06:47 mtd2ro
crw-rw---- 1 root root 90, 6 Nov 15 06:47 mtd3
crw-rw---- 1 root root 90, 7 Nov 15 06:47 mtd3ro
crw-rw---- 1 root root 90, 8 Nov 15 06:47 mtd4
crw-rw---- 1 root root 90, 9 Nov 15 06:47 mtd4ro
crw-rw---- 1 root root 90, 10 Nov 15 06:47 mtd5
crw-rw---- 1 root root 90, 11 Nov 15 06:47 mtd5ro
crw-rw---- 1 root root 90, 13 Nov 15 06:47 mtd6ro
crw-rw---- 1 root root 90, 15 Nov 15 06:47 mtd7ro
brw-rw---- 1 root root 31, 0 Nov 15 06:47 mtdblock0
brw-rw---- 1 root root 31, 1 Nov 15 06:47 mtdblock1
brw-rw---- 1 root root 31, 2 Nov 15 06:47 mtdblock2
brw-rw---- 1 root root 31, 3 Nov 15 06:47 mtdblock3
brw-rw---- 1 root root 31, 4 Nov 15 06:47 mtdblock4
brw-rw---- 1 root root 31, 5 Nov 15 06:47 mtdblock5
brw-rw---- 1 root root 31, 6 Nov 15 06:47 mtdblock6
brw-rw---- 1 root root 31, 7 Nov 15 06:47 mtdblock7
crw-rw---- 1 root root 250, 0 Nov 15 06:48 ubi0
crw-rw---- 1 root root 250, 1 Nov 15 06:48 ubi0_0
crw-rw---- 1 root root 249, 0 Nov 15 06:48 ubi1
crw-rw---- 1 root root 249, 1 Nov 15 06:48 ubi1_0
crw-rw---- 1 root root 248, 0 Nov 15 06:48 ubi2
crw-rw---- 1 root root 248, 1 Nov 15 06:48 ubi2_0
crw-rw---- 1 root root 10, 60 Nov 15 06:47 ubi_ctrl
Let me clarify my post above. I donât believe the command does anything because I donât see labels defined on any of the remaining devices, so follows that they are probably not using labels at all. However, I just looked on my NAS and the âentware-ngâ version of âblkidâ produces the following: