Friday, December 11, 2009

DD-WRT schedule reboot not working

I use my Airlink 101 AR670W router as an access point with DD-WRT v24-sp2 build 13069.Because there are two many wireless networks in my neighborhood, I'd like it to scan and pick a least crowded channel for my SSID every day. So I enabled schedule reboot in Administration->Keep alive at a fixed time every day. But it didn't work since the uptime kept accumulating and the syslog didn't show signs of reboot.

I noticed on its router status page current time was always blank.I had enabled its built-in NTP client in page Setup->Basic setup->Time settings after entering the correct time zone and the IP address of the NTP server and thought this would update the system time correctly. But it didn't. I then logged into the router by SSH/telnet with the same admin user of the web interface and did the following checks and/or fixes.
  1. cat /etc/cron.d/check_schedules
    30 19 * * * root /sbin/reboot
  2. ps | grep cron
     1007 root       976 S    cron

  3. Typed the date command. To my surprise, it shows a date in year 1970. I then manually set the date and time by date 121122142009 (date MMDDhhmmYYYY). Although it shows the resulting time as UTC, it's actually the right time for my time zone and appeared as current time on the router status page 
  4. Ping the ntp server IP. I got no response. I found I had forgot to set the default gateway, so I set the right gateway IP at page Setup->Basic setup->Network setup and ping the ntp server again. Now there comes reponse.
One day after I've done the above, I found the schedule reboot started working and uptime was counting correctly. As a result, my wireless channel was updated to offer better signal quality.

1 comment:

Josefina said...
This comment has been removed by a blog administrator.