wigyori / dns320l-daemon

MCU controller for D-Link DNS-320L
0 stars 1 forks source link

Some bugs #1

Open andyboeh opened 3 months ago

andyboeh commented 3 months ago

I saw that you created a PR for this device to get it into OpenWrt (great!), so I had a look at the improvements you've made to my daemon. In fact, I found a few bugs:

06f7bba doesn't make a difference: pollGpio is a boolean, the actual GPIO that is polled is defined in dns320l.h as GPIO_BUTTON_POWER https://github.com/wigyori/dns320l-daemon/blob/c74941880e0a8d2bc0344b3256b984397512e8c3/dns320l.h#L30C1-L30C33 - so it always was GPIO29.

I suppose that you don't get a proper GPIO reading for GPIO29 for one or all of the following:

And last but not least: Nowadays, I would remove or limit the socket server support. It doesn't have much benefits.

Great to see that this device is still round. Mine died a few years ago and I switched to a custom x86 system in the meantime.

wigyori commented 3 months ago

Hi Andy, great to see you here, thanks for the comments.

root@OpenWrt:/sys/kernel/debug# cat gpio
gpiochip0: GPIOs 0-31, parent: platform/f1010100.gpio, f1010100.gpio:
 gpio-22  (dns320l:orange:r_hdd) out lo
 gpio-23  (dns320l:orange:l_hdd) out lo
 gpio-24  (regulators:regulator) out hi
 gpio-25  (dns320l:usb:blue    ) out lo
 gpio-26  (dns320l:usb:orange  ) out hi
 gpio-27  (USB unmount button  ) in  hi (act lo) - IRQ edge  (clear  )
 gpio-28  (Reset push button   ) in  hi (act lo) - IRQ edge  (clear  )

gpiochip1: GPIOs 32-49, parent: platform/f1010140.gpio, f1010140.gpio:

Yeah, this one is still alive, although the PSU is gone for good, and it was sitting for like 2 years with starting and re-starting working on it. It's also good to see that there is feedback on it. :)

andyboeh commented 1 month ago

Regarding the power GPIO, I found the following text on my website:

The power up / shutdown procedure of the device is as follows: