I have a UGreen NASync device running FreeBSD 14.3-RELEASE.
The device has multiple hard drive LEDs can be programmed, they just blink if the OS doesn't send any instructions so I want to try that.
On Linux, there's a community tool for managing LEDs on the NASync that does exactly what I want.
Their README.md shows instructions how to read and write the LED status using commandline utilities without compiling their tool (I wansn't able to compile it due to a dependency on <linux/i2c.h> and <linux/i2c-dev.h>, which of course are not present on FreeBSD)
In the instructions, they talk to a "SMBus I801 adapter at efa0" on address 0x3a, excerpt from their README.md:
On FreeBSD, I also see one SMBus when I use the smb(4) kernel module.
I also see two I2C when I load the iic(4) kernel module.
However, I don't detect the same 0x3a device on SMBus.
I also tried the two other SMBus-es, using the iicsmb(4) module:
But these busses don't help me much further either.
Probing smb1 takes a long time but exits with error code 0 without more output. smb2 probing is instant. Still no expected value of 0x3a.
Also blindly sending the command to read the Power LED information (0x81) doesn't work:
At this point I feel stuck. Am I using the correct modules and tools to do the equivalent of the instructions on Linux? What other things can I try?
The device has multiple hard drive LEDs can be programmed, they just blink if the OS doesn't send any instructions so I want to try that.
On Linux, there's a community tool for managing LEDs on the NASync that does exactly what I want.
Their README.md shows instructions how to read and write the LED status using commandline utilities without compiling their tool (I wansn't able to compile it due to a dependency on <linux/i2c.h> and <linux/i2c-dev.h>, which of course are not present on FreeBSD)
In the instructions, they talk to a "SMBus I801 adapter at efa0" on address 0x3a, excerpt from their README.md:
Code:
### START Copied from https://github.com/meyergru/ugreen_dxp8800_leds_controller ###
$ i2cdetect -l
i2c-0 i2c Synopsys DesignWare I2C adapter I2C adapter
i2c-1 smbus SMBus I801 adapter at efa0 SMBus adapter
i2c-2 i2c Synopsys DesignWare I2C adapter I2C adapter
$ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: 30 -- -- -- -- 35 UU UU -- -- 3a -- -- -- -- --
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
### END Copied from https://github.com/meyergru/ugreen_dxp8800_leds_controller ###
On FreeBSD, I also see one SMBus when I use the smb(4) kernel module.
Code:
kernel: ichsmb0: <Intel Alder Lake SMBus controller> port 0xefa0-0xefbf mem 0x603d1a8000-0x603d1a80ff irq 16 at device 31.4 on pci0
kernel: smbus0: <System Management Bus> on ichsmb0
kernel: smb0: <SMBus generic I/O> on smbus0
Code:
kernel: ig4iic0: <Intel Alder Lake-P I2C Controller-0> at device 21.0 on pci0
kernel: ig4iic0: Using MSI
kernel: iicbus0: <Philips I2C bus (ACPI-hinted)> on ig4iic0
kernel: ig4iic1: <Intel Alder Lake-P I2C Controller-1> at device 21.1 on pci0
kernel: ig4iic1: Using MSI
kernel: iicbus1: <Philips I2C bus (ACPI-hinted)> on ig4iic1
kernel: iicbus1: <unknown card> at addr 0x40
kernel: iic0: <I2C generic I/O> on iicbus0
kernel: iic1: <I2C generic I/O> on iicbus1
However, I don't detect the same 0x3a device on SMBus.
Code:
# smbmsg -f /dev/smb0 -p
Probing for devices on /dev/smb0:
Device @0x10: w
Device @0x74: rw
Device @0x88: rw
Device @0x94: rw
Device @0xa4: r
I also tried the two other SMBus-es, using the iicsmb(4) module:
Code:
kernel: iicsmb0: <SMBus over I2C bridge> on iicbus0
kernel: iicsmb1: <SMBus over I2C bridge>
kernel: on iicbus1
kernel: smbus1: <System Management Bus> on iicsmb0
kernel: smb1: <SMBus generic I/O> on smbus1
kernel: smbus2: <System Management Bus>
kernel: on iicsmb1
kernel: smb2: <SMBus generic I/O> on smbus2
Code:
# smbmsg -f /dev/smb1 -p
Probing for devices on /dev/smb1:
# smbmsg -f /dev/smb2 -p
Probing for devices on /dev/smb2:
Device @0x80: r
Device @0x84: r
Device @0x98: r
Device @0x9c: r
Also blindly sending the command to read the Power LED information (0x81) doesn't work:
Code:
# smbmsg -f /dev/smb0 -s 0x3a -c 0x81 -i 0x0b
smbmsg: Error performing SMBus IO: Device not configured
# smbmsg -f /dev/smb1 -s 0x3a -c 0x81 -i 0x0b
smbmsg: Error performing SMBus IO: Resource temporarily unavailable
# smbmsg -f /dev/smb2 -s 0x3a -c 0x81 -i 0x0b
smbmsg: Error performing SMBus IO: Device not configured
At this point I feel stuck. Am I using the correct modules and tools to do the equivalent of the instructions on Linux? What other things can I try?