Help translating i2C command from a linux Python2 script or FreeBSD smbmsg to i2cset, to enable ports in Riverbed Steelhead CX755

I have compiled an image for this device.
It is a very powerfull device with:

  • xeon cpu dual core 1.6Ghz
  • 2 gb ram ecc
  • 2 sata ports
  • 6 Gigabit ethernet interface
    It works very well but there is a problem with 4 ethernet interface that are in bypass mode
    So to use them like a standard ethernet ports it is needed to write on some smbus registers.

in pfsense it is possibile using shellcmd with the following commands:

smbmsg -s 0x48 -c 0x55 -o 6 0x03 0xfc 0x01 0xfe 0x66 0x99

Is there a similar way to do the same in openwrt?
Can someone help me?

More information in this topic:

I think it is possibile to do it with with i2c

# i2cdetect -l
i2c-0   smbus           SMBus I801 adapter at 0540              SMBus adapter
# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         08 -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- 24 -- -- -- -- -- -- -- -- -- 2e --
30: 30 -- -- 33 -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- 44 -- -- -- 48 49 4a 4b -- -- -- --
50: 50 51 -- 53 -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- 69 -- -- -- -- 6e --
70: -- -- -- -- -- -- -- --

Is it possible to convert the command "smbmsg" to i2cset?

That command is FreeBSD's way to talk to a device on i2C, and they seem to have reverse-engineered it from this python script https://github.com/c0d3z3r0/rbmode so it's theoretically possible.
(that runs on Debian according to https://forum.netgate.com/post/877019 so probably works on OpenWrt too, although you probably need to alter it to use python3)

I edited the title to be more clear

With some little modifications... it works!

Thank you for your suggestions

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.