Auto Power Up DNS-323 after Power Failure

578 views
Skip to first unread message

Jean-Pierre Lavoie

unread,
Jul 3, 2018, 1:35:40 PM7/3/18
to Alt-F
It was possible in the old Dlink firmware to auto power up the unit after a power failure.
Is it possible with Alt-F? 
I would use it to store camera surveillance videos so it would be important that the nas powers up after a long power failure.

Rolf Pedersen

unread,
Jul 3, 2018, 5:26:59 PM7/3/18
to al...@googlegroups.com
Not in the firmware, I think.  There have been previous discussions
about this capability you might find with a search at the google groups
alt-f forum.  For some ideas to modify hardware:
http://dns323.kood.org/hardware:autopoweron#dns-323_automatic_power_on
Rolf

João Cardoso

unread,
Jul 3, 2018, 8:54:58 PM7/3/18
to Alt-F


On Tuesday, 3 July 2018 18:35:40 UTC+1, Jean-Pierre Lavoie wrote:
It was possible in the old Dlink firmware to auto power up the unit after a power failure.

I believe that doing that was only possible on DNS-323-rev-C boards, do you have one?
What is the output of the commands:

cat /tmp/board
cat
/proc/driver/rtc
ls
-l /sys/class/rtc/rtc0/



if the output of '/proc/driver/rtc' contains alrm_time and alrm_date, and /sys/class/rtc/rtc0/wakealarm exists, than it might be possible to setup a wakeup alarm, e.g.,

/ # date -d 12:34 +%s # display 12:34 seconds after epoch, see "date --help" for further help
1530704040
/ # echo 0 > /sys/class/rtc/rtc0/wakealarm # clear current alarm
/ # echo 1530704040 > /sys/class/rtc/rtc0/wakealarm # setup new alarm
/ # cat /proc/driver/rtc # display RTC wakeup stored alarm. Notice I'm away 1 hour from UTC
...
alrm_time       : 11:34:00
alrm_date       : 2018-07-04

PS-I'm currently on vacations, don't expect prompt replies

Jean-Pierre Lavoie

unread,
Jul 3, 2018, 11:29:55 PM7/3/18
to Alt-F
That's interesting thanks for this info on older revision B of the DNS-323.  I have the revision C of the DNS-323 and there is supposed to be a way to turn it back on after a power failure.

Jean-Pierre Lavoie

unread,
Jul 3, 2018, 11:33:28 PM7/3/18
to Alt-F
I have a revision C of the DNS-323.  I don't really want to set a wakeup alarm unless I miss something you are seeing. 
After a power failure, I just want the DNS-323 come back to life when the power is restored.  I'll continue to dig.

João Cardoso

unread,
Jul 6, 2018, 6:54:53 PM7/6/18
to Alt-F


On Wednesday, 4 July 2018 04:33:28 UTC+1, Jean-Pierre Lavoie wrote:
I have a revision C of the DNS-323.  I don't really want to set a wakeup alarm unless I miss something you are seeing. 
After a power failure, I just want the DNS-323 come back to life when the power is restored.  I'll continue to dig.

As it seems that the automatic power up after unexpected power fail has not been reverse-engineered, my idea was to periodically setup a power up on RTC alarm (say, every ten or fifteen minutes); if the power fails, the box would be awakened up on the next RTC alarm. The RTC is battery powered.
Of course, RTC alarms need to be hardware supported (it is not on rev B boxes) and it needs to be able to wake up the box. The tests I posted would allow you to test that. Please report back your results.

bur...@gmail.com

unread,
Mar 2, 2019, 6:59:43 PM3/2/19
to al...@googlegroups.com
Hi,

I currently installed ALT-F on a DNS320L-A3 yesterday.
But before flashing ALT-F, I enabled Auto-Power up and Scheduled Powerup every 5AM using the original DLink firmware
After installing ALT-F and everything settled down, I went and did the power up test. I pulled the plug, inserted an HD, put back power and ALT-F power up.

I do not know if the scheduled powerup would work.
Will report back here in a few days.

ADD:
It is past 5AM No dice.
And here I thought settings from previous firmware would have done the magic... :(


Dan.

João Cardoso

unread,
Mar 3, 2019, 5:20:32 PM3/3/19
to Alt-F


On Saturday, 2 March 2019 23:59:43 UTC, burgaud wrote:
Hi,

I currently installed ALT-F on a DNS320L-A3 yesterday.
But before flashing ALT-F, I enabled Auto-Power up and Scheduled Powerup every 5AM using the original DLink firmware
After installing ALT-F and everything settled down, I went and did the power up test. I pulled the plug, inserted an HD, put back power and ALT-F power up.

I do not know if the scheduled powerup would work.
Will report back here in a few days.

ADD:
It is past 5AM No dice.
And here I thought settings from previous firmware would have done the magic... :(

Clever idea, pity it didn't work

You have to wait for Alt-F 1.1, if/when.

Spoiler:

[root@DNS-320L]# dns320l-daemon -x help
Available Commands:

DeviceReady, DeviceShutdown, ShutdownDaemon, EnablePowerRecovery, DisablePowerRecovery, GetP
owerRecoveryState, EnableWOL, DisableWOL, GetWOLState, SetFanStop, SetFanHalf, SetFanFull, P
owerLedOn, PowerLedOff, PowerLedBlink, ReadRtc, ReadAlarm, WriteAlarm, EnableAlarm, DisableA
larm, systohc, hctosys, GetTemperature, help, quit.

[root@DNS-320L]# dns320l-daemon -x ReadAlarm
Wakeup alarm disabled 

[root@DNS-320L]# dns320l-daemon -x WriteAlarm
ERR WriteAlarm: month day hour min | +N{d|m} (days|month) | now | disable

[root@DNS-320L]# dns320l-daemon -x WriteAlarm +3d
Wakeup alarm set to: 2019-03-06 22:18

[root@DNS-320L]# dns320l-daemon -x ReadAlarm
Wakeup alarm set to: 2019-03-06 22:18

bur...@gmail.com

unread,
Mar 7, 2019, 5:04:49 PM3/7/19
to Alt-F
Hi,

WOW!
Christmas is early this year!

Dan
Reply all
Reply to author
Forward
0 new messages