Tomato ND USB Mod

Discussion in 'Tomato Firmware' started by teddy_bear, Dec 17, 2008.

  1. cadteach

    cadteach Addicted to LI Member

    Second printer

    Could anyone give me a description of how to get the second instance of p910nd running to allow a second printer. I am assuming I have to edit a file somewhere, I can telnet into the router, but I'm not sure where the right file would be, nor what to edit to allow for a second printer to be seen/heard and printed to.


  2. teddy_bear

    teddy_bear Network Guru Member

    You can add this command to the "Init" script:
    p910nd -f /dev/usb/lp1 1
  3. cadteach

    cadteach Addicted to LI Member

    Adding to init script

    Where is the init script at? Can I use the section in the WebGUI under Administration>Scripts ? And if so, do I just add that one line (in other words, will it write that one command over the existing script or add it to whatever is already there?
  4. Rasky

    Rasky Addicted to LI Member

    Hi, I've just upgraded to v42 and I found a problem. I have a file committed to nvram (through "nvram setfile2nvram"), but it is not created on the filesystem at startup anymore.

    I can still see the file with "nvram show | grep FILE", but it is not on the filesystem. The entry in NVRAM looks like this:


    As you can guess, it's a ssh private key, so I won't post it :)

    I tried to extract the file with "nvram getfile" and it worked, so the nvram looks like. I think that, for some reason, the startup sequence changed and the file is not extracted.
  5. teddy_bear

    teddy_bear Network Guru Member

    Yes, you can add it to the Init script on Administration->Scripts page. You can add it, or replace what's already there - it's up to you ;)

    Yes, there's a problem in v42 with loading filed from nvram. Check out the page 178 of this thread and the following discussion. Will be fixed in the next build. By the way, there's a field in the GUI to specify authorized keys - what's the reason you're using setfile2nvram for that?
  6. Rasky

    Rasky Addicted to LI Member

    It's the other way round: I need to estabilish automated SSH connections from tomato to a remote server, so I need to store a private key in tomato. Since it's a basic functionality of my router, I want it within nvram and not on a mounted volume (which might not be available).

    BTW: I'm testing one the scripts floating around in this forum that checks in background for activity on a mounted disk and run scsi-stop+scsi-start if the disk is idel, to force a spin down and save power (and reduce ambient noise). It works very well for me. What about integrating it in your mod? It looks like a desiderable feature. My understanding is that it would require a whitelist of usb ids of working models (and maybe let people experiment with a warning if their HD is not in the whitelist).
  7. CsBubo

    CsBubo Addicted to LI Member

    NFS for Tomato

    Hi All!

    Finally managed to get the NFS running under Tomato.
    Two ways have been identified, user space NFS versus kernel space.
    First one achieved by compiling the optware nfs-server package.
    This seems ok, but dowside is no locking an performance.
    So got the trx from, flashed My router with it and have taken the binaries which were launched when enabled the NFS support.
    I had to replace some paths in those binaries, but finally managed to get those up and running. The speed is considerably better than FTP/SAMBA, even when NFS is mounted from windows via Services for UNIX. Transfer speeds are +~15-20% compairing to samba/ftp and CPU usage is dropped DRAMATICALLY. (25-40% with full speed nfs download)
    The files are available in the following link:

    Eithier You install the ipk file via ipkg(user space), or just create Your /etc/exports file, and execute the included space) script.

    Note: although I'm using this for days now, if You don't know what You're doing, DO NOT USE this. I'm taking no responsibility in case of data loss/corruption.

    Question remains to Teddy_Bear: seeing the performance of the kernel space NFS, do You consider including it into stock firmware? Even a separate executable pack, like the below one would be nice, so no hacking around is needed.
    Looking for Your answer!
  8. CsBubo

    CsBubo Addicted to LI Member

    NFS for Tomato

    Sorry double.
  9. cadteach

    cadteach Addicted to LI Member


    Thanks for your help. I've got them both running. I was otherwise going to have to purchase new printers w/ wireless capability.
  10. DAWOOD6283

    DAWOOD6283 Network Guru Member

    tomato usb + VPN on a Asus WL-520GU

    I loaded tomato-1.27-NDUSB-8742-vpn3.4.rar and did a NVRAM reset. Everything works fine but the VPN. I can not get the parameters to save. I have SgtPepperKSU Tomato build with VPN working just fine on a Linksys WRT54G and all works fine. I did copy and paste of the same setting to the Asus, but it will not save. It looks like the web interface is there but that is it. I found the openvpn files in "etc/openvpn" on the WRT54g, but can not find them on this build. Is there something I am missing and has anyone got this working on a WL-520UL

    Thanks for any Help!
  11. xppx99

    xppx99 Addicted to LI Member

    I have the same issue, I can't save the settings. However I managed to install openvpn from optware, loaded the tun.o, and managed to run openvpn.
  12. teddy_bear

    teddy_bear Network Guru Member

    Was it working for you in the previous build? What happens when you try to save settings? Does it give you any errors? If not, are the settings you just "saved" getting lost after reboot, or even after navigating to other GUI pages and then back to the VPN page?
  13. xppx99

    xppx99 Addicted to LI Member

    In my case, I had it working in the previous 41 version. When I setup the exact same settings and then hit save, I get:

    When I click OK in the error dialog, I get:

    And keeps going until I check the "prevent this page from creating aditional dialogs" checkbox.
  14. teddy_bear

    teddy_bear Network Guru Member

    Thanks! Looks like something got messed up in v42 with VPN - probably merge didn't go well. I'll look into it.
  15. TurtleFang

    TurtleFang Addicted to LI Member

  16. teddy_bear

    teddy_bear Network Guru Member

    Yep, noticed that... Just tested it here, and I can't reproduce it with the current sources in git. Could you let me know if you try to rebuild it (it's merged with the latest vpn3.5 from SgtPepper), and if problem is still there for you?
  17. TurtleFang

    TurtleFang Addicted to LI Member

    Hey Teddy_Bear,

    I just tired it out with fresh branch pull and the problem is no longer there. This is with tomato-RT branch and a RT-N16 router. Same should apply to other branches as the symptoms were the same on both platforms.

    The image I build from a branch pull on Friday the 29th (two days ago) did still have the problem. That pull didn't have the the incoming "Merge with vpngui 3.5" commit.

    So it appears to be fixed. The webpage didn't show the error and after starting the server via the gui, openvpn process shows up in "ps" output.

    I've not yet tested connectivity to the openvpn server as I'm away from the house at the moment and don't have the means to connect.

    Hope this helps,
  18. teddy_bear

    teddy_bear Network Guru Member

    Great, thanks for confirming it's working! I suppose the merge with VPN branch gone bad when I did it last time - but since the problem is fixed after re-merging I won't investigate it further now.
    The fix will be in the next build 43 (coming soon).
  19. ffbadkill

    ffbadkill LI Guru Member

    Does this mod support XFS filesystem??
  20. teddy_bear

    teddy_bear Network Guru Member

    There's no built-in support for XFS. There's no space left on 4MB flash for XFS modules, and it's a lot more demanding for hardware resources than other included filesystems...

    However, if you'd like to use it on your router, you can download the "extras" package (available from the main download location, links are in the 1st post) which includes xfs.o module. All you need to do is to copy it to your router, and load using modprobe command - and you'll be able to mount and use XFS partitions. Auto-mount may not work though (or maybe it will) - but at least you will be able to manually mount them.
  21. TurtleFang

    TurtleFang Addicted to LI Member

    Update: Got home and was able to test out connectivity on the setup. Using a windows XP netbook I was able to connect to the openvpn server via the wan side and pass traffic.
  22. Ruzzian

    Ruzzian Addicted to LI Member

    Is there anyone that has compiled a version of tomato that has all the wireless support for Wl500w and the latest version of Keith Moyer's VPN. Teddy's version would be fine if it had the latest VPN version.
  23. XEPOBO

    XEPOBO Addicted to LI Member

    Teddy Bear, finally got around to erasing NVRAM, installed latest VPN build, while restoring setting the following wireless settings bricked the router:

    Afterburner Auto
    AP Isolation Disable *
    Authent icat ion Type Auto *
    Basic Rate Default *
    Beacon Interval 100 (range: 1 - 65535; default: 100)
    CTS Protection Mode Disable *
    Regulatory Mode Off *
    Country / Region U.S. / Americas, FCC
    Bluetooth Coexistence Disable *
    Distance / ACK Timing 0 meters (range: 0 - 99999; 0 = use default)
    DTIM Interval 1 (range: 1 - 255; default: 1)
    Fragmentation Threshold 2346 (range: 256 - 2346; default: 2346)
    Frame Burst Enable
    Maximum Clients 20 (range: 1 - 255; default: 128)
    Multicast Rate 1 Mbps
    Preamble Long *
    RTS Threshold 2347 (range: 0 - 2347; default: 2347)
    Receive Antenna Auto *
    Transmit Antenna Auto *
    Transmit Power 56 mW (range: 1 - 251, actual max depends on Country selected; default: 42)
    Transmission Rate Auto *
    WMM Enable
    No ACK Enable
  24. XEPOBO

    XEPOBO Addicted to LI Member

    OK.. i think i figured it out.. I had both port forwarding and port triggering enabled for same port range.

    Port forward:
    ftp 21
    ftp passive 2022-2222

    port trigger
    trigger port 21 -> open 2022-2222

    Should be preventable via UI.
  25. idigg

    idigg Addicted to LI Member

    Hello fellas! Long time Tomato user here! My beloved Linksys WRT54G v2.2 died about a week ago, and I ordered an Asus WL-520GU since it can run Tomato or DD-WRT.

    I get it today, and actually stumbled upon this thread this morning. I was actually going to put DD-WRT onto the router since it supports USB, as the stock tomato firmware doesn't, but this firmware looks like it fits the bill.

    Is the standard firmware a pretty good start? Do I just use the asus flash utlity to flash the Tomato ND firmware? Seems pretty straightforward.
  26. Engineer

    Engineer Network Guru Member

    Actually, there is a mini version of DD-WRT that you have to flash first using the Asus restore utility. After you get DD-WRT mini on there, you can then flash to Tomato ND Standard (very good start) using the upgrade menu.

    The DD-WRT mini version is here.

    Try here

    Where I found this information

    Once flashed and running, you can then use DD-WRT's upgrade page to load Tomato. Might need to change the Tomato extension from .trx to .bin or visa-versa, I don't remember which one it was, lol.
  27. idigg

    idigg Addicted to LI Member

    I just got my WL-520GU up and running. What I did was download the standard Tomato ND firmware (teddy bear version). Unplugged router, held down the reset button, plugged in router and got it into "flash mode". I then used the Asus Firmware utility to upload the new Tomato firmware, router rebooted and wala.

    I didn't have to touch the dd-wrt firmware first, just a FYI. I think the Asus utility is just a TFTP client, which helped get the new firmware on the router.

    I did look at the stock Asus firmware for 3-4 minutes, what a mess :biggrin:
  28. Engineer

    Engineer Network Guru Member

    Thanks for the info. I'll pass it along the next time someone asks! :biggrin:
  29. jinx

    jinx Addicted to LI Member

    I do the same except I just TFTP the firmware directly to the router once its in recovery mode.
  30. esac

    esac Addicted to LI Member

    Hoping not to be pushy, but any idea when 43 is coming out. Hoping to use it with VPN.
  31. CincyPat

    CincyPat Guest


    I bought the Asus wl520 to set up as my home router and also so I could print from my work computer which is located on a different floor. I have downloaded and installed Tomato v1.27 and need to set up my printer. I have found many references to the Teddy Bear Mod, but can't figure out how to do it. I don't even have the ability to select NAS/USB when I log into my Tomato page. It's not even listed. What am I doing wrong?

    Any help would be greatly appreciated.
  32. Engineer

    Engineer Network Guru Member

    Did you install the Teddy Bear Mod (first post of this thread has the links to the various versions) or did you install plain vanilla 1.27 Tomato? Tomato doesn't support USB by default so you would need to load up on of Teddy Bear's to get it to work.
  33. phdeez

    phdeez Addicted to LI Member

    (The question was can we save the log file to an external usb drive).

    Is this still an appropriate command? I'd like to try and figure out why I see a massive speed hit on my 520gu, sometimes to the point the device is completely unresponsive when running transmission.

    Here's my setup:
    520gu with build 42 'extra' flashed-> 7 port powered usb hub -> 1gb USB flash drive with 512mb optware partition, 128mb of swapspace, 128mb for jffs space and 256mb for 'data'. I installed transmission via optware, and have the .config file in the data partition, along with cpulimit which I compiled (link).
    The USB harddrive is 250gb and formated as NTFS. Drive has a decent amount of data on it, however it is not full. I also have a USB Printer (Samsung ML-2510)- it works like a champ.

    FWIW (when I've been connected via ssh) it seems the external usb harddrive (which is where I store my torrents) 'disappears' from /tmp/mnt/<folder>. I perform a 'ps' and I do not see ntfs-3g listed in running commands. I try to unmount the drive from the tomato -> USB page and it says the device is busy, even though the drive is not present, and after I've killed the transmission-daemon process. If I leave the router in this state for more than a few minutes (ie: 2), the router stops responding entirely and the only way to recover is via a manual power cycle. I have the button on the back of the 520gu set for 'restart', but it does not respond.

    I compiled cpulimit so I could limit the ntfs-3g process. If I enable samba, or try to verify a torrent in transmission the cpu goes off the chart. According to 'top' ntfs-3g can exceed 70%, and I still only see ~600KB/s writing to the drive.

    Am I just expecting too much, or is there something else here messing me up?
  34. bmx888

    bmx888 Addicted to LI Member

    Hi, Teddy_bear,
    I just upgraded to Tomato Firmware v1.27.8742 ND USB.
    But somehow I can not see the chinese filename on the sharedrive again.
    I follow the direction before.
    1. copy the following files
    to share drive, under /Movie/cp936/.
    Partition 'MOVIE' vfat (476821 MB) is mounted on /tmp/mnt/MOVIE

    2, copy the code to the run before mount

    ln -s /mnt/MOVIE/cp936/codepage.936 /usr/share/codepage.936
    ln -s /mnt/MOVIE/cp936/unicode_map.936 /usr/share/unicode_map.936
    insmod /mnt/MOVIE/cp936/nls_cp936.o
    # the nls_gb2312 module is optional, and may not be needed
    insmod /mnt/MOVIE/cp936/nls_gb2312.o
    service samba restart

    3. Go to "USB and NAS -> File Sharing" page on the Web GUI, select
    "Unspecified" for the "Client Codepage", and ddd the following line to the
    "Samba Custom Configuration" box:

    client code page = 936

    Save the setting.

    Restart router and remount the drive.

    I use the Tomato Firmware v1.27.8742 ND USB No CIFS and Tomato Firmware v1.27.8742 ND USB and no luck see the chinese file name. The free mem is 400K with No CIFS version.
    I use Version: 1.25.8632 ND USB Std before the upgrade and the Free Memory is 964.00 KB (aprox. size that can be buffered completely in RAM)

    Do yo think it is because it is out of space and no codepage is loaded?

    how to run these codes below? Thanks a lot!

  35. teddy_bear

    teddy_bear Network Guru Member

    The free memory has nothing to do with it (BTW, check "Count cache memory as free memory" on the Administration->Debugging page to see the real amount of memory available for applications to use). Probably something else went wrong.
    The commands you quoted can be executed in the telnet/ssh session, or just use the "Tools->System" page in the GUI - these commands should help with troubleshooting.
    That was a typo, right? It should be in "after mount" script. You didn't put it into "before unmount" script, did you?
  36. bmx888

    bmx888 Addicted to LI Member

    YOU are right, I copied to after mount. my typo..
  37. bmx888

    bmx888 Addicted to LI Member

    I just try 1.27 standard,

    * Run lsmod. nls_cp936 shows up in the output.
    * Run cat /etc/smb.conf. "client code page = 936" is present in the [global] section, as well as "coding system = utf8" line.
    * Run ls -lFA /usr/share/ command. codepage.936 and unicode_map.936 show up in the output as valid symlinks.

    Still now chinese character show up in file name. But weird enough, last time I use 1.25 without those mod, the folder just does not show up.
    Right now, the folder shows up and truncate all double characters and leaves the single signs like "@2007". But you can not open the folder or file.
  38. bmx888

    bmx888 Addicted to LI Member

    Right now, free memory is over 3M including the cache.

    Current Version: 1.27.8742 ND USB Std
    Free Memory: 3,488.00 KB (aprox. size that can be buffered completely in RAM)

  39. teddy_bear

    teddy_bear Network Guru Member

    Don't know then. All looks ok. Anything in the system log?
    Since I don't have Chinese installed I can't test it myself, but as others non-Asian codepages work, I see no reason why 936 won't, especially if all files are there and module is loaded.
    Maybe someone else who's using Asian codepages with the last build can chime in.

    Possibly try to re-download the extra codepages archive in case files on your flash drive got corrupted. Maybe try to downgrade the firmware 1 build down (to v41) - to make sure it's not something specific with v42.

    The free memory should not be a problem - you have enough. But to verify this you can try to stop some other services - for example, try disabling FTP and UPnP if you have them running, and see if it makes any difference (doubt so - but worth to try).
  40. bmx888

    bmx888 Addicted to LI Member

    I just tried 1.25.8737 ND USB Ext. Works great. Will try 1.27 v 41 tomorrow.

  41. teddy_bear

    teddy_bear Network Guru Member

    By the way, is this a FAT-formatted drive? If so, can you post the mount command output when this drive is attached?
  42. bmx888

    bmx888 Addicted to LI Member

    it is fat32

    here is the result of mountain command in debug mode
    rootfs on / type rootfs (rw)
    /dev/root on / type squashfs (ro)
    none on /dev type devfs (rw)
    proc on /proc type proc (rw)
    tmpfs on /tmp type tmpfs (rw)
    usbdevfs on /proc/bus/usb type usbdevfs (rw)

  43. alexlau

    alexlau LI Guru Member

    Dear teddy_bear,

    Thank you again for the wonderful software. once again, do you recommend to flash the .42 based on Tomato 1.27 or .39 based on Tomato 1.25 on a ASUS WL-500gP Version 1?

    I understand from your previous post that you're working on a next release (.43?) based on Tomato 1.27... should I wait for that one?

  44. teddy_bear

    teddy_bear Network Guru Member

    The mount output you posted is without your drive being mounted...
    Anyway, I believe I know what the problem is - should be fixed in v43.

    Yes, I hope to release the v43 in a few days - so unless you have some big issues addressed in previous builds, you might just want to wait a little.
  45. wolfpaw

    wolfpaw Guest

    I've had Tomato on my WL-520GU since the day I received it about 6 months ago. I recently updated to 'v1.27.8742 ND USB Lite'. It has always worked great with one exception: USB printing to my HP P1006. USB, 2.0, printing, and bi-directional are enabled in Tomato. When I add the printer in WinXP using router address and port 9100, RAW, etc., it works perfectly until the next time I restart my PC. If I reboot the router or power cycle the printer, it still works fine so I don't think it has to do with the router/firmware settings or the printer. Any ideas why restarting the PC would cause the printing to stop working? Do I need a hotplug script? I don't know how to code that. My wife thinks I don't know what I'm doing (she's probably right) because this was supposed to allow her to print wirelessly from her laptop and it doesn't. Help!
  46. bmx888

    bmx888 Addicted to LI Member

    Teddy Bear, Thanks a lot for that.
    I mounted the drive and run "mount" in debug mode.
    Here is the result on 1.27.8741 ND USB Ext

    rootfs on / type rootfs (rw)
    /dev/root on / type squashfs (ro)
    none on /dev type devfs (rw)
    proc on /proc type proc (rw)
    tmpfs on /tmp type tmpfs (rw)
    usbdevfs on /proc/bus/usb type usbdevfs (rw)
    /dev/discs/disc0/part1 on /tmp/mnt/MOVIE type vfat (rw,noatime,nodev)

  47. bmx888

    bmx888 Addicted to LI Member

    Here is the result on 1.27.8742. It seems that the log is the same. Hope this is helpful for you.

    rootfs on / type rootfs (rw)
    /dev/root on / type squashfs (ro)
    none on /dev type devfs (rw)
    proc on /proc type proc (rw)
    tmpfs on /tmp type tmpfs (rw)
    usbdevfs on /proc/bus/usb type usbdevfs (rw)
    /dev/discs/disc0/part1 on /tmp/mnt/MOVIE type vfat (rw,noatime,nodev)

  48. teddy_bear

    teddy_bear Network Guru Member

    Does it work properly with v41 or not?
  49. bmx888

    bmx888 Addicted to LI Member

    It worked on 1.25.8739 and 1.27.8741.
    not on 1.27.8742.
    Hope it will work on 8743 in the next release.

    BTW, I have some connection issues with my 1.27.8741.
    I use standard setting + port forwarding for RDP/BT/VOIP. I use Moto SBG900 with firewall and wireless disabled.
    But it starts with great speed like 11M/0.7M on (comcast)
    But will stuck after 1 hour normal usage. Has to reboot again.
    Do you know anything I can debug the problem?

  50. Rasky

    Rasky Addicted to LI Member

    teddy_bear, with latest version, I have troubles copying files to samba shares. I'm mounting the samba shares through GNOME GFS (which happens by simply browsing the network and double-clicking on the share in nautilus). If I try to copy a file to it, the copy process failes because it says that there are 0 bytes available. This is confirmed by showing the properties of the share (again, 0 bytes availabel).

    It's not a read/write access problem because GNOME can actually write to the share through GFS (eg: creating a directory works); it's only the disk free query that reports 0 bytes, and thus file copying fails because nautilus checks the available space on the destination.

    Any idea what could be causing it?
  51. travanx

    travanx Network Guru Member

    I just installed this on a new Asus 520 and I can't believe how much easier this is to use than DD-WRT. Especially how the USB just works with my Samsung laser printer!!!! Thank you!
  52. Are there any plans to integrate SANE packages into the VPN/extras build? This will help a lot of people using MFP/AIO printer to fully utilize all functionality.

    Does anyone know how much space is needed to install sane packages? I wanted to flash the router with this package and hopefully including VPN.
  53. teddy_bear

    teddy_bear Network Guru Member

    Use blkid command.

    No, no plans to have it built-in. There's definitely no space for it on 4MB flash, and the Optware package is sufficient and not difficult to install.

    These nls_ modules have not been recompiled for a while - maybe they are not compatible with the libc used in last builds. I'll rebuild the extras package when I prepare the next build.
  54. Rasky

    Rasky Addicted to LI Member

    It happens for me on both WL500g and RT-N16.
  55. teddy_bear

    teddy_bear Network Guru Member

    Did it ever work with GNOME GFS in any previous build?
  56. Rasky

    Rasky Addicted to LI Member

  57. ray123

    ray123 LI Guru Member

    Teddy Bear,

    Just got back from our cruise (and extended overnight stays in Fort Lauderdale & Atlanta airports thanks to the weather), and finished up my current changes to V42:

    * Kludge to avoid a compiler bug.
    * Cosmetic fix to a syslog message.
    * For user scripts, execute them in sorted (alphabetic) order.
    * Fix so that syslog messages won't get lost during startup.
    * Fix for a disk-label that has special characters, especially space.
    * -- Strip them out.
    * -- The problem is that the disk-label (== directory name) is
    * -- used as a parameter to the mount command, so special chars
    * -- mess things up.

    Link to the patch:
  58. teddy_bear

    teddy_bear Network Guru Member

    Thank you Ray! Will test and apply for the next build.

    Hopefully the compiler bug will no longer be an issue since I switched to gcc 4.1.2 for userspace apps.

    The syslog issue has bugged me for a while, but it seems that neither your patch, nor my other attempt to work around it with a simple +0.5 sec extra delay, solves it completely - a few messages here and there are still getting lost sometimes. It appears that no matter how long you wait for a kernel messages burst to finish, the burst itself is a problem - if messages are coming too fast, the syslogd just doesn't read all of them from the socket... Anyway, it's a lot better now than it was, and the issue is purely cosmetic - so I'm satisfied with the solution we currently have...
  59. teddy_bear

    teddy_bear Network Guru Member

    Update - build 43

    Mostly bug fixes and software updates - no functional changes in this build.
    • Fixed: restoring files on start-up previously saved to nvram using "nvram setfile2nvram" command (broken in build 42).
    • Fixed: copying large files to FAT-formatted disks via Samba.
    • Fixed: display file names containing national characters in Samba FAT shares (was broken in build 42).
    • Fixed: auto-reconnect for wireless client modes (wet, sta).
    • Enabled WPA2 security for all modes, including WDS, wireless client and wireless ethernet bridge.
    • Replace spaces and special characters by underscores in mountpoint names when auto-mounting by label.
    • Allow enough time during shutdown to properly unmount (or remount as read-only) usb drives.
    • Added an extra route in case the default gateway is over the bridge.
    • Increased limits for number of entries allowed for wireless filter, static DHCP and access restrictions.
    • WME is set to "Auto" by default. For N-mode support to work properly, make sure it's set to "On" or "Auto".
    • Applied latest kernel patches from (2009-12-05).
    • Software updates: Linux kernel, ntfs-3g 2010.1.16 (in Extras edition), Dnsmasq 2.52, bridge-utils 1.0.6, pptp-client 1.7.1.
    • Busybox: minor fixes from trunk.
    • Upgraded toolchain to use gcc 4.1.2 for userspace applications (gcc 3.4.6 is still used to compile kernel).
    • VPN build is merged with the latest VPN mod vpn3.6 (based on OpenVPN 2.1.1) by SgtPepperKSU.
    • Cosmetics.
    Links to the firmware binaries and the git repository with sources are in the 1st post. The complete source code of this build can also be downloaded as a git snapshot in tar format.

    Known issues with this build:
    • Ext2/Ext3 support is broken - wait for a hotfix!
    USB+VPN combined build is also available - based on the SgtPepperKSU' last released vpn3.6 mod and "Extras" edition of the USB mod. The problem with missing nvram defaults for VPN should be resolved.

    I also recompiled all kernel modules available in "extras" and "samba_extra_codepages" archives to match the currently used libc version, so they should work fine now with the latest build. Re-download them if you experienced problems loading extra modules.
  60. Engineer

    Engineer Network Guru Member

    First, thanks again teddy....will be testing soon enough.

    Why, for the most part, is WPA2 disabled for almost every firmware out there for these type of operations (WDS, Ethernet bridge, etc)? Was it difficult to enable?

    For anyone else, is there additional overhead for WPA2 with AES vs WPA with AES?
  61. teddy_bear

    teddy_bear Network Guru Member

    Well, the older wireless driver used in vanilla Tomato doesn't support it.

    It was possible to enable WPA2 for client modes ever since I upgraded to the new driver in this mod, but it never occurred to me even look into it until I started experimenting with RT-N16 and noticed that it just works ;)...
  62. jnappert

    jnappert LI Guru Member

    Just upgraded - but 43 doesnt automount my 2 USB sticks. Did nvram clean but still no success. Downgraded to 42. Is there any workaround since squid-proxy is running on this drives, serving my neigbourhood.
  63. teddy_bear

    teddy_bear Network Guru Member

    No idea... And absolutely no information in your post to troubleshoot.
  64. rzerzuch

    rzerzuch Addicted to LI Member

    Hi. Sory my english.
    I have similar trouble as Jnappert. When I wont automount my disk USB, gets message "Failed to mount. Verify the device is plugged in, and try again."
    Printer on the same USB works.
  65. jnappert

    jnappert LI Guru Member

    Same message here. Device: ASUS WL500Gp v1.
  66. teddy_bear

    teddy_bear Network Guru Member

    Again - there's not enough info. I can't read your mind, and I don't have your router here to look at...

    How can anyone possibly help you based on your post, considering that I have no problems here mounting my drives?

    You need to provide the details, and if you aren't sure what's relevant, provide every possible bit of information - what edition you use (Std/Ext/etc), syslog, output of "lsusb", "cat /proc/partitions", "lsmod" and "ps" commands, what's your partition format, was it working properly with prev build, what you did to troubleshoot (i.e. manual mounting via "mount" command etc).....
  67. phdeez

    phdeez Addicted to LI Member

    teddy_bear: I'll also report similar problems on v43, but the same mounting script in v42 and v41 worked on init:

    1st, the script:
    sleep 10 && /bin/busybox swapon LABEL="USBSwap"
    sleep 5 && mount LABEL="Optware" /opt
    sleep 5 && mount LABEL="Shared" /jffs
    sleep 5 && mount LABEL="Data" /mnt 
    sleep 5 && mount -t vfat -o rw,noatime,nodev LABEL="TORRENT" /tmp/mnt/torrent
    sleep 5 && mount -t vfat -o rw,noatime,nodev LABEL="EXTERNAL" /tmp/mnt/external
    Swap Space shows up properly, but it will not mount the other 3 partitions from my flash drive (/opt /mnt /jffs), and since /mnt doesn't show up, it won't mount my other 2 external USB drives (external or torrent). USB Printer works. I can mount the external usb drives via the gui and they work. If I create the directories torrent and external in /tmp/mnt/ I can manually mount the partitions in CLI. I attempted to manually mount /opt, /mnt & /jffs with no luck at command line (command executes, but data does not show up at appropriate mount points - both via LABEL and partition). If I unmount USB Flash drive and attempt to remount it via the gui, it gives an error saying it's not available. If I /bin/busybox swapoff, and then try to mount via gui, it also errors. If I turn swap back on with busybox, the USB drive shows mounted, but I am still unable to mount the remaining ext2 partitions.

    2nd: The info you requested:
    Build? Tomato 1.27.8743 ND USB Ext
    Device? Asus 520gu
    syslog - see attached
    root@520gu:/# lsusb
    -sh: lsusb: not found
    root@520gu:/# cat /proc/partitions
    major minor  #blocks  name
       8     0  156290904 scsi/host0/bus0/target0/lun0/disc
       8     1  156288321 scsi/host0/bus0/target0/lun0/part1
       8    16    1020416 scsi/host1/bus0/target0/lun0/disc
       8    17     506016 scsi/host1/bus0/target0/lun0/part1
       8    18     136552 scsi/host1/bus0/target0/lun0/part2
       8    19     136552 scsi/host1/bus0/target0/lun0/part3
       8    20     240975 scsi/host1/bus0/target0/lun0/part4
       8    32  244198584 scsi/host2/bus0/target0/lun0/disc
       8    33  244196001 scsi/host2/bus0/target0/lun0/part1
    root@520gu:/# lsmod
        Tainted: P  
    ipt_web                 1472   1
    printer                12892   0
    ehci-hcd               28156   0 (unused)
    vfat                   11692   0
    fat                    37288   0 [vfat]
    jbd                    54856   0 (unused)
    usb-storage            35272   1
    sd_mod                 13572   2
    scsi_mod               72856   4 [usb-storage sd_mod]
    usbcore                78928   1 [printer ehci-hcd usb-storage]
    ip_nat_ftp              2928   0 (unused)
    ip_conntrack_ftp        4208   1
    ip_nat_rtsp             5616   0 (unused)
    ip_conntrack_rtsp       5304   1
    ip_nat_h323             2120   0 (unused)
    ip_conntrack_h323       2536   1
    tomato_ct               1168   0 (unused)
    wl                    897168   0 (unused)
    et                     28920   0 (unused)
    root@520gu:/# ps
        1 root      1044 S    /sbin/init noinitrd 
        2 root         0 SW   [keventd]
        3 root         0 SWN  [ksoftirqd_CPU0]
        4 root         0 SW   [kswapd]
        5 root         0 SW   [bdflush]
        6 root         0 SW   [kupdated]
        7 root         0 SW   [mtdblockd]
       26 root       992 S    buttons 
       28 root      1452 S    syslogd -L -s 50 
       30 root      1448 S    klogd 
       44 root         0 SW   [khubd]
       59 root       496 S    p9100d -b -f /dev/usb/lp0 0 
      100 root      1452 S    telnetd -p 23 
      104 root       936 S    dropbear -p 22 -s -a 
      110 root         0 SW   [usb-storage-0]
      111 root         0 SW   [scsi_eh_0]
      112 root      1460 S    crond 
      116 root       772 S    rstats 
      120 root      1084 S    httpd 
      126 root       852 S    vsftpd 
      130 nobody     680 S    dnsmasq 
      142 root         0 SW   [usb-storage-1]
      143 root         0 SW   [scsi_eh_1]
      185 root       664 S    miniupnpd -f /etc/upnp/config 
      233 root         0 SW   [usb-storage-2]
      234 root         0 SW   [scsi_eh_2]
      345 root      1460 S    udhcpc -i vlan1 -s dhcpc-event -H 520gu 
      399 root       988 S    dropbear -p 22 -s -a 
      404 root      1468 S    -sh 
      433 root      1456 R    ps 
    root@520gu:/# blkid
    /dev/scsi/host0/bus0/target0/lun0/part1: LABEL="TORRENT" UUID="13EE-105B"
    /dev/scsi/host1/bus0/target0/lun0/part1: LABEL="Optware" UUID="c96c8fbe-f9eb-4ccb-98a0-5fb829469342"
    /dev/scsi/host1/bus0/target0/lun0/part2: LABEL="USBSwap"
    /dev/scsi/host1/bus0/target0/lun0/part3: LABEL="Shared" UUID="f2aba699-8aa4-4a31-ae50-b603992052cb"
    /dev/scsi/host1/bus0/target0/lun0/part4: LABEL="Data" UUID="3d91acf3-6b4a-4e82-8d98-2ca92190c554"
    /dev/scsi/host2/bus0/target0/lun0/part1: LABEL="EXTERNAL" UUID="1A11-0A13"

    Attached Files:

  68. teddy_bear

    teddy_bear Network Guru Member

    Thanks for the logs!
    Apparently the ext2/ext3 modules aren't getting loaded... Will look into it.
  69. rzerzuch

    rzerzuch Addicted to LI Member

    OK. Device: ASUS WL500Gp v1. Disk 2.5 TOSHIBA Model: MK1637GSX supply your own. I have three partition
    'disc0_1' swap (101.94 MB)
    'disc0_2' ext2 (902.09 MB)
    'disc0_3' ext3 (148.07 GB)
    LOG when I plug the drive.
    Feb 17 00:51:02 unknown kernel: hub.c: new USB device 01:03.2-2, assigned address 8
    Feb 17 00:51:03 unknown user.warn kernel:   Vendor: TOSHIBA   Model: MK1637GSX         Rev:     
    Feb 17 00:51:03 unknown user.warn kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
    Feb 17 00:51:03 unknown user.warn kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
    Feb 17 00:51:03 unknown user.warn kernel: sda: Waiting for disc 0 to settle.
    Feb 17 00:51:03 unknown user.warn kernel: SCSI device sda: 312579695 512-byte hdwr sectors (160041 MB)
    Feb 17 00:51:03 unknown kernel:  /dev/scsi/host0/bus0/target0/lun0: p1 p2 p3
    Feb 17 00:51:03 unknown user.warn kernel: USB device reconnected to the SCSI subsystem. lun 0
    Feb 17 00:51:03 unknown user.debug kernel: WARNING: USB Mass Storage data integrity not assured, unmount it before unplugging
    Feb 17 00:51:03 unknown user.debug kernel: USB Mass Storage device found at 8. Host: 0
    Feb 17 00:51:03 unknown user.debug hotplug[1869]: Attached USB device /proc/bus/usb/001/008 [INTERFACE=8/6/80 PRODUCT=4fc/c15/f615]
    Feb 17 00:51:03 unknown user.warn kernel: FAT: bogus logical sector size 0
    Feb 17 00:51:03 unknown user.warn kernel: FAT: bogus logical sector size 0
    When When I plug pendrive the partition FAT32, it is mounted.
    Feb 17 00:43:46 unknown kernel: hub.c: new USB device 01:03.2-1, assigned address 6
    Feb 17 00:43:47 unknown user.warn kernel:   Vendor:           Model: silicon-power     Rev: PMAP
    Feb 17 00:43:47 unknown user.warn kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
    Feb 17 00:43:47 unknown user.warn kernel: Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
    Feb 17 00:43:47 unknown user.warn kernel: sda: Waiting for disc 0 to settle.
    Feb 17 00:43:49 unknown user.warn kernel: SCSI device sda: 15646720 512-byte hdwr sectors (8011 MB)
    Feb 17 00:43:49 unknown user.warn kernel: sda: Write Protect is off
    Feb 17 00:43:49 unknown kernel:  /dev/scsi/host1/bus0/target0/lun0: p1
    Feb 17 00:43:49 unknown user.warn kernel: USB device reconnected to the SCSI subsystem. lun 0
    Feb 17 00:43:49 unknown user.debug kernel: WARNING: USB Mass Storage data integrity not assured, unmount it before unplugging
    Feb 17 00:43:49 unknown user.debug kernel: USB Mass Storage device found at 6. Host: 1
    Feb 17 00:43:49 unknown user.debug hotplug[1743]: Attached USB device /proc/bus/usb/001/006 [INTERFACE=8/6/80 PRODUCT=13fe/3123/110]
    Feb 17 00:43:49 unknown user.warn kernel: MSDOS FS: IO charset utf8
    Feb 17 00:43:49 unknown user.warn kernel: MSDOS FS: Using codepage 936
    Feb 17 00:43:49 unknown user.warn kernel: FAT: freeing iocharset=utf8
    Feb 17 00:43:49 unknown hotplug[1743]: USB vfat fs at /dev/discs/disc0/part1 mounted on /tmp/mnt/PENDRIVE
  70. teddy_bear

    teddy_bear Network Guru Member

    rzerzuch & phdeez,

    Ok guys, thanks!
    Figured it out - it's a build issue. Now it's just a matter of time - how soon my computer will be able to rebuild the toolchain and the firmware images - before I release a hotfix.
  71. phdeez

    phdeez Addicted to LI Member

    Thanks for the quick turnaround teddy_bear!
  72. ray123

    ray123 LI Guru Member

    Bursts of syslog messages have always been a problem on Linux, even on real boxes. We had this issue at my (pre-retirement) job, too, and that was on a monster HP rackmounted Linux system. IIRC, you can get a buffer wraparound when syslogs spew out and syslogd/klogd fall behind. I'll look further into this after I dl v43.
  73. teddy_bear

    teddy_bear Network Guru Member

    Update - build 44

    Hotfix release for build 43.
    • Fixed: missing kernel symbol preventing ext2/ext3 modules from being loaded.
    Links to the firmware binaries and the git repository with sources are in the 1st post.

    USB+VPN combined build is also available - based on the SgtPepperKSU' last released vpn3.6 mod and "Extras" edition of the USB mod.
  74. phdeez

    phdeez Addicted to LI Member

    teddy_bear- thanks for the fix. I can confirm the partitions that failed to mount on v43 (ext2 for me) are working properly now!
  75. teddy_bear

    teddy_bear Network Guru Member

    Well, as this issue is only relevant for a small subset of users, I suggest you start a separate thread for it.
  76. trevorw

    trevorw LI Guru Member

    Hi guys,

    Just wanted to let you know that my upgrade (on two Asus WL-500gP) from build 40 to 44 was w/o hiccups. Thank you for another awesome build!
  77. jinx

    jinx Addicted to LI Member

    Running build 44 Extra on my Asus WL-520gU; so far, so good.
  78. occamsrazor

    occamsrazor Network Guru Member

    Hi TeddyBear, I haven't upgraded my WL-500GPv2 for a while, currently running Thors' all-in-one mod "Version 1.25.8515 RAF ND USB Thor MOD" which I've been very happy with, but this mod doesn't seem to have been updated in a while.
    I'm afraid I've lost track of what the main differences are between your mod vs Thors vs Victeks. Obviously Thor's has the SNMP + SDHC, neither of which I found I actually need, but I can't remember if yours has the Victek RAF additions or not.
    Basically I want something with with OpenVPN + USB (both musts) and then as much extra nice stuff as possible. Ideally I'd like OpenVPN + USB + PPTP server, but I don't think it exists yet. Thanks in advance...
  79. Dent

    Dent Network Guru Member

    Does anyone still have version 42 standard firmware file they could upload somewhere? It went by the name tomato-1.27-NDUSB-8742-Std.rar. I would really appreciate it. Thanks in advance.
  80. phdeez

    phdeez Addicted to LI Member

    It looks like they are all still posted @ mediafire: (look under 'rotten' for v42)
  81. galex111

    galex111 LI Guru Member

    Hi Teddy, thanks a lot for your great work !
    I'd like to continue discussion about mentioned my problem with insmod above. I installed your new 43/44 FW as well as updated code page1251 with insmod command - all is OK now. Unfortunately neither adding cp1251 nor any other actions didn't resolve my problem. But I would like to note that may be I described it not completely: in the reality I only have a problem with codepage on my Mac - when I connect to the router via SMB - in this case I can't see russian letters. But when I connect from Windows PC - that's OK, all russian letters are on their places, no problem. I read that Samba 2 doesn't supplort Unicode while Mac uses it. I installed Samba 3 onto the router/FLASH stick (btw, I use WL-500W with your mod) and received 100% positive results from every computer: from Mac and from PC (Win). I guess Samba 3 consumes more resources from the router but it seems to me it's just a single way for me (or may be I need to make change code page/character set to CP866 or CP1251 settings of Mac os x on my computer but ... I have no experience of it as well as I also use Chinese language so I'm afraid it will not allow me to use it). So my question is: is it Samba 3 is a single way to resolve my problem or may be you could offer any special tricks for me ... and for the other guy who asked you many times about 936 code page ... ?
  82. aiwlove

    aiwlove Addicted to LI Member

    Hi, Galex111
    I trie to install Samba3 with Lite(V44) version but it didn't work.
    Could you explain how to install samba3?

    What i did was
    1. installed "Lite(v44)" version.
    2. typed "/opt/bin/ipkg-opt install samba"
    typed "/opt/bin/ipkg-opt install samba3-swat"
    Both of them installed without any problem.
    3. typed "/opt/etc/init.d/S10xinetd start" => nothing happened.
    typed "/opt/etc/init.d/S08samba start"=> nothing happened.

  83. JimDandy

    JimDandy Guest

    Darn, I was really hoping I could try out this firmware. I'm just confirming it doesn't work in the WL-500GX.
  84. andot

    andot Addicted to LI Member

    @ teddy_bear
    thank a lot for this mod.
    I have a question, how to automount hfsplus filesystems like ext2/ext3, ntfs and fat.
    I try to copy hfsplus.o from extras.tar.gz to /jffs/kernel/hfsplus.o
    and add
    insmod /jffs/kernel/hfsplus.o
    into Init script.
    but the hfsplus volumes in my usb storage can't automount. and the "mount" button in "USB and NAS"->"USB Support"->"Attached Devices" also can't mount the hfsplus volumes.

    how can I do? thank you!
  85. teddy_bear

    teddy_bear Network Guru Member

    Automount will not work for extra filesystems.
    Can you mount your drive manually via "mount" command?
    Have you checked that the module is actually getting loaded (present in the output of "lsmod" command)?
  86. ray123

    ray123 LI Guru Member

    Automount only supports these partition types: SWAP2, ext2, ext3, ntfs, fat & vfat.

    For other types, you have to do it all yourself:
    1) mkdir the mountpoint directory (like "mkdir /tmp/mnt/whatever")
    2) make sure it works by the command "mount ", verify that it gets mounted and you can access it. Or any other mount command that will work. I don't think mount by label will work, because busybox only checks the same types as above.
    3) You'll need to write a 'hotplug script" that has an appropriate mount command.

    Since you can't mount by label, and since the device-id changes each time you plug/unplug a USB device, you'll have to somehow figure out which device/partition is the right one. It's doable, but you have a lot of experimentation to try.
  87. andot

    andot Addicted to LI Member

    Yes, I can.

    Yes, it loaded.

    I expect it will support in the next release. I think it's cool:biggrin:
  88. phil

    phil Addicted to LI Member


    Much thanks to Teddy Bear and everyone who has helped with this project. I have just spent the last few days reading through many of these posts, and I can really appreciate the amount of work that has gone in to this.

    I have a WL-500gPv2 running build 44 and it is GREAT. The problem I have is wlan led is always on, even when the wireless is off. I wanted to use the SES/AOSS button to Toggle Wireless, but with the led always on I do not know whether the wireless is on or off. The led worked correctly with the original Asus firmware. Any suggestions?

    Thanks and keep up the great work.
  89. teddy_bear

    teddy_bear Network Guru Member

    I was not aware of such issue. Can anyone else confirm this?
    Also, please post the output of "nvram find gpio" command.
  90. ghostknife

    ghostknife Addicted to LI Member

    I've never used it but testing on mine (which is still running v42) it does the same thing, wireless toggles but the 'AIR' light stays on regardless of how many times I press the button, so yeah it's pretty hard to tell if it's working if you want to use that.

  91. teddy_bear

    teddy_bear Network Guru Member

    Try to change it:
    nvram set wl0gpio1=0x88
    "nvram commit" and reboot might be needed for the setting to take effect.
  92. ghostknife

    ghostknife Addicted to LI Member

    Yep that works, 'AIR' LED goes on/off with button press.
  93. ghostknife

    ghostknife Addicted to LI Member

    Haven't been here in a while but just a FYI, regarding the WDS (WPA/AES) connection problem I posted about a few weeks ago.

    I had no end of trouble trying to connect a second Tomato router with WDS with any security, with no security it was fine, drove me nuts and I went round in circles for a while until I got it working...eventually. Stupidly in the end all it was that caused the problem was that I had the second router wireless mode set to 'Auto' (First was also Auto) and when I set the second to 'G' only everything went fine, WDS conencted with WPA/AES

    Damn technology :)
  94. ghostknife

    ghostknife Addicted to LI Member

    Wouldn't let me post and kept having 'server error' , now it triple posts!

    Damn technology :)
  95. ghostknife

    ghostknife Addicted to LI Member

  96. phil

    phil Addicted to LI Member

    Thanks, works like a charm! I owe you one. I have only been up and running for 1 week, but it has been rock solid. Install was a breeze. Asus firmware had too many limitations. I switch to Tomato to get MAC filtering for wan. I have a 160GB HD on the USB and it works great. I have not tried printing yet. Keep up the great work.
  97. koolkid1935

    koolkid1935 Addicted to LI Member

    Worked for me too - WL500gP-V2. Thanks Teddy_Bear for such a great build, loving it so far.
  98. Rasky

    Rasky Addicted to LI Member

    Teddy_Bear, looks like the shipped mkfs.ext3 has problems with 1TB disks. It hangs the router at least with a disk I have. Using optware's updated mkfs.ext3 there is no problem. You might want to search for some patches to backport to fix this.
  99. teddy_bear

    teddy_bear Network Guru Member

    Well, that's not technically a bug...
    The included e2fs tools are part of the old and deprecated implementation in Busybox. They are far from being perfect - but still better than nothing for many. The new official e2fsprogs are completely different, so it's not possible to port a thing from them back into the bb code. Also, it's not practical to use the new e2fsprogs since the size is huge.

    I see in Busybox 1.16 they started a new limited implementation of mkfs.ext2/3 - but it's still very limited even compare to what we have now. I was waiting to see if they are going to expand it, but it's not happening so far. This is still an option which I'm considering though...
  100. genjuro

    genjuro Addicted to LI Member

    First of all...Thank you teddy_bear for your great work with this mod, its really good :), i just have a question, does this mod supports Atheros chipsets mini-pci cards, i say this because i have a Asus Wl-500GP V1 with your Extra Mod, but my router is from January 2007, and these series have a small problem in the wlcard, i have corrected the problem by soldering the right component, and it was work well for about a year now, but some weeks ago, the wireless signal decreased a lot, i got good coverage but the quality of the signal is always 24-26, as i can see in the "Device List", the noise floor -79 dBm, and i'm planning to change the wlcard for another one, i researched a lot, but i couldn't find nothing concrete about using another wlcard in my router, and which one to use...well... i hope some one can give me a hint :)

    Thank you in advance [[]]
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice