Tomato ND USB Mod

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

  1. mememe2345

    mememe2345 Addicted to LI Member

    Thanks Teddy Bear. Compared the firmware I found in my Ubuntu with the one you pointed to, they are exactly the same. It works right now with the script after found out the device ID. I did not bother to change jffs folder from read only, just copied the firmware to tmp folder and cat it to printer. Thanks again and now my router works exactly the way I want with printer and storage sharing both work like a charm.
  2. trevorw

    trevorw LI Guru Member

    Hi TB,
    I've reproduced the test w/o the hdd, by just using USB sticks. I've used 3 sticks though you can reproduce it w/ only two.
    1. insert hub.
    2. insert 2 sticks - they show nicely in the UI
    3. browse the sticks through Samba, potentially copy some files over
    4. unplug a stick and mount it into another slot. For me the process takes around 1-2 seconds. The UI picks up the changes but at this point the logs get flooded
    Note that I'm using a refresh of 3 seconds in the UI so this is normal.
    I find it interesting that I can see how the device disappears from the UI and comes back again, this time not mounted automatically.
    5. Do the same thing w/ another (3rd) stick. The same thing occurs. Even though at this point there are 2 ghost sticks, the first stick is not affected.
    6. unplugged the entire hub and everything comes back to normal from the UI perspective. To complete the procedure, log in and do a:
    and both ghost1 and ghost2 are umounted.

    I think as you pointed out a process keeps reading to the sticks keeping the kernel busy. In my case I'm pretty sure it's the samba process that locks some folders during browsing.

  3. teddy_bear

    teddy_bear Network Guru Member

    Yes, it must be Samba. It is restarted when you unmount the drive from the UI so to not keep it busy, but I assumed there's no need to restart it if you already unplugged the drive - in this case it only reloads the configuration. Apparently that's wrong - I'll change it to restart Samba prior to any unmounts.

    Of course, it won't help if you have some other applications accessing the drive - but if you install and run additional software, you should know that you may have to take care of such things.
  4. Davka

    Davka LI Guru Member

    I found a bug. Sometimes cron is falling into a loop or sth and it takes a lot of RAM and kernel is killing other processes (dns most often).
    My scheduled job is ping ... >/tmp/ping.txt for every 10 minutes.

    I never had such a problem with Victek's or Jon's Tomato 1.23.

    Unfortunately I've lost the log file from this error :)

    EDIT: This could be caused by some CPU instability. My WRT54 was running fine at 216MHz for a long time but now my problems stop after downclocking to 200MHz :redface:
  5. teddy_bear

    teddy_bear Network Guru Member

    Not enough info...
  6. andrewe77

    andrewe77 Addicted to LI Member

    I have a USB hub with two printers attached and I'm trying to figure out how to start another instance of of p910nd.

    I put this in my INIT script but didnt' seem to work.

    /jffs/usr/sbin/p910nd -b -f /dev/usb/lp1 1

    Could someone please help?
  7. teddy_bear

    teddy_bear Network Guru Member

    Why jffs??
    Try p910nd -b -f /dev/usb/lp1 1.

    After starting the server, verify that it actually listens on port 9101 by executing
    netstat -an
    Remember to configure your clients accordingly - to use port 9101 for the second printer.

    I have not tried to connect more than 1 printer myself though - but hopefully it will work.
  8. teddy_bear

    teddy_bear Network Guru Member

    Update - build 22.

    • More improvments to USB hotplugging code (thanks to ray123' patches).
    • Cosmetic syslog fix to avoid splitting log messages.
    • Eliminated system log flooding when refreshing list of attached USB devices from Web GUI if there're cardreader(s) attached with empty slots.
    • Increased amount of available JFFS space by ~60KB in Standard, Lite and No-CIFS builds.
    • Minor bug fixes.
    Again, no functional changes in this update - only internal improvements that supposedly should make working with USB storage more reliable.

    Hopefully the problem trevorw described above is also fixed. I can't reproduce it now, but it's still possible that something is different between our environments, and the problem lies somwhere else.

    Links to the firmware binaries and the git repository with sources are in the 1st post.

    Please note that this build has a serious bug. Please use the next build v23.
  9. andrewe77

    andrewe77 Addicted to LI Member

    Thanks for the help. I have my laser printer on 9100 and my hp inkjet on 9101. The laser printer prints the test page fine. But, my inkjet stops about 3/4 of the way through, starts blinking its power light and there is Error in the print manager. Also, only one of the printers shows up in the router USB configuration page. Any more suggestions?
  10. nvtweak

    nvtweak LI Guru Member

    Hey TB, I just compiled this and it is up and running fine. Thanks and awesome work to everyone involved! :)
  11. teddy_bear

    teddy_bear Network Guru Member

    There's an issue with the UI - it can only display one printer now (EDIT: fixed, the fix will be in the next build). But that should have no effect on the functionality.

    Does your inkjet work fine when it's the only printer connected, using lp0 and port 9100? If it doesn't work no matter if it's connected alone, or with the other printer, then it's probably not supported by the existing driver...
  12. freddyspam

    freddyspam Addicted to LI Member

    The latest update broke my swap:

    user.warn kernel: Unable to find swap-space signature

    Going back to v21 fixes it.

    I start the swap from my Run after mounting script:
    swapon /dev/discs/disc0/part3

    Under attached devices I get:

    Partition 'Fat_Part' vfat is mounted on /tmp/mnt/Fat_Part
    Partition 'Linux-Part' ext3 is mounted on /tmp/mnt/Linux-Part
    Partition 'Linux-Part' is not mounted

    The third one should be the swap.
  13. teddy_bear

    teddy_bear Network Guru Member

    Hmm... I've just tested with v.22, and swap worked just fine:
    router kernel: Adding Swap: 4440712k swap-space (priority -1)
                  total         used         free       shared      buffers
      Mem:        14444        13980          464            0          728
     Swap:      4440712         1800      4438912
    Total:      4455156        15780      4439376
    Not sure why it's not working for you...
  14. freddyspam

    freddyspam Addicted to LI Member

    Hmmm, where do you get the information that populates the attached devices table? It is listing the name of my second partition in the place of the third partition (the swap). In v21 it says:

    Partition 'Fat_Part' vfat is mounted on /tmp/mnt/Fat_Part
    Partition 'Linux-Part' ext3 is mounted on /tmp/mnt/Linux-Part
    Partition 'disc0_3' is not mounted

    While in v22 it says:

    Partition 'Fat_Part' vfat is mounted on /tmp/mnt/Fat_Part
    Partition 'Linux-Part' ext3 is mounted on /tmp/mnt/Linux-Part
    Partition 'Linux-Part' is not mounted

    I think for some reason, it is pointing to my second partition when I run "swapon /dev/discs/disc0/part3"
  15. teddy_bear

    teddy_bear Network Guru Member

    I noticed it... But I could not reproduce that either - it all works just fine here. Not sure what could be different between our environment and setup...
    Is this drive an HDD or a flash drive? Have you partitioned it on the router, or on another Linux box?
  16. freddyspam

    freddyspam Addicted to LI Member

    It is a harddrive. I originally partitioned it on a windows machine using acronis, but after this happened, I tried deleted the swap partition and used the router to recreate it. That didn't change the behavior. This occurs on a clean install of v22, but not on a clean install of v21. I was actually happy with v21 so I think I'll stick with it for now.
  17. ray123

    ray123 LI Guru Member

    Assuming that TB incorporated my last fix into V22 (I haven't looked at it yet), this is a bit weird. V21 used a hack to the mount command in busybox to get the actual disk labels. My latest used the busybox code directly. The result should be the same. All that changed was the method of getting the label by Tomato's usb hotplug code. Try enabling "Enable cprintf output to /tmp/cprintf" and look at that file. You should see messages about "mount" and "swapon" commands. (Web interface, Administration/Debugging/3rd box.)

    You can see all the disk labels by the command "mount LABEL= anything" (space after the = sign).

    Probably what's going wrong is ordering & timing, and the exact command you use. If you followed the discussions between me & TB on the timing issues, you'll see my concerns. It's all too easy to encounter timing problems with USB drives. If you issue a command too soon, it's not gonna work right.

    The recommended method is to put the swap line in /etc/fstab, and use the label of the swap partition. Example:
    "LABEL=swap1 none swap sw"
    And then activate the swapfile with "swapon -a". Just like a desktop Linux system.
    IIRC, v21 & v22 automatically invoke "swapon -a" at the appropriate time when a USB drive is either plugged in or at bootup. Everything *should* work just fine.
  18. freddyspam

    freddyspam Addicted to LI Member

    This makes a lot of sense. I started to change the position of the drive on my usb hub and the behavior went away...and then came back.

    I'll try your suggestions and get back to you if I still have issues. Thanks
  19. nvtweak

    nvtweak LI Guru Member

    teddy does your wireless TX power adjustment work? It doesn't seem to work on my WHR-G125.

    I see this problem in original Tomato too so don't think it is a problem with your build. If anything, the new driver in USB version has made my signal a little better. But it still doesn't compare to the strength that I see with dd-wrt.

    Something strange going on here, and I'm hoping you can provide some insight.

  20. teddy_bear

    teddy_bear Network Guru Member

    The method of using fstab and labels that ray123 suggested is certainly a way to go. The swapon command as you use it will not work if kernel assigns different host number to your drive after a reboot. However, it doesn't explain why the partition name was displayed incorrectly in the GUI.
    I've been doing some tests last night, and indeed ran into a couple of similar issues.
    First, the mkswap did not always work. In my tests, it worked 100% on a last partition of the drive, and was hit or miss on other partitions.
    Second, when using drives with several partitions (3 or more), I experienced a few non-permanent lock-ups (they got self-resolved after about 3 mins).
    That all doesn't make much sense to me. I don't see any obvious flaws in the code that can cause it, but it looks like reading from procfs files (/proc/scsi/scsi or /proc/partitions etc) while kernel is writing to these files can make scsi/usb subsystem to go wild - I'll do more research on that.

    Honestly, I've never cared enough for Tx power to pay attention - whatever the signal strength Tomato provides is good enough for me. In fact, with dd-wrt I had it set to 25. I saw your other thread about this... Sorry I can't help you now, but it'd be interesting to see if there's a solution... If somebody finds it, I'll make sure to implement it in my mod ;) until Jon fix the official Tomato.
  21. ray123

    ray123 LI Guru Member

    With USB drives, it's not a good idea to depend on any kind of kernel-assigned host/drive number. The kernel assigns those dynamically, depending on the order it recognises them in, the order it deigns to process them in, the locking order of internal kernel locks, the phase of the moon, and how you hold your mouth. It is usually the same order from a clean bootup with no cabling changes, but nothing is guaranteed. That's why I thought that mount-by-label was vital to Tomato.

    Yup. No bugs in Tomato (probably). What there is, is a kernel bug. Finding it will be a bitch. I have it on my todo list-----but way down---after jffs improvements and webcam support. To do it, I'm planning on building the kernel and Tomato's USB code on a PC, and using the PC console & kernel debug facilities. This is not something that can be easily done on router hardware.

    BTW, the kernel doesn't "write to these files". The /proc files are a window into the kernel. The contents are generated on-the-fly as you read them. That's why the sizes of the /proc files always display as zero.
  22. teddy_bear

    teddy_bear Network Guru Member

    I know it doesn't actually "write" procfs files, but I'm not sure how exactly it works internally - I suppose it just calls a function that writes into an output buffer. "While the content is changing" then... Or whatever the proper way to name it. What happens is if you read from, for example, /proc/partitions while partition list is changing, or from /proc/bus/usb/devices when devices are added or removed, the kernel may lock up. It's easily reproducible by running "cat /proc/<file_name>" in a loop while plugging and unplugging devices. In case of /proc/partitions I can only reproduce the problem if there are drives with multiple partitions plugged in.
    Is there a "more proper" way of reading from procfs files?

    I'm more and more leaning towards upgrading the whole kernel to 2.4.37 - even though it still has many issues, a lot of bugs were fixed in later releases of 2.4 kernel, and I'm getting tired of searching for and porting some of the fixes back to 2.4.20...
  23. pandora

    pandora Addicted to LI Member

    Thank you so much

    I want to thank you so much for releasing this firmware. It has been very helpful to me. My old WRTSL54GS had Thibor on it, but you have helped me move it to the Tomato generation of firmware. That is quite a feat. Two thumbs up for you!

    If you don't mind a question ... I'm trying to save my bandwidth log to my flash drive. The flash drive is a Kingston, and the volume label is KINGSTON. It seems to be mounted as /tmp/mnt/KINGSTON. I want to save my bandwidth monitoring history to my flash drive.

    I've tried /tmp/mnt/KINGSTON/history/ and it doesn't seem to save the history on my flash drive.

    Would you mind telling me how to save my bandwidth history to the flash drive.

    Thank you very much.
  24. freddyspam

    freddyspam Addicted to LI Member


    I tried using fstab but it still gave me the same error. I think it was still trying to use the second partition instead of the third. Telnet'ing into the router and trying to manually swapon the correct partition would give the same error. Finally, I "reorganized" the drive and placed the swap as the first partition, and that seemed to make the labeling issue go away. I'm sure it was a combination of factors that caused this to occur, so it might not be worth debugging.


    I have two questions somewhat unrelated to my previous problem.

    I've had to reboot my router a few time by force. This has caused some errors on my drive even though I'm using ext3. I simply hooked up my drive to a linux box and ran e2fsck to fix it, but is there an easier way to have periodic checks while still attached to the router? A way to check only a small portion of the drive at a time maybe? I tried running e2fsck on the router, but with a 300bg drive, it took hours, and of course, without a swap, that wouldn't even be possible.

    Secondly, I've noticed that the transfer rates are limited to usb 1.1 rates (which is probably why e2fsck takes so long). I've read in other forums (which I can't find at the moment) that the hardware (on the asus 520gu) is actually 1.1. So is it the processor/flash limiting the transfer rate or is it actually just usb 1.1?
  25. moviecut

    moviecut Addicted to LI Member

    hi teddy_bear!

    can you send me the link too? or is the compatibility already given in the latest release? i have a wl500g deluxe and want to test you tomate mod! whould be really great to see it running on my little router! thank you very much!

  26. teddy_bear

    teddy_bear Network Guru Member

    Unfortunately, that build did not work. The easy "blind" approach (porting code from other firmwares) did not work out, and without the router on hands I can't do much more...

    The USB transfer rate depends on many different factors. The info you found elsewhere is correct - wl-520gu hardware is faster than 1.1 bit it's not "true" usb 2.0. I'm getting about 3 MB/sec rates on 520gu.
    As for running e2fsck, I don't think there's a way to check a portion of a partition. It works ok for 1-16GB flash drives on the router, but for large drives you probably need to do it on a computer...

    Did you make sure "history" folder exists on your Kingston flash drive? If yes, I don't know what's wrong - I'll try it when I get a chance.
  27. nvtweak

    nvtweak LI Guru Member

    thanks TB for your response.

    I figured out the problem. wl country code was set to "JP". I think Jon did this to fix the upper wireless channels 12-14, but it's no good for me. I am going to patch the init.c and set my country code as "US" instead (in Tomato 1.19 it was "ALL", maybe I'll try that too)
  28. moviecut

    moviecut Addicted to LI Member

    thank you for the fast reply! i tested it yesterday, but it dont work as you said (didnt read your answer before because i was so excited in running tomato ;). i went back to openwrt now. anyway, great support here!:thumbup:
  29. pandora

    pandora Addicted to LI Member

    You are correct, the folder didn't exist. I assumed it would be created. My bad.

    Currently the only significant problem I'm having with the firmware is hangs when moving large files. I'm using Samba and my 8GB USB stick attached as a network drive in FAT format. When I move a 580MB file (3DMark06_v110_oct07_installer.exe) the router times out, and the file is not correctly moved.

    I'm Windows based, and would have difficulty reading a Linux format drive. :( Is there a known problem with large files to FAT drives? Is there a fix in the works?


    BTW, kudos on making such a fantastic firmware. I'm running it on a WRTSL54GS and it is just wonderful.
  30. me2az

    me2az Addicted to LI Member

    Any chance to add a partitions size in the gui (Attached Devices)?
  31. teddy_bear

    teddy_bear Network Guru Member

    A really bad bug was introduced in the last v22 build.
    So far only one person complained about issues caused by this bug. It may not be affecting you at all - depending on what features you're using.

    However, here's the list of what's broken in v22:
    - when using multi-partitioned drives, mount may incorrectly mount/unmount wrong partitions, mounting by label or UUID may not work sometimes, "mount -a" command may generate an error;
    - mke2fs (in "Extras" build) may not be able to format a partition, e2fsck may work incorrectly;
    - mkswap may not work for some partitions;
    - incorrect partition labels and filesystem types may be displayed in the GUI.

    I will release an update fixing this as soon as I finish testing it - probably tomorrow. Until then you can downgrade to v21 that did not have this problem, or just continue using v22 if you have not experienced any issues yet - but I would recommend not to use mke2fs and e2fsck in this build.
  32. pandora

    pandora Addicted to LI Member

    Do you know if the update can fix the problem of Samba hanging when transferring large files to a FAT flash? I'd like to copy some large folders to a FAT drive, but every time it starts to move any single large file the network drive times out. :(
  33. teddy_bear

    teddy_bear Network Guru Member

    No, it won't be fixed. Please see the second half of this post for the explanation why, and for possible workarounds.
  34. The_Unknown

    The_Unknown Network Guru Member


    I'm having some memory problems with this firmware.

    I have an Asus WL-500GP v2 router, with 32MB memory. After some hours running I get only 2% - 3% (average) available memory. I notice that the network becomes a little sluggish as soon as the available memory decreases to these levels. CPU Load is low as usual.

    I'm running Samba and FTP server (therefore with USB enabled), QOS is disabled.

    With Tomato vanilla firmware I usually get 17 to 19 MB free memory all the time. When changing/upgrading firmwares I always erase the nvram before and after the process.

    What may be the cause of this memory "leakage"?
  35. teddy_bear

    teddy_bear Network Guru Member

    I'm running it on 16MB RAM Asus, with Samba, FTP, Asterisk and QoS, and did not notice any "leakage" :). Granted, USB and additional applications will consume more memory and resources. Depending on your actual network usage, it may or may not cause some slow downs - the router still has limited resources, and is not a full-blown Linux box. However, for most home users with a few clients the difference should not be noticeable.

    Also this memory is not always "used" by these applications. Most of the time it's "cached", and as such can be given to other applications on demand. You can try to check "Show cached memory as free memory" box on "Debugging" page - then you'll see how much memory is actually available when needed.
  36. ray123

    ray123 LI Guru Member

    Are you pushing the file from your big computer to the router? Or pulling it (command from the router, "cp /cifs1/bigfile /mnt/flashdrive")?

    I can well believe that pushing may be a problem--Samba can easily shove packets into the router faster than the router can write them to the USB drive. Try opening a telnet session on the router and cp from your big box. What happens? Does that work?
  37. teddy_bear

    teddy_bear Network Guru Member

    Update - build 23.

    Bug fix release.
    • Fixed serious bug of previous build 22 described a few posts above.
    • Display additional info in the GUI for attached USB devices: always show filesystem type even for unmounted drives, show size for mounted partitions, fixed display of multiple attached printers.
    • Allow domain name as admin access restriction - from StPepper' VPN mod.
    • Fixed DST rules for some Russian timezones.
    • Added Country/Region setting to "Advanced Wireless" page. This is mostly intended to help with setting Tx Power value (see this thread for details).
    • Minor fixes, code optimization and cleanup.
    Links to the firmware binaries and the git repository with sources are in the 1st post. The complete sources of this build can also be downloaded as a git snapshot in tar format.
  38. pandora

    pandora Addicted to LI Member

    I am trying to add a 320 GB external notebook drive to my Linksys WRTSL54GS using your firmware. For some reason it won't mount.

    Is there a partition / file size limit in your firmware?

    Other than that it works great, it works well with my flash drive.

    What Linux utilities / commands would I use to partition and format my drive from telnet using my router?
  39. teddy_bear

    teddy_bear Network Guru Member

    Could be many reasons...
    How is it formatted - what filesystem? FAT/NTFS/Ext(2|3)?

    Is it recognized at all by the router? What is in the logs when you connect it? Can you see the drive in the "Attached devices" list in the GUI? Does it have an external power supply, or does it use USB power? Does it spin up when you connect it?

    As for the commands to partition and format the drive, read the first post.

    Guys, when asking for help please provide as much information as you can, otherwise it will be very difficult if at all possible to help you, or explain why it doesn't work!
  40. pandora

    pandora Addicted to LI Member

    Thanks for your help. It is formatted as a FAT32 drive.

    The device seems to be detected. The following is visible from "Attached Devices" in the GUI / USB Support tab -

    Storage 0 Iomega Iomega eGo USB/FW400 Por000000504191
    Partition 'TOMATO' vfat is not mounted

    When I click the "Mount" button the following error is reported - <>

    Failed to mount. Verify the device is plugged in, and try again.

    The log reads as follows -

    Mar 25 18:31:22 Tomato user.warn kernel: USB device disconnected from the SCSI subsystem
    Mar 25 19:00:02 Tomato root: -- MARK --
    Mar 25 19:22:10 Tomato kernel: usb-uhci.c: $Revision: 1.275 $ time 18:30:40 Mar 24 2009
    Mar 25 19:22:10 Tomato kernel: usb-uhci.c: High bandwidth mode enabled
    Mar 25 19:22:10 Tomato kernel: usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
    Mar 25 19:22:50 Tomato kernel: hub.c: new USB device 01:02.2-1, assigned address 4
    Mar 25 19:22:50 Tomato user.warn kernel: Vendor: Ext Hard Model: Disk Rev:
    Mar 25 19:22:50 Tomato user.warn kernel: Type: Direct-Access ANSI SCSI revision: 02
    Mar 25 19:22:50 Tomato user.warn kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
    Mar 25 19:22:50 Tomato user.warn kernel: SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB)
    Mar 25 19:22:51 Tomato kernel: /dev/scsi/host0/bus0/target0/lun0: p1
    Mar 25 19:22:51 Tomato user.warn kernel: USB device connected to the SCSI subsystem
    Mar 25 19:22:51 Tomato user.debug kernel: WARNING: USB Mass Storage data integrity not assured
    Mar 25 19:22:51 Tomato user.debug kernel: USB Mass Storage device found at 4. Host: 0
    Mar 25 19:22:51 Tomato hotplug[878]: Waiting for device [8/6/80 59b/472/1] to settle before scanning
    Mar 25 19:22:54 Tomato user.warn kernel: SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB)
    Mar 25 19:22:54 Tomato kernel: /dev/scsi/host0/bus0/target0/lun0: p1
    Mar 25 19:24:41 Tomato user.warn kernel: MSDOS FS: IO charset utf8
    Mar 25 19:24:41 Tomato user.warn kernel: MSDOS FS: Using codepage 437
    Mar 25 19:24:41 Tomato user.warn kernel: VFS: Can't find a valid FAT filesystem on dev 08:01.
    Mar 25 19:24:41 Tomato user.warn kernel: FAT: freeing iocharset=utf8
    Mar 25 19:24:41 Tomato user.warn kernel: MSDOS FS: IO charset utf8
    Mar 25 19:24:41 Tomato user.warn kernel: MSDOS FS: Using codepage 437
    Mar 25 19:24:41 Tomato user.warn kernel: VFS: Can't find a valid FAT filesystem on dev 08:01.
    Mar 25 19:24:41 Tomato user.warn kernel: FAT: freeing iocharset=utf8
  41. pandora

    pandora Addicted to LI Member

    As a follow up to your suggestion to see the first page for instructions on how to format a hard drive using Linux commands through telnet.

    I came across the following -

    Which tells me how to create and format a Linux partion, and swapfile. I don't wish to do this.

    I wish to create (which the instructions DID help me achieve) a DOS partition, and then format it (which the instructions did not help me to do).

    How do I format my DOS partition on the drive through telnet Linux commands to the Tomato router? I am using the full version.

    My drive currently looks like this from telnet -

    Disk /dev/scsi/host0/bus0/target0/lun0/disc: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks
    Id System
    /dev/scsi/host0/bus0/target0/lun0/part1 * 1 38913 312568641
    c Win95 FAT32 (LBA)
  42. teddy_bear

    teddy_bear Network Guru Member

    Apparently it doesn't recognize the filesystem on your drive.

    Try to reformat your drive again as FAT32 - on your Windows machine.

    You can't format your drive as FAT/FAT32 on the router. The utilities included in Extras build, or supplied in a separate package by ray123 are for formatting partitions using native Linux Ext2/Ext3 filesystems - in case you don't have access to a Linux box. To create DOS partitions and format them using FAT, you have to do it on your Windows system.

    Another possible reason for failures with HDD is the insufficient power. If your drive doesn't have an external power supply, a single USB port on a router may not provide enough power for it. This may cause different errors - including the one you're getting. You may try to use powered USB hub - but there's no guarantee it will help...
  43. pandora

    pandora Addicted to LI Member

    Unfortunately Microsoft has decided FAT is not to available anymore for partitions larger than 32GB. I tried using an HP flash drive utility (from Windows), which did produce a readable FAT drive on my PC. When it was moved over to the router, it failed to mount.

    I am providing a 5V power to it, as such there should be no power problem.

    I tried to format following the Linux instructions. Unfortunately the Linux file system format fails. At least it is trying to format.

    The log looks like this -

    Mar 25 21:12:21 Tomato login[389]: root login on 'pts/0'
    Mar 25 21:22:00 Tomato user.err kernel: Out of Memory: Killed process 419 (mke2fs).
    Mar 25 21:24:53 Tomato user.warn kernel: SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB)
    Mar 25 21:24:53 Tomato kernel: /dev/scsi/host0/bus0/target0/lun0: p1
    Mar 25 21:25:16 Tomato user.err kernel: Out of Memory: Killed process 428 (mkfs.ext2).
    Mar 25 21:25:55 Tomato user.err kernel: Out of Memory: Killed process 429 (mkfs.ext2).
    Mar 25 21:27:51 Tomato user.err kernel: Out of Memory: Killed process 432 (mke2fs).

    The output mke2fs command and response appears as follows -

    root@Tomato:/sbin# mke2fs -L Tomato -T 83 /dev/scsi/host0/bus0/target0/lun0/par
    mke2fs 1.38 (30-Jun-2005)
    Filesystem label=Tomato
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    39075840 inodes, 78142160 blocks
    3907108 blocks (5.00%) reserved for the super user
    First data block=0
    2385 block groups
    32768 blocks per group, 32768 fragments per group
    16384 inodes per group
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616

    Writing inode tables: Terminated

    I have acronis, and may try that.

    It looks like formatting large drives is a problem. :(
  44. ray123

    ray123 LI Guru Member

    Windows should be able to format it as FAT32.

    Paragon Partition Manager 9.0 (on Windows) will format FAT32, ext2, ext3, & Linux swap. I've used it on USB flash drives, but only up to 8GB. I believe that you can download a 30-day trial version.
  45. teddy_bear

    teddy_bear Network Guru Member

    You can also use free fat32format utility for Windows to format large drives as FAT32.

    As for the router, I was able to format 160GB Ext3 partition on it in the past although it did take a long time. And I have wl-520gu with only 16 MB of RAM. Looks like it's running out of memory in your case - are you running any extra apps on it? Try to temporarily stop them if any... You may also stop FTP and Samba, and disable printing support while formatting large partitions. And - I hope you're not running the broken build 22 ;).
  46. pandora

    pandora Addicted to LI Member

    I installed and formatted the drive into FAT 32 using Acronis under Windows XP, plugged it into the router and now it works.

    I think the drive was initially formatted for Apple products. Large drives via Windows are a problem to make in FAT 32 format.

    I also couldn't get the drive installed using a Linux format with the router.

    If it is possible, and you wouldn't mind, could you include a FAT format utility in a future release.

    EDIT - Just an edit to add that I'm currently moving 50GB to the router drive through my LAN without any problem using WinSCP (in FTP mode). It's about 25% finished. Performance of the drive, and of the router for other users is very good. The CPU load remains very low.

    Readings are -

    CPU Load (1 / 5 / 15 mins) 0.84 / 1.04 / 1.02
    Total / Free Memory 29.93 MB / 528.00 KB (1.72%)
  47. ray123

    ray123 LI Guru Member

    I think you (we) are kinda stuck here.

    You can legitimately have FAT32 as large as 8TB and FAT16 up to 2GB.
    Microsoft evidently has purposely crippled the Windows format program to a maximum of 32GB for FAT---to encourage using NTFS on these large drives. Properly so, IMHO, except for the case of removable/pluggable/portable drives.

    As TB pointed out, a freeware utility is available to do it. Plus there are other commercial partition manager programs that will do it. And most of them have a free trial version that can be downloaded.

    As far as fat formatting on Tomato: Unlikely. Busybox doesn't have mkfs.vfat, only mkfs.ext[23] and mkswap. If it had it, I'd gladly make a new utility package that included it. But it doesn't, so I won't. It could be done with a bit of work, but there's little reason, since there are other methods available. looks like there simply is not enough RAM in these routers to mkfs a large disk, as your "out of memory" syslog showed. So even if somebody did add mkfs.vfat to busybox, it would probably run out of memory, too.

    Unless people want to play kinky games with adding a (temporary?) swap drive, it looks that formatting large drives will have to be done on a "real" computer.
  48. teddy_bear

    teddy_bear Network Guru Member

    Actually, there's already mkdosfs tool... I just compiled it, and included into extras.tar.gz package - it's available for download from the same location as firmware binaries (links are in the 1st post) for those who wants to try it out.

    Although it can be included into the "Extras" build (the binary is not too big - about 40K uncompressed), there's a very little point in doing so. It can work for flash drives but as ray123 pointed out, there will be not enough memory on the router to format large drives anyway, and there are different freeware and commercial utilities that allow you to format any size drive on a Windows machine.
  49. pandora

    pandora Addicted to LI Member

    I was thinking about this and recalled there was another version of USB supporting firmware before this incarnation of Tomato. That would be the Thibor firmware. It had support for NTFS and FAT, I don't recall it hanging when large files were transferred.

    The Thibor code is a derivative work from the initial Linksys code for the WRTSL54GS.

    Could the NTFS and FAT support in the Thibor firmware (which is open source) be of any assistance in the development of this firmware?
  50. teddy_bear

    teddy_bear Network Guru Member

    1. I'm not aware of any hangings other than when transferring large files using Samba from Windows client - for the reasons explained above in this thread. There's no hanging when using FTP or using FAR as a client with Samba. Please correct me if I'm mistaking... As far as I know Thibor doesn't include Samba, hence isn't affected by this specific Samba behaviour.

    2. Thibor sources for USB version are not published anyway.

    3. NTFS support is not included because of its implementation in kernel, and because the need for it is very questionable. However, the NTFS compiled module is available separately for those who needs it - it's in extras archive at the same download location as firmware binaries.

    EDIT: Oops, the Thibor USB version 17 indeed includes Samba 3. But - (1) I still could not find sources, (2) - Thibor is for 8MB routers so it can afford Samba 3. I'm not sure if Samba 3 has a workaround for that issue, but even if it does it can't be used on 4MB flash space...
  51. pandora

    pandora Addicted to LI Member

    The source for the WRTSL54GS is still up at at -

    IIRC it permitted formatting drives via FAT and NTFS from it's web interface. Though it has been years since I've used it. I believe Thibor carried the FAT and NTFS support forward into his firmware. A firmware which could support FAT, NTFS, and Linux 2/3 files could be very useful.

    I'll ask on if anyone has a copy of the Thibor firmware source for the SL routers. If anything comes up, I'll post a link here.

    A way to partition drives, and format them, via a web interface could be helpful for this firmware. I'd still like to see FAT format support if possible.

    I wish there was a guide to help me set up a PC and allow it to do the type of firmware generation you're doing.

    Regardless of any problems, what you have done is magnificent. Thanks so much for producing it.
  52. teddy_bear

    teddy_bear Network Guru Member

    Everything from official Linksys and Asus firmwares that I think can be used in Tomato and fit in 4MB is already here. As for formatting from the web interface, I believe the limited functionality that can be provided doesn't worth a flash space and development time needed for it ;)... The command line tools are more flexible and not that hard to use for people who managed to get the unofficial firmware on their routers...
    NTFS is useless IMO... All USB drives come formatted as FAT32 out of the box anyway. NTFS support in kernel 2.4 is read-only. There is an extension with limited write support (with a lot of restrictions - i.e. you can't change the size of the file etc), but it often produces files and partitions that cause errors when used on Windows. Anyway, for those who really want NTFS I've made a pre-compiled module available.
    Thanks, if you find it, I for sure will look at it. However, if what makes the difference is Samba 3 vs Samba 2, that won't help unfortunately... But it would be interesting if you can verify that the Thibor firmware indeed doesn't hang or timeout when you copy large files to FAT partitions via Samba using Windows Explorer. I thought that Samba 3 has the same problem but I might be mistaking...
  53. tstrike2000

    tstrike2000 Network Guru Member

    First, thanks to Jon, Victek, and Teddy Bear for their work with Tomato and on the USB part of the builds. I currently have teddy bear's mod on my wl-500gp v2 and it's working good.

    Anyway, I have an external USB drive hooked up to the router which has been formatted, first to FAT32 and now to EXT3. I can see the drive fine from Windows XP and copy files to the drive. My problem is if I try to mirror folders and files from XP using robocopy, xxcopy or goodsync to the USB drive, it copies fine, but on the next re-sync, it will recopy a few of the same files to the external USB drive from XP. I know there are issues copying NTFS to Samba with NTFS ACL's and file dates. However, is there a way to do incremental backups from XP to the USB drive and have it only copy the changes from the source to the destination?
  54. ray123

    ray123 LI Guru Member

    The problem is, there is just not enough memory in these routers. 16MB of RAM and 4MB of flash are just barely enough for what it does--routing. As it is, with printer support, usb flash drive support, ftp, and samba in/out, all but about 256kb of the 4MB flash is used. That 256KB is all we have for jffs, which has a lot of valuable uses.

    Really, the only thing that saves us is that squashfs is able to do 4-to-1 compression. The Linux kernal alone (vmlinux) is 2.1 MB, which thankfully compresses down to 704KB. This doesn't include the loadable modules (usb, printer, etc). Just the kernel & modules take up close to 25% of the 4MB flash.
    Samba (smbd & nmbd) is very large--750KB.

    The router's "/" filesystem is 13MB. Add the kernel's 2MB and we have a grand total of about 15MB. That all has to fit into the 16MB of ram. Plus leave generous space for buffers---after all, you can't do routing without lots of buffers. And it all has to squeeze into 4MB of flash.

    There is simply not enough room to hold rarely needed programs like disk partitioning & formatting programs. Especially since there are readily available alternatives to do formatting on "real" (desktop) computers. Heck, I don't think there is really room for something like VPN, which a lot of people fervently desire.

    In order to make room for formatting programs on the router, we'd have to get rid of something else. What? Should we dump Samba in favor of mkfatfs? I don't think so.

    Frankly, to me the current state of Tomato+USB+Samba is like the dancing bear:
    The amazing thing is not that it dances so well, but that it dances at all.
  55. ray123

    ray123 LI Guru Member

    I use Microsoft's "synctoy" between my Windows XP and my Linux box, and have been using it for a few years. he Windows fs is NTFS and the Linux fs is ext3. It should work just as well if the Linux box is a router instead of a desktop. I believe that synctoy goes by the file timestamps, to decide what needs to be copied.
  56. pandora

    pandora Addicted to LI Member

    I put a post in dslreports asking if anyone had a copy of the Thibor firmware. I got a reply, it isn't the latest, and I don't know how useful it would be. I believe the Thibor and Linksys NTFS support was not via the Linux kernel. It may or may not be useful.

    Anyway the Thibor firmware source (last one we can find at the moment) is here -
  57. pandora

    pandora Addicted to LI Member

    Ray or TB,

    Is there a place where you have instructions on how to set up a Linux system on a PC where a user is taken step by step to the point of being able to create a distribution such as you have.

    Currently I have no Linux, and would like to start with a distribution which would be friendly to creating router distributions. I have no idea what is necessary. Any pointer you can provide would be helpful.

  58. teddy_bear

    teddy_bear Network Guru Member

    That's v15. USB support is only in v16 and v17. That's why I said I couldn't find the sources.
  59. pandora

    pandora Addicted to LI Member

    Sorry, I didn't know you had found any Thibor source.

    Has this firmware worked without a problem on Playstation 3's?

    I'm having difficulty with mine, and was wondering if there was some setting or other which was necessary for the PS3 to work.
  60. ray123

    ray123 LI Guru Member

    I believe the early posts in this thread point to a rough overview. Or maybe Jon's instructions. Basically, just grab a recent TB release tarball, and install it in your home directory. Set up the softlinks in /opt per the afore-mentioned instructions, cd to tomato/src/ and do make clean; make all.

    You'll need a Linux distro with development tools--gcc, etc. I currently use Ubuntu. After you install it, go into the package manager and install the software development stuff. You'll know when you are missing something----just install whatever it complains about. FWIW, I get unhappier with Ubuntu as time goes by. Everytime they do an upgrade, something that used to work stops working.

    You don't really need a separate machine. You can use MS VirtualPC or Sun's VirtualBox to emulate a machine on your Windows system. IIRC, there are downloadable VM disk images with Debian (Ubuntu) already installed. You'll need about 30GB of disk.

    If you are a Linux newbie, you have a steep learning curve, because you'll have to become conversant in both Linux and the Tomato build process. It's not really hard, just a lot to swallow at once. Google is your friend! Make sure you use a decent editor, such as emacs. The "standard" Linux editor is vi, and is "stone knives and bearskins" era.
  61. kovacsr89

    kovacsr89 Addicted to LI Member

    country settings

    I found a little bug..
    In the European Union the antenna max power level is 100 mw!
    I changed the country to Europe but the web gui didnt block/warn if i above 100 mw..
  62. teddy_bear

    teddy_bear Network Guru Member

    This is not a bug. Read this thread for details.
  63. Aquafire

    Aquafire LI Guru Member

    How to install this Firmware over HyperWRT v2.07.0, HyperWRT + thibor17 rc3

    Hello All,

    Teddy Bear, you really are as adorable as a teddy bear since you have done the long awaited work. The only thing keeping me away from Tomato was its lack of support for USB.

    The guides found on your main page use ASUS router as a demo unit with DD-WRT installed . It shows the steps to move from DD-WRT to Tomato with your mod.

    I have a Linksys WRTSL54GS router which is already updated with a custom firmware of HyperWRT v2.07.0 + thibor17 rc3 . Can someone help me with exact steps of how to move from my current firmware to this one. Cause i dont want to brick by making any mistakes.

    Secondly i guess HyperWRT does support NTFS file system. Do you have any plans of adding support for NTFS. Just asking since I use a hub to connect my 4 harddisks to the router and use as a NAS and DLNA server. My all harddisks are now filled with media data and they are formatted as NTFS (as far as I remember, or maybe I am wrong :).

    Thanks for any support in advance.
  64. teddy_bear

    teddy_bear Network Guru Member

    Please use the install instructions for your router from the official Tomato web site:

    Also, please check a discussion about NTFS support a few posts above. I have no plans to add NTFS to the firmware but with 8MB flash on your router you will have plenty of JFFS space, and can easily store a separate NTFS module there, and insmod it in your Init script. But first make sure that your drives are really NTFS-formatted ;).
  65. tstrike2000

    tstrike2000 Network Guru Member

    Just flash as normal with any of the ND versions. My SL54GS flashed with no problems.
  66. Aquafire

    Aquafire LI Guru Member

    Please guide fo JFFS with NTFS module loaded and working


    Well i have now flashed the router with your firmware. And yeah I have confirmed that my drives are NTFS formatted :).

    Conversion from NTFS to FAT32 on the fly without losing any data is always a risky business, especially when i dont have any backup.

    I am not a linux techie, although i can run basic commands in shell with help and copying and pasting them. Can you please guide me with exact steps for how to use JFFS space to load NTFS module and make workable at every router restart, so Tomato can see NTFS partitions. Also please tell its reliability for both read and write operations to the connected drives.

    That would be a big help and would make your firmware more fondly choice for a lot others.

    Thanks in advance.
  67. trevorw

    trevorw LI Guru Member

    Hi teddy_bear,

    Sorry for the late reply - a hard disk crash made things considerably busier. Anyway, I've been running build v23 for the last 10h and as usual, the upgrade and the whole things works smoothly.
    I've given the USB ports another try and things seemed to have been improved. The UI reacts nicely to most of the changes and there is a lot less logging.
    You are right about the samba process blocking the disk if it's being unplugged - i'm using a windows client to connect to the router and if the disk is unplugged while I'm inside a folder, the disk remains mounted. However, if I change the drive from the client, everything umount out fine.
    Probably there are more improvements to be made but as far as I can tell, the routers works out just fine and for usual usage, with normal mount/umount things are a-okay.

    Thanks again for all the awesome work!

    P.S. by the way, I've noticed the favicon is missing in the latest build. Not sure if this is my browser (Firefox) or an actual bug.
  68. larsar4

    larsar4 Addicted to LI Member

    I'm sure this has been talked about but I couldn't find it after a few searches. I was wondering if all in one printers were supported. Well I got the printer side working but I'm not getting anything for the scanner side. That's all I really wanted was the scanning part.

  69. db9r

    db9r Addicted to LI Member

    Hello - my first post - I'm trying to put a Asus 520GU, that I have installed tomato-1.23-ND-USB-v23-Std - as an access point (as I can with the factory firmware)
    The reason is at this point I have a wrt54gl (this is the DHCP server for my home net) running Tomato MLPPP after the modem - this then connects to the 520gu (currently set as an access point)at the other end of the house (which has the printer on the USB & a couple of PC pluged in & a 2nd SSID)
    I'm confused as I can not get the 520gu to get an IP from the first router (I put the wireless into access point mode)
    I've now put the factory firmware back untill I can figure this out

    Thanks for any help..
    What settings in 1.23ND would be used to do this
  70. larsar4

    larsar4 Addicted to LI Member

    I'm doing this with my router right now... if I understand you're trying to get your asus router to be a client of the first router so you can use the ethernet ports. There's a few tutorials here:

    or you can use wireless ethernet bridge (this is the one I'm using) here:
    basically this is all you have to do if your router is on

    tomato makes it really easy to do this.

    hope that helps
  71. db9r

    db9r Addicted to LI Member

    larsar4 - yes that is what I'm trying to do - thanks for the links - something to read with my coffee

  72. db9r

    db9r Addicted to LI Member

    I'm trying to mimic what I did with the asus oem firmware - if you select access point (asus 520gu is the 'client router' in my setup) - I am led to believe that this will bridge the LAN ports with the WAN port and this will have the primary router (wrt54gl) provide DHCP to the 2nd router (wl520gu) via the ethernet cable and to items connected to the LAN ports - on the client router wireless - I have a 2nd SSID (different from the primary router). This works for me.

    When I install 1.23 ND and I set the wireless to 'access point' thinking that this will be the same as what I have done with the OEM firmware.
    However I am not sure what the WAN setting should be as I am getting the ISP from the primary router via the ethernet.
    In this configuration I have no access to the WAN or primary router.
    If I change the wireless connection to wireless client or wireless bridge I assume that this 'locks' out the WAN port and connects to the primary thru the wireless connection. Now I havent tried this yet.
    I really want to have 2 wireless access points on my LAN isolating one particular laptop from access to my criticle area of my LAN.
    Just wondering what I missed or more likely don't understand.

    Thank you for reading.
  73. Aquafire

    Aquafire LI Guru Member

    Running DLNA Server on Linksys WRTSL54GS

    Hi Teddy,

    Well I did flash my Linksys WRTSL54GS and was successfully able to enable USB support. I have multiple hard disks connected to the WRTSL54GS via USB hub.

    I flashed the ~3MB flash space as a JFFS2 partition which is auto-mounted everytime.

    I have already done a similar experiment with Western Digital My Book World Edition NAS device. In which via gaining SSH access I was able to install the NAS embedded version of TwonkyVision a DLNA media server. The internal directories contain audio/video media is shared via this DLNA server. It is auto loaded everytime the NAS device is turned on. Hence I am able to access the media files via any Upnp/DLNA based device like PS3 and Nokia N95 8GB. It is accessed by its own web interface via Http://address of your server:9000.

    Now i was wondering that using this JFFS space, can we install the same twonkyvision server in the Linksys WRTSL54GS and somehow can make the USB mounted Hard disks available to this software. It can then act as a similar standalone DLNA device for media sharing. It does provide the same BusyBox shell space which can be accessed via Putty or TelNet client.

    Please have a look at

    I installed the Linux ARM little endian uclibc 0.9.28 version to my Western Digital NAS which is working perfectly. As always I am not much of a linux techie so not much aware of Little Endian and Big Endian versions.

    Can you please have a look and guide as how to make it work in such a manner that this DLNA server in JFFS autostarts everytime the router is started.

    I did ask for help/guide regarding installing and making any NTFS package in the similar way via optware.

    Would appreciate if you or anyone else can experiment and can guide.

  74. edric25

    edric25 Addicted to LI Member

    hi! i'm using an asus wl-520gu with tomato 1.23 ND with USB installed. I configured did as a host for WDS. My other router is a Linksys wrt54g v5 with dd-wrt v24 sp1 micro installed. I can't seem to make them work. I made it work before when I was using dd-wrt on the wl-520gu. But with tomato, it does not seem to work.
  75. teddy_bear

    teddy_bear Network Guru Member

    Unfortunately scanners are not supported, and only the printer portion of all-in-ones is working. Support for scanners in kernel 2.4 at the very least is far from being perfect, and most of the open source firmwares do not include it. Besides, additional software needed (i.e. scanner server) takes a lot of space and is too large for 4MB routers...
    There is an Optware SANE package that you can try to play with, but I'm afraid it may need an additional scanner.o kernel module which is not a part of the firmware. I can compile it and include it into the "extras.tar.gz" package if needed...

    In regards to NTFS - the ntfs.o module included into the "extras.tar.gz" package has read-only support for NTFS filesystem. This is the original NTFS driver from kernel 2.4. To use it, copy it to the router (into /jffs directory, for example - if you have JFFS enabled), and add the following line to your Init script:
    insmod /jffs/ntfs.o
    Although it's possible to compile NTFS module with write support, I did not do it because it's known to be buggy, and corrupting filesystems when the write support is enabled - especially when you're trying to access your files later on the Windows system. By the way, as far as I can tell based on the information floating around, that's what Thibor firmware includes - the original kernel 2.4 driver compiled with write support. But I may be mistaking - the sources for the latest 17c version of Thibor firmware are not available.

    There's a newer and better version of NTFS driver for kernel 2.4. It has many bugs fixed, and includes limited but safe writing support. I compiled that version - but it doesn't work with my released Tomato mods - additional kernel patching is required to export some functions. When I release the next build, it will have the patches required, and I'll include new NTFS module into the "extras.tar.gz".

    Another way of mounting ntfs partitions is to use ntfs-3g or ntfsprogs packages. On kernel 2.4 they both require a FUSE package which is only supported on kernel 2.4.21 and higher (while Tomato is on 2.4.20). It's probably possible to patch the kernel for FUSE, and then maybe patch it more for ntfs-3g or ntfsprogs - but that's a lot of work. So far only 2 people inquired about writeable NTFS support, and I don't think there's enough demand for it to justify the efforts needed...

    As for TwonkyVision, I can't be at any help as I have not used it - not on the router, nor anywhere else. I know that some of the USB-enabled versions of Asus firmwares (for 9MB routers) include it, so it's probably possible to make it work.

    Someone reported a similar issue before - however it was solved after I updated the wireless driver to the ver. in the firmware. Not sure what's causing you problem - I believe many people were able to successfully set up WDS with this mod. But the incompatible drivers in different firmwares could be one of the reasons...
    Regardles, I'd recommend you to update your DD-WRT routers to one of the latest v24 pre-SP2 builds (search their forum to find out which build is recommended). If you read DD-WRT forums, you'll find out that v24sp1 is infamous for a lot of different issues people experienced with it.
  76. tcsoft

    tcsoft LI Guru Member

    with tomato i had to use the same ssid on both routers too (which was not required on my openwrt-setup before), not only the same channel. also, avoid the "aes/tkip"-setting - choose aes or tkip explecitely when you're using wds with wpa.
  77. edric25

    edric25 Addicted to LI Member

    hey it suddenly worked when i upgraded my linksys router to v24 sp2! thanks!

    thanks for the info tcsoft. i now set them t to wpa aes. i noticed the keys generated by a specific key phase in a tomato and dd-wrt firmware are different. so i switched to wpa.
  78. edric25

    edric25 Addicted to LI Member

    last problem.. i installed the printer and it worked fine. But when i turn off my pc,router, or printer, then turn on any of them. the printer does not work. I have to "add new printer" again and print a test page again. this issue also came up before when i was using dd-wrt for printing. i also found a thread about this problem but no answer yet. i'm using windows vista. is there a way to print without having to add a new printer again?
  79. tstrike2000

    tstrike2000 Network Guru Member

    WL-500gP v2 + USB Printer Drops

    On my WL-500gP v2, I have teddy bear's latest v23 USB std mod. I have a 2.5" ide to usb drive encloser and an HP LJ 4 connected via parallel to usb.

    They both work well, but I've noticed that a couple of times that even though the drive is still accessible, the printing all of a sudden stops working. If I disable then enable USB, printing is fine again. Is there possibly something I could be doing that's making the router lose communication with the printer?
  80. teddy_bear

    teddy_bear Network Guru Member

    I don't know... Never experienced anything like that with my Brother HL-5240. It keeps working for days with no need to restart usb services. Maybe it has something to do with parallel to usb?

    What's in your logs when printer stops working? Anything relevant? I guess the p910nd printer server process gets killed for some reason - logs may help to understand why. Sometimes linux starts killing processes when the router goes out of memory... Several critical processes - like dnsmasq, cron - are set to restart automatically by Tomato - but I suppose printer server is not that critical for a router. However, you can also setup a script in scheduler to check for and restart other processes if needed.

    By the way, to restore the functionality when this happens you don't have to disable/enable USB - just hit the "save" button on the usb page without making any hanges - it will reload printing support module and restart printing server. Most probably that will be enough.
  81. tstrike2000

    tstrike2000 Network Guru Member

    Yeah, it's kind of strange. My only other experience running USB printing and Samba on a router was Thibor's on my SL54GS. I'm not a Linux expert, although I know that Linux cache's a lot of memory since there's not a lot of actual free memory which makes me think it wouldn't kill the process because of memory, but I'm not sure. The only other thing I noticed is I had UHCI 1.1 support checked and not OHCI, although it seems to print with either checked. I actually have no idea which one should be used, but it doesn't print if 1.1 support isn't checked. And I couldn't see anything stand out in the logs, but I'll have to look again if it stops.
  82. trmfreitas

    trmfreitas Addicted to LI Member

    Just wanted to tell that now I have two multifunctions printers and a usb flash drive connected to a hub. All features of both printers work, including scanner.

    I am using the SANE package from optware and the usb drive for device storage space.

    For the scanner to work there was no need to install anything else besides sane and xinetd.

  83. teddy_bear

    teddy_bear Network Guru Member

    Good to know, thanks for the heads-up!
  84. newsfaq

    newsfaq Addicted to LI Member

    Nice, do you still need to add insmod scanner.o in the startup script ? which model of MFP you have if you don't mind :) ?
  85. trmfreitas

    trmfreitas Addicted to LI Member

    I have an Epson Stylus cx3200 and an Epson Stylus SX205.

    You don't have to do anything else besides installing SANE and xinetd (and configuring them).
  86. teddy_bear

    teddy_bear Network Guru Member

    Since you've got it all figured out, could you post your /opt/etc/xinetd.d/saned file? Did you need to change anything in configuration files in the /opt/etc/sane.d directory? Does Epson Scan Settings utility see your scanners?
    I have Epson CX8400 - should be similar to your AIO's - but could not make it work so far, even though xinetd starts and listens on port 6566...
  87. me2az

    me2az Addicted to LI Member

    Some or maybe all of Epson scanners under linux need firmware file.
    Taken from Ubuntu forums.
  88. trmfreitas

    trmfreitas Addicted to LI Member

    All I can tell you is to run sane-find-scanner

    If it finds your scanner then you are in the right path.

    Try now scanimage -L

    If it says you have no usable scanners then you should go edit
    sane.d/epson.conf and add usb 0x.... 0x.... with your vendor and model id
    obtained by sane-find-scaner.

    Then run xinetd.reload and try again. Do not expect for the old epson utilities to work with your scanner.

    You'll have to use xsane or a sane twain adapter. Both work fine.
  89. teddy_bear

    teddy_bear Network Guru Member

    Thanks! That was the issue - for some reason I thought I'll be able to configure it on Windows without installing a SANE frontend ;). Now both - xsane and sane twain - work fine.
  90. direction

    direction Addicted to LI Member

    I have a problem in WDS mode.

    One linksys W54GL and WL-500W, the former use official 1.23 and the later use 1.23 ND USB Mod.

    I set the W54GL as Access point + WDS mode and connect to the wan, Asus-WL500W as Access point + WDS mode as receiver.
    I check the device list make sure the WDS connection active and default gateway set as the W54GL; however, I can not connect this two AP.

    I also use the Buffalo WRT-125 to replace the WL500W to use WDS function with W54GL, and it work.

    I do not know if it is the Tomato's problem:confused:
  91. ray123

    ray123 LI Guru Member

    Webcams on Tomato!

    I have just uploaded the files (and instuctions) for running a webcam on a Tomato router.

    There's good news and bad news.
    The good news: it has an inclination to work. Kinda
    The bad news: [deleted by moderator--public weeping and wailing is unseemly and embarrassing]
  92. davidehue

    davidehue Addicted to LI Member

    @teddy_bear: I have a little problem about bandwidth usage. I use WL-520GU with v.23 mod. I downloaded several files using IDM (Internet Download Manager), and I use Netlimitter to limit the bandwidth usage from my laptop (I limit the bandwidth for the IDM to 40% of my total bandwidth). It worked, the total bandwidth consumed by IDM is 40% of my total bandwidth.

    The problem is when I check on the router web configuration, on the real time bandwidth usage, my laptop was using all of the total bandwidth. I thought the total bandwidth is allocated for my laptop, but only 40% used by IDM. So the other 60% is useless.

    How can I fix this problem?

    Thanks :)
  93. TheSteve

    TheSteve Addicted to LI Member

    I recently purchased a WL-520GU, tested it out with the factory firmware and then switched to dd-wrt. I found with the factory firmware I was getting 2.1 megabytes/sec of transfer via wireless. When I switched to dd-wrt that dropped to 1.5. I then went back to the factory firmware and it went back to 2.1. I then tried tomato and it works very well and gives me 2.2 megabytes/sec. I just found this usb patched firmware and tried it out but it dropped me back down to 1.5megabytes/sec of transfer. Has anyone else noticed the loss of speed? I am wondering if its usb drivers or perhaps the updated broadcom driver.
  94. teddy_bear

    teddy_bear Network Guru Member

    I'm not sure what's causing your problem - maybe someone with more experience setting WDS up can help you...

    But you can try to install the firmware with the same version of wireless driver on both - the client and the WDS server - routers. If WL500W is running this USB mod, try to put the same mod on your W54GL (you can disable USB support completely in the GUI, and it won't use any resources other than flash space). Or - better yet - use one of the latest Victek's non-USB mod versions with the same WL driver for your W54GL.

    I believe this question has nothing to do with this particular mod, so it'd be better to ask it in another thread. In any case, I can't help you as I have never used IDM or Netlimitter, and have no idea about the way they work...

    With this mod I'm getting about 2 - 2.2 MB/s wireless transfer rate when using Atheros and Netgear wireless clients. Your speed may very depending on the clients you use and many other different factors. You can try to upgrade (or downgrade) your wireless client drivers... Also, try to decrease your Tx Power in Tomato Advanced Wireless settings. Anything above 30 will add some noice (the higher the power the more noice you get) thus lowering your wireless transfer speed.
    And make sure you're using exactly the same settings when comparing different firmwares - otherwise the comparison may not make any sense...
  95. TheSteve

    TheSteve Addicted to LI Member

    Thanks for the reply. The testing I did had the exact settings for each version of firmware.
    Same client(broadcom based) and was in the exact same location, transferring the exact file. I also did it multiple times on multiple channels for each firmware version.
    I may do more testing but being as I don't have to have usb support maybe I will run stock tomato.
    I did notice the WLAN led didn't work right with stock tomato, with yours it is fixed of course. Since reflashing back to stock tomato it still works.
    No matter what firmware I end up using I really appreciate your hard work!
  96. Aquafire

    Aquafire LI Guru Member

    Not able to save Bandwidth Logs to USB and CIFS

    Hello Teddy and Everyone,

    I am having a bit of trouble with Bandwidth Monitoring. I have formatted internal JFFS2 partition and its working fine.

    The real-time Bandwidth Monitoring is working fine. In the configuration when I set it to save the daily monthly log in NVRAM or JFFS it was showing the cumulative values correctly ( for every 2 hours as I set).

    However as advised i tried to avoid repeat flashing of NVRAM and JFFS, so thought to save bandwidth logs on external drives.

    I set up the external flash drive in the USB port (using Linksys WRTSL54GS with USB port). It is automatically mounted in /tmp/mnt/disc0_1/. I have installed the optware packages on the external USB flash and they working fine.

    Then i enabled the CIFS mount points to a shared folder on my PC ( have given the username / password correctly). The shared folder is mounted correcty in /cifs1 folder and I can browse it. I want the logs to saved to a shared folder "Misc" on my shared windows drive. It is available as "/cifs1/Misc".

    However in the Administration -> Bandwidth Monitoring option, when I define the location of the USB flash (/tmp/mnt/disc0_1/) or the CIFS share (/cifs1/Misc) then the bandwidth logs are not saved/written and hence i cannot see any results. I have double checked everything and I can read and write to both the USB Flash and CIFS shares.

    The Bandwidth monitoring section shows the message "The rstats program is not responding or is busy. Try reloading after a few seconds." When I checked the last 25 Lines of the system logs it shows the following


    Any ideas about why the program is not able to write to the external CIFS share, even when it is mounted correctly and I can browse it. ( Have checked via logging in the router using WinSCP).

  97. teddy_bear

    teddy_bear Network Guru Member


    I have my BWM file on /opt partition on USB drive, and it works fine. I have not tried CIFS, but if it mounts, you should be able to use it as well.

    When you change the location of your bandwidth file to an external location - USB or CIFS - for the first time, you have to check the "Create New File (Reset Data)" check box on the BWM settings page, or manually copy the old BWM file into a new location. If the file doesn't exist you'll get these errors.

    Also, make sure the directory you specified as the "Save History Location" exists, and it ends with a "/" (otherwise it will be interpreted as a file name, not a directory).
  98. teddy_bear

    teddy_bear Network Guru Member

    Update - build 24.

    Internal improvements and fixes only.
    • Kernel has been patched to support newer optional NTFS filesystem driver (from The new ntfs.o module is available separately in extras.tar.gz package which can be downloaded from the same location as firmware binaries (links are in the 1st post). This driver provides limited but safe write support.
    • Fix for "Incorrect value ... for desired access" error when Samba shares are mounted on other Linux systems using CIFS. Here you can find more details about this bug.
    • Updated USB kernel driver. This may help if you experience instability issues with some of your USB devices when using USB 2.0 driver.
    • Added mkdosfs utility to "Extras" build to format FAT/FAT32 partitions.
    • Added ntpc modifications by ringer004.
    • Minor bug fixes and code cleanup.
    Links to the firmware binaries and the git repository with sources are in the 1st post. The complete sources of this build can also be downloaded as a git snapshot in tar format.
  99. pandora

    pandora Addicted to LI Member

    I love your firmware. It is the best firmware I've ever used. Thank you so much for developing it.

    Would you mind creating an ISO or detailed instructions with links, so others could duplicate the generation process.

    I'm a windows person, and the only reason I'd like to learn to use Linux is to be able to try and include, as an example, the NTFS capability directly into the firmware you've been so generous to share with us as an add on in your release.

    Any help you could give as to where to start with which products and downloads would be greatly appreciated.

    I've got an older PC to dedicate to this. Until your firmware, I thought my WRT54GS was an ornament to history. It previously ran the Thibor 17c firmware. I'm so happy to see my old router have new life with your firmware. I can't thank you enough!
  100. direction

    direction Addicted to LI Member

    I found the problem may be the wrong mac adress tomato got.
    WL-500W have three mac adress ex 2A 2B 2C, and when use original firmware, the other router should enter the 2B to connect with WL-500W;however, tomato will let the Wan 2A Lan 2B and Wireless 2C, that cause the other router should not make the correct connection.
    Unfortunately, when I change the mac adress to make LAN and Wirless the same. It still not work, maybe it is driver's problem?
  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