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.

Sunday, December 6, 2009

Uploading windows printer drivers to Samba

  1. Click Start->Run.  In the Open field, type \\%sambaserver% where %sambaserver% is the actual Samba server name.  i.e. \\myserver Click OK
  2. Find and double click on Printers and Faxes.
  3. Right-click on the printer name that's relevant and select the Properties entry. This opens a dialog box that indicates that The printer driver is not installed on this computer. Some printer properties will not be accessible unless you install the printer driver. Do you want to install the driver now?  It is IMPORTANT at this point you ANSWER NO.
  4. The printer properties panel for the printer on the server is displayed. Click the Advanced tab. Note that the box labeled Driver is empty. Click the New Driver button that is next to the Driver box. This launches the Add Printer Wizard.
  5. The Add Printer Driver Wizard on Pier panel is now presented. Click Next to continue. Select the printer manufacturer from the left panel.  In the right panel, select the printer. Click Next, and then Finish to commence driver upload. A progress bar appears and instructs you as each file is being uploaded and that it is being directed at the network server \\myserver\print$\W32X86. If the driver upload fails, verify that the W32X86 folder exists.  If it does not exist, create it and then try adding the printer drivers again.
I found the method on this web link.