I would like my Zyxel NSA325 to automatically power on all time.
From the original documentation I am conviced that the device is capable of that. But I do not know how to configure that.
Does someone knows if it is possible to set it somehow from uboot or openwrt? (I have no idea what part of device is responsible for such feature.)
If this is not possible I thought of reverting back to original stock oem firmware to try to set it from there. But I cannot find any informationabout how to do that for Zyxel NSA.
Thanks for any ideas or hints,
If some is interested in this I am trying to solve it with the help of people on this forum https://forum.doozan.com/read.php?3,92579
You could run that zyshclient by chrooting the initramfs of the 325. But I think it won't work. The action you are searching for is implemented in some microcontroller (which is responsible for fan control, wake on clock, and power on after power loss, AFAIK), which is connected to the NIC, somehow. So I don't think zyshclient can talk to it without the stock kernel.
I currently have both zImage and the filesystem extracted from the firmware bin. So maybe if I can somehow boot it from USB to get the full environment?
Fan control seems to be done using ADT7463 chip that is configured using i2cset tool. I do not know if the same chip is also responsible for automatic Power on as I only saw that it is being set using the zyshclient tool (that probably speaks to zyshd daemon).
I don't think the fan control is done by some i2c controlled chip. Years ago, ZyXEL had trouble with the fans being to loud on the 325v1, because they were spinning too fast. They have replaced the physical fans. If the problem could have been serviced with a software update, they would have chosen that. The 325v2 is basically identical. Just a different housing.
Anyway, if somehow i2cset is involved by setting the ucontroller, you might be able to intercept the communication by exchanging i2cset by a logging script. ZyXEL tends to call external binaries for actions like this.
You might be right - acording to this thread https://forum.doozan.com/read.php?2,91649,91694 different chip is used and setting values using i2c did not have effect on fan.
Still I do not know how Power on is controlled. And probably only way is to get the original tools running.
Maybe we can ask Zyxel for source code of zyshclient. This is old product, no longer produced.
I have the GPL sources of the 325v2 here, but as far as I remember is doesn't contain the zyshclient sources. It does contain the kernel sources, of course. Maybe you can find how the kernel implementation is.
By the way, you might also be interested in btncpyctl.c, which contains an implementation of some ZyXEL specific functions available through /dev/btncpy. I wrote that using the kernel sources, and now I see it also contains
#define POWER_RESUME_SET _IO(BTNCPY_IOC_MAGIC, 32)
#define POWER_RESUME_CLR _IO(BTNCPY_IOC_MAGIC, 33)
which might be related to your question, and which might help grepping the kernel.
After some looking around it seems to me that zyshclient is used for communicating with zyshd that actualy does the work. Looking into zyshd I can see:
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00/etc/zyxel/storage/pwron.status\x00\x01\x02LIST;\x03\x0a\x00\x00\x00status: %s\x0a\x00\x04\x0a\x00\x00status: former\x0a\x00former\x00\x00Disable Auto Power-On Setting: %s\x00\x00\x00FAILED\x00\x00Modify Auto Power-On Setting: %s\x00\x00\x00\x00SUCCESS\x00always\x00\x00pwron_enable\x00\x00\x00\x00/sbin/i2cdetect -y 0 | grep 68\x00\x00r\x00\x00\x0068\x00\x00%s -y 0x0 0x0a 0x0a %s07 w\x00\x00/sbin/i2cset\x00\x00\x00\x000x01\x00\x00\x00\x00%s -y 0x0 0x50 0x7 %s b\x00%s(%d):%s\x00\x00\x00%s -y 0x0 0x0a 0x0b 0x07 b\x00\x00%s -y 0x0 0x0a 0x0b b\x00\x00\x00/sbin/i2cget\x00\x00\x00\x00%s -y 0x0 0x50 0x7 b\x00\x00\x00\x00%s(%d):failed\x00\x00\x00pwron_disable\x00\x00\x000x00
So it seems they are setting it using i2cset.
I solved it!
# i2cset -y 0x0 0x50 0x7 0x01 b
After setting this the device alwas powers on after cable reconnecting no matter if it was on of or before. Exactly as I wanted!
More details here https://forum.doozan.com/read.php?3,92579,92769#msg-92769
Thank you all for suggestions and support!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.