1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tomato ND USB Mod

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

  1. alep

    alep Guest

    Hi all!

    How can I close port 5190?
    it still opened...

    Code:
    root@router:/tmp/home/root# iptables -L
    Chain INPUT (policy DROP)
    target     prot opt source               destination
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:16483
    DROP       all  --  anywhere             89.169.XX.XX
    DROP       all  --  anywhere             anywhere            state INVALID
    ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
    shlimit    tcp  --  anywhere             anywhere            tcp dpt:ssh state NEW
    shlimit    tcp  --  anywhere             anywhere            tcp dpt:telnet state NEW
    ftplimit   tcp  --  anywhere             anywhere            tcp dpt:ftp state NEW
    ACCEPT     all  --  anywhere             anywhere
    ACCEPT     all  --  anywhere             anywhere
    ACCEPT     icmp --  anywhere             anywhere
    ACCEPT     udp  --  anywhere             anywhere            udp dpts:33434:33534
    ACCEPT     tcp  --  anywhere             router              tcp dpt:ssh
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp
    
    Chain FORWARD (policy DROP)
    target     prot opt source               destination
    ACCEPT     all  --  anywhere             anywhere
    DROP       all  --  anywhere             anywhere            state INVALID
    TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU
    ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
    wanin      all  --  anywhere             anywhere
    wanout     all  --  anywhere             anywhere
    ACCEPT     all  --  anywhere             anywhere
    
    
     
  2. flammenwurfer

    flammenwurfer Networkin' Nut Member

    Hi, teddy_bear, love the firmware!

    I'm having trouble getting miniupnpd to work. I have enabled upnp on the router but I don't see any media servers available on my devices. That's about as far as I've gotten. I've installed and started mediatomb on a computer on my network and my devices can see and access that just fine.

    Do I need to do anything else to actually use the upnp built into the firmware?
     
  3. shap123

    shap123 Networkin' Nut Member

    DHCP Renew problem - tcpdump

    About DHCP renew problem:

    Apr 21 14:03:00 shaprouter daemon.info udhcpc[4407]: Sending renew...

    I checked with tcpdump on ports 67 and 68 - /tmp/tcpdump -v -i vlan1 -s 1500 port 67 or port 68

    I have no idea why, but all renew requests but last one are sending nothing out - they do not request the renewal of the lease. I double checked it and if needed can send you the dumps.

    Here is what I get:

    19:12:36.840940 IP (tos 0x0, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 576) 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:14:bf:ba:5f:d7 (oui Unknown), length 548, xid 0x9f715903, secs 3, Flags [none]

    19:12:37.229339 IP (tos 0x0, ttl 255, id 24482, offset 0, flags [none], proto UDP (17), length 340) 10.205.192.1.bootps > 172.25.187.151.bootpc: BOOTP/DHCP, Reply, length 312, xid 0x9f715903, Flags [none]

    19:12:39.192418 IP (tos 0x0, ttl 255, id 24629, offset 0, flags [none], proto UDP (17), length 340) 10.205.192.1.bootps > 172.25.187.151.bootpc: BOOTP/DHCP, Reply, length 312, xid 0x9f715903, Flags [none]


    However, I do not understand why first request is broadcast ? DHCP server is known, is it ? Firewall did not showed any dropped packets.

    I looked at implementation of this function:
    /* Unicasts or broadcasts a DHCP renew message */
    int FAST_FUNC send_renew(uint32_t xid, uint32_t server, uint32_t ciaddr)
    {
    struct dhcpMessage packet;

    init_packet(&packet, DHCPREQUEST);
    packet.xid = xid;
    packet.ciaddr = ciaddr;

    add_param_req_option(&packet);
    bb_info_msg("Sending renew...");
    if (server)
    return udhcp_send_kernel_packet(&packet,
    ciaddr, CLIENT_PORT,
    server, SERVER_PORT);

    return raw_bcast_from_client_config_ifindex(&packet);
    }


    So it seems that there is a build in option for broadcast renew. That is what we see for last request. However, what is going on with previous request ? Not clear, but may unicast packet formed in wrong way ?
     
  4. rameshb_v

    rameshb_v LI Guru Member

    I am trying to set up transmission torrent. I searched but could not find any complete guide on this. Can you any one plz help me on this install ?
     
  5. teddy_bear

    teddy_bear Network Guru Member

    rameshb_v,
    There's a whole thread here dedicated to installing Transmission, and more if you search.

    flammenwurfer,
    miniupnpd is NOT a media server - it's a upnp daemon which automatically open ports on the router by requests from client applications. There's no built-in media server in this firmware. If you need one, you can, for example, install Optware uShare.

    shap123,
    Yep, the send_renew() is trying to send unicast messages first - up to several times - and if still unsuccessful when the lease is about to expire, it fails over to broadcasting a request. Are you saying that nothing shows up in tcpdump while it's trying to unicast requests to a specific server address?
     
  6. shap123

    shap123 Networkin' Nut Member

    Exactly. It may be related to L2TP, otherwise I think other people were already found that. I re-checked this several times - no outgoing unicast requests is logged. However, broadcast request and answer is logged ok. I opened FW for all 67/68 traffic from any to any. no blocking event is logged to those ports.

    P.S. I see in the code lines like : DEBUG("Entering rebinding state"); - is there a way to see those debug messages in the /var/log/messages ?
     
  7. teddy_bear

    teddy_bear Network Guru Member

    For that you have to recompile busybox with UDHCP_DEBUG turned on...
     
  8. king2000

    king2000 LI Guru Member

    Wireless range after upgrade.

    I had some L2TP reconnect problems and was happy to get it fixed by using the latest mod, however, after the upgrade my wireless range has shortened, I was able to connect using my IPhone at my house on the first floor (router on the second) with no problems before. Nothing was changed except the firmware, settings was still intact after the upgrade. I was wondering if there's anything to do with the matter, because it really fixed the L2TP reconnect issues I've been having, but with wifi not working good this is bad for me.
    I'm using a Linksys WRT54GL router, and the latest firmware which is "Tomato Firmware v1.27.8745 ND Std", I was using the regular Tomato 1.27 firmware before.

    Thanks
     
  9. teddy_bear

    teddy_bear Network Guru Member

    The wi-fi driver in this mod is not the same, and can behave totally different with the same settings (the difference is more significant if you upgraded from non-ND Tomato version). You will need to play with wireless channel used, and various "Advanced Wireless" settings.
     
  10. dutch

    dutch Networkin' Nut Member

    fyi, for anybody reading this thread. I was able to recover mine by following the method detailed in these comments:

    http://www.myopenrouter.com/article...500L-Using-A-USB-TTL-Cable-on-Windows/?page=3


    I didnt need the USB-TTL cable, all I had to do was short 2 pins on the board, and tftp the stock firmware. I did this around 4-5 times with no side effects.
     
  11. genjuro

    genjuro Addicted to LI Member

    WL-520GU CPU Clock

    Hi all :)

    I recently received a Asus WL-520GU, i flash it with teddy's VPN_Mod, everything is working, just a little details is annoying me, when i do in the terminal:

    cat /proc/cpuinfo

    I get only 200 Mhz of CPU Speed, i also tried to force the 240 Mhz with:

    nvram set clkfreq=240,120
    nvram commit
    reboot

    Nothing happens...still at 200 Mhz...i tested with dd-wrt and it runs at 240 Mhz, i also checked Broadcom website and it also confirms this cpu clock speed:

    "BCM5354

    240-MHz MIPS32® CPU core with 16-KB instruction cache, 16-KB data cache, and 1-KB pre-fetch cache"

    Any clue?? :)

    Thankx....:cool:
     
  12. jinx

    jinx Addicted to LI Member

    "* Fixed slow running clock problem on Asus WL-520GU (This fix is included into official Tomato releases starting from Tomato 1.24. In build 37 or later of this mod one extra reboot after flashing is no longer needed for this fix to take an effect)." -- Known problem with the Asus WL-520gU.
     
  13. genjuro

    genjuro Addicted to LI Member

    Well...maybe one day it will be really fixed...if i manage to find a workaround i will post it here...

    [[]]
     
  14. teddy_bear

    teddy_bear Network Guru Member

    If you search this forum, you'll find out that overclocking is NOT possible with WL520GU. Not fixable. Search for details.
    "Slow running clock" is different, although related, issue - and that one is fixed.
     
  15. kastytis75

    kastytis75 Addicted to LI Member

    Any news about DIR-320?

    Any news about DIR-320 and clear nvram (reset) killer?
     
  16. teddy_bear

    teddy_bear Network Guru Member

    kastytis75,
    It should be fixed in git (hopefully)... But not tested.
    If you're willing to test this fix, please let me know and I'll send you a test build.
     
  17. king2000

    king2000 LI Guru Member

    Question is what settings, because all settings before worked perfectly. Is there a way to downgrade the wi-fi driver in the router to the regular one used by the firmware ?
    Or, can you give me some ideas what changes might help the matter of signal range in the new wi-fi driver.
     
  18. teddy_bear

    teddy_bear Network Guru Member

    To downgrade the driver, use vanilla Tomato with old driver ;).
    No, I can't tell you which settings. Could be [almost] anything from the Advanced Wireless page. Wirelss encryption can affect it too. But start from experimenting with different channel numbers...
     
  19. idigg

    idigg Addicted to LI Member

    Need some advice...

    I have an Asus WL-520gU. I just switched from DSL to Road Runner powerboost today. I'm getting 25Mbps download powerboost on my desktop, then it drops to 15Mbps.

    On my laptop, I'm only getting 14-15Mbps, no powerboost. If I hardwire my laptop to the router, I get 25Mbps download then it drops to 15Mbps, so it's the wireless settings.

    I have Transmission rate set to Auto, and it is running at 36Mbps mode on auto, so I think that is my issue. When I manually set it to 54Mbps, my laptop won't connect to anything, I can actually ping the router but I can't login to the router nor view web pages. Weird.

    Any ideas?
     
  20. yungchen

    yungchen Guest

    delete folder on share ntfs usb drive

    sorry, maybe someone already ask same question. but I need help with this problem.
    I have download tomato-1.27-NDUSB-8744-Ext.rar and install on my 520gu. Everything was work. only the samba share. I can see my usb drive share and i can read and write. but i am not able to delete folder if there is file inside the folder. is anyone have same problem? please let me know how to solve this problem.

    thanks a lot.
     
  21. mirovic

    mirovic Networkin' Nut Member

    After reset you can login to router via wi-fi. Just click Save button on basic network setup menu and you can access router from LAN
     
  22. king2000

    king2000 LI Guru Member

    allright, I'll try those things...
     
  23. tmpid

    tmpid Networkin' Nut Member

    Sorry if the issue is unrelated. I was trying to run the OpenVPN server on UDP port 53 but the OpenVPN server won't start, probably because the dnsmasq is preventing anything using port 53. So I tried to run the OpenVPN server on UDP port 1149 and use iptables to make incoming traffic to UDP port 53 redirect to port 1149. I followed the guide on the dd-wrt wiki: http://www.dd-wrt.com/wiki/index.php/OpenVPN#Yet_another_evolution and used the following command:

    iptables -t nat -I PREROUTING -p udp -i vlan1 --dst my.dyndns.domain --dport 53 -j REDIRECT --to-ports 1149

    But the router gave the error message: iptables: No chain/target/match by that name

    From my limited knowledge, I don't see any error with the command. So is there anything missing here I need to config with Tomato? Thanks.
     
  24. jinx

    jinx Addicted to LI Member

    Why would you try to use the port assigned to DNS with OpenVPN? You should stick with the std. UDP port of 1194 and 443 TCP (the latest OpenVPN v2.1.1 supports HTTPS handoff when using port 443).
     
  25. tmpid

    tmpid Networkin' Nut Member

    OK.. It looks like the target REDIRECT is not there so I changed it to DNAT. Now the rule is working.
     
  26. BRAND

    BRAND Addicted to LI Member

    Hello all

    I have an issue with last version (tomato-ND-1.27.8745-Std).

    It seems, that problem's source is MTU value. In my case standard MTU (1460) for L2TP dialer blocks me from my favorite forum. After many investigations and change MTU to 1420( and smaller values) the problem was fixed. It seems, that problem was fixed. :)

    1. Is the MTU full size of frame, or size of the data in IP packet?
    2. What is the recomendations about MTU in my case? ( Israel cabel provider HOT & ISP 014.net.il)
    3. It is problem of infrastructure provider or ISP?

    Thanks
     
  27. melcug

    melcug Addicted to LI Member

    Speed benchmark

    Can you provide some results from tests of speed about ASUS WL520GU router on WAN, lan and wifi connections like:

    Version: tomato-NDUSB-1.27.8745-Std
    Interface Protocol Speed
    WAN Speedtest.net 25.87mbps
    LAN FTP 32.24mbps
    Wireless Torrent 21.63mbps
     
  28. tmpid

    tmpid Networkin' Nut Member

    I have found that adding a couple of lines/comments to the Administration->Scripts or the VPN keys will corrupt/erase some of the VPN settings (port, subnet, etc.). Does that mean the router is running out of disk space which results in the settings being overwritten by other files(corrupted file system), or is it a bug?
     
  29. teddy_bear

    teddy_bear Network Guru Member

    tmpid,

    The NVRAM size is 32KB, and there's no protection against data corruption in the NVRAM driver. If you run out of nvram space, you'll start loosing your settings. This is not actually a bug - this is just the way Broadcom choose to implement it (to minimize any overhead I guess).

    Did you do the "thorough" NVRAM erase with following manual reconfiguration after installing this firmware for the first time? If not, do it now - it may free a bunch of nvram space (and it must be done anyway when switching firmwares).
    To see how much space it currently uses, run
    nvram show | grep "bytes used"
    command. If the number displayed is close to 32KB, try to clean up some of your settings manually. One of the alternatives is to store your VPN keys in files on JFFS - search the VPN mod threads for a discussion about this.

    As for the REDIRECT, it is there - you just need to load the module first:
    modprobe ipt_REDIRECT
     
  30. tmpid

    tmpid Networkin' Nut Member

    Some testing result: if the length of the init script > 496 bytes, the settings in VPN server begins to corrupt. The first setting corrupted is the VPN server 1 port. The longer the init script, more settings will be corrupted.

    The VPN server 2 server certificate cannot be saved. I haven't found out which lengthy script/setting is overwriting/erasing the certificate.
     
  31. tmpid

    tmpid Networkin' Nut Member

    Oh great! Thanks! Didn't see your post. "nvram show" shows it is 2 bytes free... I did the nvram erase with the 44 release. I will try it again with this release to see if I can save a little space. Thanks.
     
  32. tmpid

    tmpid Networkin' Nut Member

    I did the NVRAM erase with the 45_VPN, however the router would not get an IP from the cable modem (DHCP) for whatever I tried. Reset, reflash, restore config, tweak, anything,,, Finally I flashed the 45_ext version and the router connected fine. Then I re-flashed 45_VPN and everything worked fine again. Hope this experience helps someone. After the NVRAM erase, now the NVRAM has 12KB left after being fully configured. It's a pleasing figure that also tells me to erase NVRAM after each upgrade. Thanks teddy_bear and everyone.
     
  33. halcut

    halcut Networkin' Nut Member

    Hi guys,

    I just bought Asus WL-520gu and want to install this firmware. I have read through many posts here and got kinda confused with different versions available.

    I want to connect external harddrive and HP 1018 printer to the router through usb hub. I also want to install mjproxy and vpn. Which one is the right version given that this router has only 4mb flash.

    Thanks in advance.
     
  34. CBC888

    CBC888 Networkin' Nut Member

    I have been using the Tomato USB firmware with my RT-N16 for the past week, and I am extremely pleased with the results.

    I do have one (minor) problem/bug, however... I (re)formatted a 1 TB Western Digital My Book external USB drive to the ext3 filesystem (using GParted) and connected it to the RT-N16. Tomato detected and mounted it right away, and I was able to transfer 82 GB of data onto it without any problems. However, when the drive is listed in My Compter and/or Windows Explorer (I am running Windows 7 Ultimate x64), it displays "61.7 MB free of 62.1 MB"!?! :confused:

    Functional-wise, the USB drive works perfectly; but it would seem that incorrect (display) information is being passed to the OS (by the Tomato firmware?)...

    Has anyone else encountered this problem and perhaps found a solution?​
     
  35. telnet

    telnet Guest

    also may i know if this one got MLPPP supports as well?? i have the ASUS RT-N16 with v1.27 beta 11, it's working great,, but is there an one with Mlppp??

    thanks.
     
  36. mwsealey

    mwsealey Addicted to LI Member

    Just a FYI changing it to .bin didn't do a damn thing, DD-WRT refused to accept it. I don't think the guide at the beginning of the thread takes into account braindead changes in DD-WRT since it was written :D
     
  37. teddy_bear

    teddy_bear Network Guru Member

    halcut,
    4MB flash it not enough for everything you need. Looks like you'd be better off installing VPN build... It won't have JFFS space to keep HP1018 firmware and mjproxy binary on the router - so you'll have to attach additional USB storage (a flash drive) to the router to store these files.
    If you install any other build, you'll have some JFFS space on the router for additional files, but no built-in VPN server - so you'll need to install and configure Optware OpenVPN (also on an extra USB storage) yourself.

    CBC888,
    It might be a (cosmetic) Windows issue - not Samba. I don't have any Win7 clients now to test, but in Vista and XP Windows Explorer doesn't show the size of the network shares at all - only the space used by files in directories (or maybe I just don't know where to look). However, when I use FAR, it correctly shows the total size of the shared drive (1 TB), as well as available space.

    telnet,
    MLPPP is not implemented in this mod.

    mwsealey,
    Really? DD-WRT recently made changes to disable flashing with "plain" TRX?? Sounds ridiculous...
    EDIT: Hmm - looks like they are removing the checks for ".bin" extension: http://svn.dd-wrt.com:8000/dd-wrt/changeset/14403... Can you point to a code in dd-wrt SVN that may prevent it to flash Tomato?
     
  38. CBC888

    CBC888 Networkin' Nut Member

    Windows 7 displays the correct size and space information with the stock ASUS firmware, which is why I tend to think that it is a problem with the Tomato firmware or some sort of compatibility issue.

    The sizes are displayed underneath the network drives in Windows 7 My Computer, although you can also right-click and choose Properties to view the same information.

    Wow! This looks like the old Norton Commander back in the early 90's! Brings back memories... :rolleyes:
     
  39. halcut

    halcut Networkin' Nut Member

    Thanks for the response teddy_bear.. thats what I did. I installed std build and installed HP1018 firmware. Now that I have got my USB external drive attached to router - I am planning to install and configure Optware OpenVPN, Samba3 (you mentioned in one of the posts that its useful for windows 7 clients) and mjproxy.

    My question is - I was going thru trmfreitas steps to setup Optware and he mentioned
    "Everytime you restart you have to add ipkg.conf again". Not sure what that means.. I want to set this up in a way that I do not need to do anything once configured. Is there an easier way to setup Optware without this limitation?

    Also if I unplug my usb drive once the router is up - would the openVPN service work while the router is up or do I need to always keep usb drive plugged in? Sorry if its a silly question.. kinda new to all this.
     
  40. ray123

    ray123 LI Guru Member

    Everytime you restart you have to add ipkg.conf again". Not sure what that means.. I want to set this up in a way that I do not need to do anything once configured. Is there an easier way to setup Optware without this limitation?

    You can put "something.autorun" script(s) in the root directory of your USB drive partition and they will get executed when the partition gets automounted. That's what I use to start up swap, load mpd, load a software watchdog, etc. Just put the commands you want in the script.

    Also if I unplug my usb drive once the router is up - would the openVPN service work while the router is up or do I need to always keep usb drive plugged in? Sorry if its a silly question.. kinda new to all this.

    There are no silly questions. Except perhaps, "Don't you think it's time you audited my tax return?" :)

    The drive must stay mounted and readable. Linux will do demand paging of the executable file as needed. Any optware shared libraries that are on the drive must be readable as well. If a program doesn't use any optware shared libraries and is small enough, you can copy it to /tmp and execute it from there.
     
  41. teddy_bear

    teddy_bear Network Guru Member

    What Tomato build/version are you running? The latest beta11?
     
  42. CBC888

    CBC888 Networkin' Nut Member

  43. wongnog

    wongnog LI Guru Member

    I just upgraded two routers to tomato-NDUSB-1.27.8745.01-Ext. My main router is a Linksys WRT54GL that I have set up in Access Point mode, the other is an Asus WL520GU set up in Wireless Ethernet Bridge mode. I noticed that in this latest firmware, if I choose either Wireless Client mode or Wireless Ethernet Bridge mode, the Wireless Channel field is missing. This is in the Basic --> Network tab. Is this a bug?
     
  44. teddy_bear

    teddy_bear Network Guru Member

    wongnog,
    Not a bug. Think about it - it's a client mode... Do you ever need to specify a channel on your notebook when connecting wirelessly to the router?
     
  45. wongnog

    wongnog LI Guru Member

    Well after upgrading to NDUSB-1.27, I am unable to set up Wireless Ethernet Bridge mode on my 2nd router. My main Linksys router is on Channel 1, but when I set up my Asus router to bridge mode the channel field is missing. When I go to Status --> Overview I see it is set on Channel 6. The only way I can change it is switch to Access Point mode, switch to channel 1, save, then go back to wireless bridge mode. But even after all these steps I can't get my Asus router to act as a wireless bridge, but I am using the same setups as before on older drivers. I did clear NVRAM thoroughly on both routers.

    BTW I'm following this post for setting up a wireless bridge. I got it to work when I had both routers on Victek 1.25 but decided to update them to your drivers.
    http://www.linksysinfo.org/forums/showpost.php?p=350709&postcount=2
     
  46. teddy_bear

    teddy_bear Network Guru Member

    wongnog,
    To clear things up - wireless channel setting in wireless client modes has no effect - period. Only after your client router is actually connected to the AP, the setting is automatically updated to the channel the client is connected on. Whatever connection problems you're having have nothing to do with the channel selection on the client.

    What's important though is that your wireless network mode (you can use "Auto" on the client) and security settings (SSID, encryption, shared key) on the client router match the same settings of the main router. Also, you can specify combined WPA/WPA2 security on the main router, but on the client only select one - either WPA or WPA2.

    BTW, I have 2 Asus routers (RT-N12 and WL520GU) running in the wireless bridge mode with no issues.
     
  47. jack_561

    jack_561 Guest

    Clear things up..

    I downloaded this so that I could have NTFS support for an external hard drive. I installed the extras version and got the hard drive running under samba.

    The problem is that DHCP does not seem to work. It just gets stuck on renewing. I find this odd since DD-WRT works straight out of the box, no configuration needed. If its any help, I'm in university halls and I get an ethernet port in the wall. I simply want to broadcast that for myself using tomato as an access point.

    Reinstalling DD-WRT means that it works again, perfectly. I have been through all settings that seem relevant but can't seem to come up with anything. Any help?

    edit: On an asus WL520GU
     
  48. teddy_bear

    teddy_bear Network Guru Member

    jack_561,
    You didn't mention if you clear NVRAM ("thorough" option!) after installing Tomato, and then reconfigured manually (without reloading the settings). If not - you need to do it. If yes - try to reboot/power-cycle the router once again, and maybe check or uncheck "Reduce packet size" option...
    Also note that the default MAC address of the WAN port could be different from what it was with DD-WRT - not sure if MAC matters at all in your environment.
     
  49. Sopmod

    Sopmod Network Guru Member


    Does anyone have any thoughts on the quoted situation?
     
  50. genjuro

    genjuro Addicted to LI Member

    Hi all :)

    I have a Asus WL500GPV1 running Openwrt 10.3 (atheros wifi), and a ASUS WL520GU running the VPN mod, the first one is connected to the internet (WAN Port) and the second is only used to VPN access, everithing is running great, i have just one question... how can i start VPN Server 1 automaticly? I just see the option "Start with Wan" and with this option it starts automaticly, but since i don't have a WAN connection in the WL520GU router, how can i workarround the situation?

    I checked the linux structure of this firmware and there is no /etc/init.d to run startup scripts, and i didn't figure out, how to add a startup script to launch automaticly the VPN server...

    Thank you all :)
     
  51. bluechalk

    bluechalk Networkin' Nut Member

    USB stick FAT filesystem with no partitions

    I have a USB stick with no partitions, just a FAT filesystem on the entire device. I'm running Tomato version 1.27 on an Asus WL-520GU. I can't mount it from the Tomato GUI. But, I can mount it with the following commands:

    # mkdir /mnt/s1mp3
    # mount -o noatime,rw,umask=0000 /dev/scsi/host0/bus0/target0/lun0/disc /mnt/s1mp3

    By the way, here's the filesystem listing:
    # cd /dev/discs
    # ls -l
    lr-xr-xr-x 1 root root 31 Dec 31 1969 disc0 -> ../scsi/host0/bus0/target0/lun0

    # cd ../scsi/host0/bus0/target0/lun0
    # ls -l
    brw------- 1 root root 8, 0 Dec 31 1969 disc

    It mounts automatically in both Windows and OS X. Would it be possible to add support in a future version?
     
  52. ray123

    ray123 LI Guru Member

    It should work. Check to make sure that you have automount enabled and FAT support checked.

    What gets printed to syslog (/var/log/messages) when you plug it in?

    BTW, it *does* have partitions.

    [edit] Oh..... you said 1.27. Do you mean ND-USB? If not, then that's why it won't mount. Go to the 1st post for the download link.
     
  53. bluechalk

    bluechalk Networkin' Nut Member

    Yes, I am running ND-USB 1.27. I've had several other USB memory sticks automount with no problem, but they all had a partition. Here is the syslog from the one that doesn't work...

    May 10 08:48:44 RT-E0CB4E7AAAF8 user.info kernel: hub.c: new USB device 00:03.1-1.4, assigned address 13
    May 10 08:48:45 RT-E0CB4E7AAAF8 user.warn kernel: Vendor: Model: Rev:
    May 10 08:48:45 RT-E0CB4E7AAAF8 user.warn kernel: Type: Direct-Access ANSI SCSI revision: 02
    May 10 08:48:45 RT-E0CB4E7AAAF8 user.warn kernel: Attached scsi removable disk sdb at scsi0, channel 0, id 0, lun 0
    May 10 08:48:45 RT-E0CB4E7AAAF8 user.warn kernel: sdb: Waiting for disc 1 to settle.
    May 10 08:48:45 RT-E0CB4E7AAAF8 user.warn kernel: SCSI device sdb: 8039345 512-byte hdwr sectors (4116 MB)
    May 10 08:48:45 RT-E0CB4E7AAAF8 user.warn kernel: sdb: Write Protect is off
    May 10 08:48:45 RT-E0CB4E7AAAF8 user.info kernel: /dev/scsi/host0/bus0/target0/lun0:
    May 10 08:48:45 RT-E0CB4E7AAAF8 user.warn kernel: USB device reconnected to the SCSI subsystem. lun 0
    May 10 08:48:45 RT-E0CB4E7AAAF8 user.debug kernel: WARNING: USB Mass Storage data integrity not assured, unmount it before unplugging
    May 10 08:48:45 RT-E0CB4E7AAAF8 user.debug kernel: USB Mass Storage device found at 13. Host: 0
    May 10 08:48:45 RT-E0CB4E7AAAF8 user.debug hotplug[7227]: Attached USB device /proc/bus/usb/001/013 [INTERFACE=8/5/80 PRODUCT=10d6/1101/100]
     
  54. teddy_bear

    teddy_bear Network Guru Member

    Yep, I've seen this once before when the disc didn't have any partitions...

    For K26 builds I already added a code to auto-mount such discs - but I have not ported it back to K24-based version yet. Hopefully will be in the next build.

    Can you post the output of
    Code:
    cat /proc/partitions
    fdisk -l
    
    with this drive plugged in?
     
  55. bluechalk

    bluechalk Networkin' Nut Member

    I'm running the std build, and don't have fdisk. Would it be possible for you to tell me where to find the executable, or could you post it here? I can run it from /tmp.
     
  56. teddy_bear

    teddy_bear Network Guru Member

    You still can run "cat /proc/partitions" - that was another command I asked about....
     
  57. bluechalk

    bluechalk Networkin' Nut Member

    root@RT-E0CB4E7AAAF8:/tmp/home/root# cat /proc/partitions
    major minor #blocks name

    8 0 4019672 scsi/host0/bus0/target0/lun0/disc
     
  58. bluechalk

    bluechalk Networkin' Nut Member

    I found fdisk from the link on the first page of this thread. Here's the output:

    # fdisk -l

    Disk /dev/scsi/host0/bus0/target0/lun0/disc: 4116 MB, 4116144640 bytes
    127 heads, 62 sectors/track, 1020 cylinders
    Units = cylinders of 7874 * 512 = 4031488 bytes

    Device Boot Start End Blocks Id System
     
  59. teddy_bear

    teddy_bear Network Guru Member

    bluechalk,
    Thanks. That's what I expected - just needed the confirmation. I added the code to handle such "no-partitions" discs properly, so will be in the next build.
     
  60. CBC888

    CBC888 Networkin' Nut Member

    I realize that this is only a cosmetic issue (hopefully, it's only that), but has anyone else encountered this and determined the cause and solution? Thanks in advance!​
     
  61. andy

    andy Addicted to LI Member

    I have several WL-520GU with v1.27.8744 vpn3.6, the VPN server and client do not start with WAN in one of the routers (with "Start with WAN" checked), I have to click "Start Now" every time after this router reboots.

    Could any one tell me how to start the VPN (for v1.27.8744 vpn3.6) by command line ? I think I can put it into the WanUp Script.
     
  62. Trigunflame

    Trigunflame Networkin' Nut Member

    Any work around for this error "The field "wl_nmode_protection" is invalid" in the tomato-ND-1.27.8745-Std version? Happens when trying to save advanced wireless settings.
     
  63. teddy_bear

    teddy_bear Network Guru Member

    andy,
    You'd better ask on VPN mod thread how to manually start the server.
    Also, try to upgrade to build 45 - the problem with service not being started automatically might be solved in the last build.

    Trigunflame,
    What does "nvram find mode_protection" command show?
    What is the value of "CTS Protection Mode" field in the GUI on the ""Advanced->Wireless" page?
     
  64. Trigunflame

    Trigunflame Networkin' Nut Member

    Let me get back to you, I'll have to reinstall it as I already flashed to beta 1.28.1811

    Btw, do you recommend the 2.6 kernel version over this one for a WHR-HP-G54?
    (I do a lot of torrenting as well, would this factor into the decision making process?)

    Update:
    Ok, I reinstalled "tomato-ND-1.27.8745-Std".
    Funny enough, going to the advanced wireless page and clicking save worked without error initially.
    However, once I went ahead and erased the NVRAM as I am accustomed to doing after a firmware change via "Erase all data in NVRAM memory(thorough)" on the configuration page - the error came about once more.

    The results were as follows for "tomato-ND-1.27.8745-Std":
    root@unknown:/tmp/home/root# nvram find mode_protection
    wl0_gmode_protection=off
    wl0_nmode_protection=off
    wl_gmode_protection=off
    wl_nmode_protection=off

    CTS Protection mode is set to "Disable*" on the advanced wireless page.

    Update 2:
    Flashed "tomato-K26-1.27.9045MIPSR1-beta11-Std.trx" and am getting the same error.

    root@unknown:/tmp/home/root# nvram find mode_protection
    wl0_gmode_protection=off
    wl0_nmode_protection=off
    wl_gmode_protection=off
    wl_nmode_protection=off

    CTS Protection mode is set to "Disable*" on the advanced wireless page.
     
  65. cygni

    cygni Addicted to LI Member

    WL500-W wireless issues

    Not sure if this is a fault of mine but basically I am running two WL500-Ws in WDS. When the first support for N mode came out (43?), my TX/RX rate was usually 130. Although I never got to test the actual speeds (at the time I was having harddrive issues on my nas). Now I have upgraded to 45 and I can't get more than 6/6 and I transfer at like 160kb/s over wireless.

    I am fairly certain I didn't change anything else other than that.
    My settings on the main router (secondary router match these) are
    Code:
    Wireless mode: Access Point + WDS
    Wireless network mode: Auto  (i have tried N only but same results) 
    Channel: 14
    Channel width: 20 mhz
    
    Anyone got any ideas as to why this wireless speed decrease?
     
  66. capcase

    capcase Networkin' Nut Member

    Teddy_bear, thanks for the great mod. how to add VPN functionality on top of your mod(tomato-1.27-NDUSB-9042-RTN16-beta2)? I really need both USB and VPN. sorry if the questions has been asked before.


     
  67. capcase

    capcase Networkin' Nut Member

    windows visa access USB shared drivers always fail

    hi, I am using teddy_bear's mod for Assus RT-N16. USB driver is properly mounted, and samba shares can be viewed from windows.

    the problem is if samba share is protected with user name: nas and password, I can access from windows xp, but can't access from windows vista. windows vista prompts the password dialog again and again.

    if no protection, windows vista ok

    any tip?
     
  68. teddy_bear

    teddy_bear Network Guru Member

    Thanks! I think I found the problem. It's strange that it was there in the last several builds, and people just started to notice it now. I'll fix it in the next build. Until then, I don't have a good workaround though...
    Try switching "CTS Protection Mode" to another value before saving - it may help.

    1. READ THE 1ST POST!
    2. Where did you dig up the old beta2 from?? The latest for N16 is beta11...
     
  69. Trigunflame

    Trigunflame Networkin' Nut Member

    Unfortunately not ;/ I'm debating whether I should just go back to the beta 1.8.1812 in the meantime so I can actually set the wireless options.. lol.
     
  70. capcase

    capcase Networkin' Nut Member

  71. eibgrad

    eibgrad Guest

    Bind Printers to Specific Devices?

    ASUS WL-520GU
    Tomato Firmware v1.27.8744 vpn3.6 ND USB VPN

    Thanks so much for this teddy bear mod. It works great. I currently have an ASUS WL-520GU and powered USB hub supporting one flash drive and two printers (Brother HL-2140 and Samsung ML-2010). But I ran into a small problem. If this has already been asked and answered, my apologies, but I just couldn't find any references in this thread or elsewhere.

    Of course I added a second P910ND process in my init script for the second printer:

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

    So my current (and desired) bindings are:

    lp0 HL-2140
    lp1 ML-2010

    That’s all well and good, and it works. But I've noticed it's possible the binding may change should the router be rebooted. IOW, it may be reversed:

    lp0 ML-2010
    lp1 HL-2140

    Of course at that point printing stops working. It just seems to be the luck of the draw depending on which printer gets detected first. And it’s not consistent. It seems the only way to correct it is to reinsert the USB cables manually, in order (first the HL2140, then ML-2010). A bit annoying.

    So I'm wondering, is there a way to permanently bind each printer to a specific device (lp#) so I can avoid this problem? My Linux skills are limited so any help would be appreciated.

    TIA
     
  72. cygni

    cygni Addicted to LI Member

    Ok so I flashed back to v44, same results so I am back at 45

    I realize now that the router will only operate in Wireless B mode. Both my iphone and laptop when they connect get 11/11 and the routers when connected to each other via WDS get 5.5/5.5 (11/2 presumably because of WDS)

    When I attempt to set the router G only, both the iphone and laptop see the network but are unable to connect.

    I did reset the router back to defaults and recreate my setup incase there was something I have changed to cause this issue but this didn't help.

    Anyone have any ideas what might have caused this.
     
  73. ray123

    ray123 LI Guru Member

    Hmmmm. In all my testing, all the USB devices are enumerated in a specific order, and it's always the same. Tested only with discs, though--not printers. It checks each port on the hub in port order, so on reboot or plugin the devices always get the same order. Look at your syslog and see if this is the case. "tail -f /var/log/messages". Then unplug and plug the hub and see what happens. I guess it's possible that the printers are asleep and one sometimes wakes up a little bit sooner than the other.

    Maybe you could try adding another cheap hub for the device you want to be last---that will delay it being enumerated.

    Other than that, you might need to force an enumeration. The only way I can think of is to rmmod usb-ohci, wait a few seconds, and then insmod it. 'course, that will affect your USB drives (if any), too.

    Or maybe rmmod/insmod printer.

    Oh, you said limited Linux skills----that may be a problem. If any of this works, you'll have to write a script to automate it. If nothing easy works, you'll need a script to test which printer is which, and modify the p910nd command accordingly.

    BTW, this is why I came up with the technique for mounting disks according to their label---otherwise they were coming up in random order.
     
  74. contrary

    contrary Addicted to LI Member

    Is that the technique you said you were going to document among other things after your boat ride?
    Just asking ;-) but it would indeed be well-appreciated if you could please, when you get a chance.... I gave up trying to follow LA's excited but incomplete attempts, and have been patient, until now I guess. Thank you regardless, for being one of the coherent and informative ones.
     
  75. teddy_bear

    teddy_bear Network Guru Member

    Uhm... What to document about that ;)? It works by itslef...
    Just label the partition, and it will be auto-mounted to the directory with the name matching the label, and auto-shared with the same share name.
    If you want your partition to be mounted to an existing directory, like /opt or /mmc, use /etc/fstab file and add a line there to specify the mount point (again - based on the partition label or UUID), for example:
    Code:
    LABEL=optware  /opt  ext2  rw,noatime,nodev 0  1
    If you search this thread, as well as another one, you can find more details regarding this...
    Unfortunately the technique that works for USB drives to mount them by labels doesn't help with printers. But of course there is a way. Although you'll need to learn some linux scripting skills for that, or wait for someone else to write a script for you. When the printer is connected to the router, the file /proc/usblp/lp0 (or lp1, lp2 etc) is getting created. You can read this file with "cat" command - it contains the printer's brand name and model, i.e.:
    Code:
    Manufacturer=Brother 
    Model=HL-2140 series 
    In your USB hotplug script, you can loop through all the files in /proc/usblp directory, start p910nd instances according to the model name and your desired port mapping. For example, if lp0 file contains "ML-2010" string, you can start p910nd for lp0 on port 9101:
    p910nd -b -f /dev/usb/lp0 1.
    This is just the idea to point you to the right direction... You'll also need to check for p910nd already running etc...
     
  76. teddy_bear

    teddy_bear Network Guru Member

    Ah, I know why ;)... That's not a bug, and not a problem...

    You must be looking at a share that has a root in the router's tmpfs (which is the router's RAM) - probably "/mnt". The kernel gives half of the system RAM to tmpfs, so the total size you see is about a half of the RT-N16 128MB RAM.

    If you'll look at a share with the root on the USB drive instead, you'll see the size of the USB partition. If you enable auto-share, the router will create separate Samba shares for each mounted partition, and there you should be able to see the real partition size.
     
  77. CBC888

    CBC888 Networkin' Nut Member

    I sort of understand... is there any way for me to "fix" this in Windows Explorer?

    The drive DOES show correctly in "USB Support" in Tomato. I essentially used all the defaults that were set by Tomato when mounting the drive and creating the share(s). I believe the only things that I changed were "Auto-share all USB Partitions" and I set the "Default Share" (/mnt) to "Read/Write" as shown below:

    [​IMG]

    In Windows Explorer, there are 2 folders underneath the "RT-N16" network device:

    sda1 (Read-Only)
    share\sda1 (Read/Write)


    So I mapped a network drive to \\RT-N16\share\sda1

    Everything works fine, except for the partition size.

    Should I re-map the drive differently? Do I need to create a subfolder within sda1 and move everything there?
     
  78. ghost2006

    ghost2006 Guest

    czemu tomato nie obsluguje funkcji asprintf.
    mam zainstalowane opt glibc uclib 09.28
     
  79. capcase

    capcase Networkin' Nut Member

    password

    how to allow different passwords for different shared folders? now it seems Tomato only support a set of username/password.

    or some folders are public, others are protected
     
  80. bhall7

    bhall7 Addicted to LI Member

    Thanks so much for this info. The problem I'm running into is that the /proc/usblp directory is empty. I see no lp0/lp1/lp2 files in there. What am I missing?

    I am running Tomato Firmware v1.27.9045 MIPSR2-beta11 K26 USB vpn3.6 and I have USB enabled on my RT-N16. I have successfully attached a USB storage device and am able to access it on the network. However, when I attach my printer (Brother MFC-7420) via USB, it does not show up in the list of connected USB devices.

    The boot up log shows:

    Code:
    Dec 31 17:00:07 tomato user.info kernel: usblp: USB Printer Device Class driver
    Dec 31 17:00:07 tomato user.debug hotplug[402]: Attached USB device 1-1:1.0 [INTERFACE=8/6/80 PRODUCT=1058/1021/2002]
    May 20 10:13:36 tomato user.info kernel: usbcore: deregistering interface driver usblp
    May 20 10:13:36 tomato user.info kernel: usbcore: registered new interface driver usblp
    May 20 10:13:36 tomato user.info kernel: usblp: USB Printer Device Class driver
    
    The following process appears to be running which suggests there is some printer support running:

    Code:
      778 root       588 S    p9100d -b -f /dev/usb/lp0 0
    I added the printer to my MAC based on the IP address (lpd://ipaddress) but printing fails.

    I apologize if this info has already been posted, but is there a printer tutorial somewhere or a wiki for Tomato USB that gives instructions on how to setup printers?

    Thanks in advance! Tomato USB ROCKS!!!!!
     
  81. bhall7

    bhall7 Addicted to LI Member

    OK, I think I finally got Tomato USB to see my printer because it's now showing up in the USB devices and in the boot up log:

    Dec 31 17:00:11 tomato user.info kernel: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04F9 pid 0x0180
    Dec 31 17:00:11 tomato user.info kernel: drivers/usb/class/usblp.c: usblp0 Device ID string [51]='MFG:Brother;CMD:pJL,HBP;MDL:MFC-7420;CLS:pRINTER;'
    Dec 31 17:00:11 tomato user.info kernel: usbcore: registered new interface driver usblp
    Dec 31 17:00:11 tomato user.info kernel: usblp: USB Printer Device Class driver

    I had to enable USB 1.1 Support both UHCI and OHCI, even though my printer is USB 2.0, and then it recognized it.

    The file /dev/usb/lp0 (which actually points to /dev/lp0) exists, but it is empty. I'm getting closer, but I think something is missing. Any suggestions would be greatly appreciated.

    Thanks!

    UPDATE: Finally got it working. I think I just had to do a reboot and when I added the printer on both my Mac and Windows boxes, it printed (via LDP on port 9100). Woo hoo! I am one happy Tomato user!
     
  82. ray123

    ray123 LI Guru Member

    USB 1.1 support always has to be enabled, because USB2 rides on top of it.

    BTW, UHCI and OHCI are different chipsets. A machine has only one of these, not both. It is useless, but doesn't hurt, to have both enabled. The driver for the non-existant one will refuse to load.
     
  83. teddy_bear

    teddy_bear Network Guru Member

    Set the "Auto-share" back to "Read/Write" (not "hidden"), and get rid of "Default share". For clarity, give your drive a label. See what shares you'll have then...
    Not possible with built-in functionality. 99% of home users don't really need more than one password for Samba file sharing (LAN only) secutiry, so for the sake of simplicity (both - coding and configuration) only one username/password can be configured via GUI.
    For file sharing via WAN you can use FTP, and FTP allows you to configure as many user accounts as needed.
    That's not entirely true. USB 2.0 EHCI driver is supposed to be backward compatible with USB 1.1 devices, and can handle most of them without OHCI/UHCI driver being loaded. However, the implementation is not perfect, and there are devices that just don't work without dedicated USB 1.1 driver. I normally have only EHCI driver enabled, and all my devices work fine with it. By the way, if the device is only recognized when USB 1.1 driver is enabled, it means it operates on USB 1.1 speed.
     
  84. pw44

    pw44 Networkin' Nut Member

    Does this mod (Tomato ND based) runs on the WRT54G-tm?
    TIA,
    Paulo
     
  85. ray123

    ray123 LI Guru Member


    That's interesting......
    Every single one of my USb drives-----hard drive, half-a-dozen USB sticks, CF-to-USB adapter-----require the OHCI driver. WL-520GU router. In fact, when I rmmod usb-ohci, the kernel gets the usb disconnect event just as if I had unplugged them. And when I insmod it back, they all do the usb connect events. Maybe it has something to do with the fact that there's a USB hub in the circuit? I've used two different hubs, both unpowered, and it's always worked that way for me.

    It's magic, I tell you---MAGIC
     
  86. Speedycat

    Speedycat Networkin' Nut Member

    Just wondering if this firmware has support for SD MMC. I soldered in my own sd card reader. I had it previously on dd-wrt but have no seen the option in Tomato yet. I tried using this version of the firmware with USB support but didn't see any SD support. Is there a package or different version of firmware I need to get in order for this to work? Any help would be appreciated :)
     
  87. Engineer

    Engineer Network Guru Member

    I think only older versions that have been modded have SD support.

    From...
    http://en.wikipedia.org/wiki/Tomato_(firmware)

    There are 3 versions that have SD support with the most recent version being the Thor mod.

    Thor (1.25 latest): http://www.linksysinfo.org/forums/showthread.php?t=61552
    Slodki (1.25): http://gemini.net.pl/~slodki/tomato-sdhc.html
     
  88. CBC888

    CBC888 Networkin' Nut Member

    I set the "Auto-share" back to "Read/Write" (since this only determines which shares are displayed and accessible via My Computer and Windows Explorer. I did not get rid of the "Default Share", since this was there by default to begin with - instead I set its Access Level back to "Read Only".

    Basically I was back to all the defaults for the "File Sharing". Now... what DID fix my "problem" was adding a new share for the Directory /mnt/sda1 and setting the Access Level to "Read/Write". Since this new share pointed to the root of my USB drive and not the router's tmpfs, the network drive correctly displayed "787 GB free of 916 GB" once I remapped it to the new share! :)

    Thank you for pointing me in the right direction!

    On a side note, however, is the router supposed to AUTOMATICALLY create Samba shares for each mounted partition? As it stands, it would appear that it only creates (Read Only) shares for the root (/) and /mnt directories.
     
  89. Speedycat

    Speedycat Networkin' Nut Member

    Okay thanks for the help. Guess i'll just have to install an older firmware version. Unless there's some way I can get it going on Teddy?
     
  90. bluechalk

    bluechalk Networkin' Nut Member

    I was hoping to use a USB serial adapter on my Tomato v1.27.8745 ND USB Std WL-520GU router. I found usbserial.o and pl2303.o on the dd-wrt website. But I can't install usbserial.o:
    I found a couple of posts explaining how to fix this in dd-wrt:
    https://dev.openwrt.org/ticket/706 and https://www.dd-wrt.com/phpBB2/viewtopic.php?p=220812&sid=cf44a718a17e7de6c4e4aa431e13a1ae.

    Is it possible to make the corresponding changes in Tomato? Is there a workaround so that I can get this working now?
     
  91. teddy_bear

    teddy_bear Network Guru Member

    Yes. If you want to see how it works, you need to do exactly what I suggested in previous post, and nothing else.
    You need to use modules compiled for Tomato, not for dd-wrt. They are available from Sourceforge download location in extras.tar.gz archive.
     
  92. bluechalk

    bluechalk Networkin' Nut Member

    That worked. Thank you. Now I can run heyu on the router to control all my X10 devices.
     
  93. CBC888

    CBC888 Networkin' Nut Member

    Okay, I did exactly what you suggested, but the only share that is there is the root share. Nothing else is "automatically" created. When I first upgraded to Tomato and everything was set at the defaults, I plugged in the USB drive and the only shares that were created (or perhaps they were already there to begin with) were the root and default (/mnt) shares.

    What "should" I be seeing?
     
  94. sfcfb

    sfcfb Networkin' Nut Member

    USB hard drive dismounts it's self

    Hi there, I recently got a WL-520GU and flashed this mod of the Tomato firmware on there so I could use my WD terabyte drive as a NAS. However, I seem to be having a stability issue with it. It seems to like to just auto dismount it's self, particularly while I'm transferring large files to it. Another weird thing is that I have this drive formatted NTFS, but Tomato is seeing it as vfat. Kinda strange... Anyone had this issue? Let me know what files and or screen shots you might need to see...thanks in advance!
     
  95. teddy_bear

    teddy_bear Network Guru Member

    If you left Samba settings at defaults ("Auto-share" is set to Read/Write, not Hidden), and do not see auto-created shares, then something is wrong.
    To verify - did you erase the nvram ("thorough" option) and manually reconfigured the router after installing Tomato for the first time? If you did, and auto-shares still don't work for you, post the output of the following commands with your drive attached:
    Code:
    nvram find smbd
    cat /etc/smb.conf
    mount
    
    Also, make sure you are not looking at the cached list of shares in Windows - try refreshing them.

    Sounds like something's crashing... Need more info. What Tomato edition you're using? Are you sure the drive is NTFS-formatted? Because all my NTFS drives show up as "ntfs" when not mounted, and "fuse" when mounted... Anything in the log after the file transfer fails? Does the drive still show up on the "Attached Devices" list in the GUI after the crash?
     
  96. dmb41crash

    dmb41crash Networkin' Nut Member

    I recently switched from official Tomato 1.27.1798 to the TeddyBear mod 1.27.8745 no-USB edition. So far everything is great, except I'm seeing these entries in the log that I didn't see with the official client:

    May 22 13:33:41 ? user.err kernel: CIFS VFS: could not find file instance for new file 80c394e0
    May 22 16:33:40 ? user.err kernel: CIFS VFS: could not find file instance for new file 808d1560
    May 22 19:33:39 ? user.err kernel: CIFS VFS: could not find file instance for new file 80c393e0
    May 22 22:33:41 ? user.err kernel: CIFS VFS: could not find file instance for new file 80dd7ec0
    May 23 01:33:40 ? user.err kernel: CIFS VFS: could not find file instance for new file 808d1f60
    May 23 04:33:40 ? user.err kernel: CIFS VFS: could not find file instance for new file 80c393e0
    May 23 07:33:40 ? user.err kernel: CIFS VFS: could not find file instance for new file 80c394e0
    May 23 10:33:40 ? user.err kernel: CIFS VFS: could not find file instance for new file 80be05a0

    I have all the options setup exactly as they were with the official release, and I did perform all the usual clear-NVRAM, reboot, etc. after upgrading.

    The CIFS is mounting just fine, in fact it seems like the bandwidth monitoring file is getting saved correctly every 3 hours, which makes the log entires even more perplexing! I've tried a number of things to see if I can fix the situation, including deleting and re-creating the log file, but the log entries persist. Help! :confused:
     
  97. sfcfb

    sfcfb Networkin' Nut Member

    Here's all I have in my log file, the dates are all wonky for some reason...
    Code:
    Dec 31 16:00:04 unknown syslog.info syslogd started: BusyBox v1.14.4
    Dec 31 16:00:05 unknown user.notice kernel: klogd started: BusyBox v1.14.4 (2010-04-06 01:51:06 EDT)
    Dec 31 16:00:05 unknown user.warn kernel: CPU revision is: 00029029
    Dec 31 16:00:05 unknown user.warn kernel: Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
    Dec 31 16:00:05 unknown user.warn kernel: Primary data cache 16kB, 2-way, linesize 16 bytes.
    Dec 31 16:00:05 unknown user.warn kernel: Linux version 2.4.37.9 (root@tomato) (gcc version 3.4.6) #2 2010-04-06 02:42:37 EDT
    Dec 31 16:00:05 unknown user.warn kernel: Setting the PFC to its default value
    Dec 31 16:00:05 unknown user.warn kernel: Determined physical RAM map:
    Dec 31 16:00:05 unknown user.warn kernel:  memory: 01000000 @ 00000000 (usable)
    Dec 31 16:00:05 unknown user.warn kernel: On node 0 totalpages: 4096
    Dec 31 16:00:05 unknown user.warn kernel: zone(0): 4096 pages.
    Dec 31 16:00:05 unknown user.warn kernel: zone(1): 0 pages.
    Dec 31 16:00:05 unknown user.warn kernel: CPU: BCM5354 rev 3 pkg 0 at 240 MHz
    Dec 31 16:00:05 unknown user.warn kernel: Using 100.000 MHz high precision timer.
    Dec 31 16:00:05 unknown user.warn kernel: Calibrating delay loop... 198.24 BogoMIPS
    Dec 31 16:00:05 unknown user.info kernel: Memory: 14332k/16384k available (1440k kernel code, 2052k reserved, 100k data, 80k init, 0k highmem)
    Dec 31 16:00:05 unknown user.info kernel: Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
    Dec 31 16:00:05 unknown user.info kernel: Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
    Dec 31 16:00:05 unknown user.info kernel: Mount cache hash table entries: 512 (order: 0, 4096 bytes)
    Dec 31 16:00:05 unknown user.info kernel: Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
    Dec 31 16:00:05 unknown user.warn kernel: Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
    Dec 31 16:00:05 unknown user.warn kernel: Checking for 'wait' instruction...  unavailable.
    Dec 31 16:00:05 unknown user.warn kernel: POSIX conformance testing by UNIFIX
    Dec 31 16:00:06 unknown user.info kernel: usb.c: registered new driver usbdevfs
    Dec 31 16:00:06 unknown user.info kernel: usb.c: registered new driver hub
    Dec 31 16:00:06 unknown user.info kernel: SCSI subsystem driver Revision: 1.00
    Dec 31 16:00:06 unknown user.info kernel: Initializing USB Mass Storage driver...
    Dec 31 16:00:06 unknown user.info kernel: usb.c: registered new driver usb-storage
    Dec 31 16:00:06 unknown user.info kernel: USB Mass Storage support registered.
    Dec 31 16:00:06 unknown user.info kernel: Journalled Block Device driver loaded
    Dec 31 16:00:07 unknown user.debug kernel: PCI: Setting latency timer of device 00:03.1 to 64
    Dec 31 16:00:07 unknown user.info kernel: ehci_hcd 00:03.1: PCI device 14e4:471a
    Dec 31 16:00:07 unknown user.info kernel: ehci_hcd 00:03.1: irq 6, pci mem b8003800
    Dec 31 16:00:07 unknown user.info kernel: usb.c: new USB bus registered, assigned bus number 1
    Dec 31 16:00:07 unknown user.info kernel: ehci_hcd 00:03.1: USB 0.0 enabled, EHCI 1.00, driver 10 Dec 2004/2.4
    Dec 31 16:00:07 unknown user.info kernel: hub.c: USB hub found
    Dec 31 16:00:07 unknown user.info kernel: hub.c: 2 ports detected
    Dec 31 16:00:07 unknown user.info kernel: usb.c: registered new driver usblp
    Dec 31 16:00:07 unknown user.info kernel: printer.c: v0.13: USB Printer Device Class driver
    Dec 31 16:00:08 unknown user.info kernel: hub.c: new USB device 00:03.1-1, assigned address 2
    Dec 31 16:00:08 unknown user.info kernel: hub.c: USB hub found
    Dec 31 16:00:08 unknown user.info kernel: hub.c: 4 ports detected
    Dec 31 16:00:08 unknown user.debug kernel: vlan0: dev_set_promiscuity(master, 1)
    Dec 31 16:00:08 unknown user.info kernel: device eth0 entered promiscuous mode
    Dec 31 16:00:08 unknown user.info kernel: device vlan0 entered promiscuous mode
    Dec 31 16:00:09 unknown user.info kernel: hub.c: new USB device 00:03.1-1.1, assigned address 3
    Dec 31 16:00:09 unknown user.info kernel: device eth1 entered promiscuous mode
    Dec 31 16:00:09 unknown user.info kernel: br0: port 2(eth1) entering learning state
    Dec 31 16:00:09 unknown user.info kernel: br0: port 1(vlan0) entering learning state
    Dec 31 16:00:09 unknown user.info kernel: br0: port 2(eth1) entering forwarding state
    Dec 31 16:00:09 unknown user.info kernel: br0: topology change detected, propagating
    Dec 31 16:00:09 unknown user.info kernel: br0: port 1(vlan0) entering forwarding state
    Dec 31 16:00:09 unknown user.info kernel: br0: topology change detected, propagating
    Dec 31 16:00:09 unknown user.warn kernel: vlan1: Setting MAC address to  48 5b 39 07 ac 81.
    Dec 31 16:00:09 unknown user.debug kernel: vlan1: add 01:00:5e:00:00:01 mcast address to master interface
    Dec 31 16:00:16 unknown user.info kernel: scsi0 : SCSI emulation for USB Mass Storage devices
    Dec 31 16:00:16 unknown user.warn kernel:   Vendor: WD        Model: My Book           Rev: 1028
    Dec 31 16:00:16 unknown user.warn kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
    Dec 31 16:00:16 unknown user.warn kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
    Dec 31 16:00:16 unknown user.warn kernel: sda: Waiting for disc 0 to settle.
    Dec 31 16:00:17 unknown user.warn kernel: SCSI device sda: 1953525168 512-byte hdwr sectors (1000205 MB)
    Dec 31 16:00:17 unknown user.info kernel: Partition check:
    Dec 31 16:00:17 unknown user.info kernel:  /dev/scsi/host0/bus0/target0/lun0: p1
    Dec 31 16:00:17 unknown user.debug kernel: WARNING: USB Mass Storage data integrity not assured, unmount it before unplugging
    Dec 31 16:00:17 unknown user.debug kernel: USB Mass Storage device found at 3. Host: 0
    Dec 31 16:00:17 unknown user.debug hotplug[97]: Attached USB device /proc/bus/usb/001/003 [INTERFACE=8/6/80 PRODUCT=1058/1102/1028]
    Dec 31 16:00:17 unknown user.debug hotplug[98]: Attached USB device /proc/bus/usb/001/003 [INTERFACE=3/0/0 PRODUCT=1058/1102/1028]
    Dec 31 16:00:17 unknown user.warn kernel: MSDOS FS: IO charset utf8
    Dec 31 16:00:18 unknown user.info hotplug[97]: USB vfat fs at /dev/discs/disc0/part1 mounted on /tmp/mnt/My_Book
    Dec 31 16:00:19 unknown daemon.err nmbd[105]: Samba server UNKNOWN is now a domain master browser for workgroup WORKGROUP on subnet UNICAST_SUBNET
    Dec 31 16:00:26 unknown authpriv.info dropbear[128]: Running in background
    Dec 31 16:00:26 unknown daemon.info dnsmasq[134]: started, version 2.52 cachesize 150
    Dec 31 16:00:26 unknown daemon.info dnsmasq[134]: compile time options: no-IPv6 GNU-getopt no-RTC no-DBus no-I18N DHCP no-scripts TFTP
    Dec 31 16:00:26 unknown daemon.info dnsmasq-dhcp[134]: DHCP, IP range 10.0.0.100 -- 10.0.0.200, lease time 1d
    Dec 31 16:00:26 unknown daemon.info dnsmasq[134]: reading /etc/resolv.dnsmasq
    Dec 31 16:00:26 unknown daemon.info dnsmasq[134]: using nameserver 8.8.4.4#53
    Dec 31 16:00:26 unknown daemon.info dnsmasq[134]: using nameserver 8.8.8.8#53
    Dec 31 16:00:26 unknown daemon.info dnsmasq[134]: read /etc/hosts - 2 addresses
    Dec 31 16:00:26 unknown daemon.info dnsmasq[134]: read /etc/hosts.dnsmasq - 1 addresses
    Dec 31 16:00:27 unknown daemon.err nmbd[105]: Samba server UNKNOWN is now a domain master browser for workgroup WORKGROUP on subnet 10.0.0.1
    Dec 31 16:00:28 unknown daemon.err nmbd[157]: Samba server UNKNOWN is now a domain master browser for workgroup WORKGROUP on subnet UNICAST_SUBNET
    Dec 31 16:00:29 unknown user.info init[1]: Tomato 1.27.8745 ND USB Ext
    Dec 31 16:00:29 unknown user.info init[1]: Asus WL-520GU
    Dec 31 16:00:29 unknown daemon.info dnsmasq[134]: exiting on receipt of SIGTERM
    May 23 08:30:16 unknown daemon.info dnsmasq[178]: started, version 2.52 cachesize 150
    May 23 08:30:16 unknown daemon.info dnsmasq[178]: compile time options: no-IPv6 GNU-getopt no-RTC no-DBus no-I18N DHCP no-scripts TFTP
    May 23 08:30:16 unknown daemon.info dnsmasq-dhcp[178]: DHCP, IP range 10.0.0.100 -- 10.0.0.200, lease time 1d
    May 23 08:30:16 unknown daemon.info dnsmasq[178]: reading /etc/resolv.dnsmasq
    May 23 08:30:16 unknown daemon.info dnsmasq[178]: using nameserver 8.8.4.4#53
    May 23 08:30:16 unknown daemon.info dnsmasq[178]: using nameserver 8.8.8.8#53
    May 23 08:30:16 unknown daemon.info dnsmasq[178]: read /etc/hosts - 2 addresses
    May 23 08:30:16 unknown daemon.info dnsmasq[178]: read /etc/hosts.dnsmasq - 1 addresses
    May 23 08:30:21 unknown daemon.err nmbd[157]: Samba server UNKNOWN is now a domain master browser for workgroup WORKGROUP on subnet 10.0.0.1
    May 23 08:30:35 unknown daemon.err nmbd[157]: Samba name server UNKNOWN is now a local master browser for workgroup WORKGROUP on subnet 10.0.0.1
    May 23 08:30:40 unknown daemon.info dnsmasq-dhcp[178]: DHCPREQUEST(br0) 10.0.0.115 0c:ee:e6:bc:40:17 
    May 23 08:30:40 unknown daemon.info dnsmasq-dhcp[178]: DHCPACK(br0) 10.0.0.115 0c:ee:e6:bc:40:17 Laptop-PC
    May 23 08:30:48 unknown cron.err crond[146]: time disparity of 21243810 minutes detected
    It was working OK again this morning for a while and I was transferring some files successfully. Then I started another batch and it decided to crash again. This time though I couldn't reach the router via SSH or the Web GUI. I could still browse the Internet though. I had to pull the plug and reboot the router in order to gain control again. Generally though the drive still shows up in the mounted list after it flakes out.

    I am wrong though, it is formatted fat32. I was thinking of another external drive i have. Sorry. :) So at least that's correct.

    I am using version 1.27, here is the name of the file I used for installation: tomato-NDUSB-1.27.8745.01-Ext.bin

    Anyhow, any help would be appreciated and let me know what other info that might be needed.
     
  98. chuckwhite8

    chuckwhite8 Networkin' Nut Member

    router: Asus RT16N, firmware: Tomato Firmware v1.27.9045 MIPSR2-beta11 K26 USB vpn3.6

    I am very new to this...I used Wengi's Tutorial on asus forum to setup partitions on my USB external hard drive, as well as ray123 on this thread to use commit fstab to the nvram.

    My partitions (created using fdisk /dev/sda and following prompts) ==>
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Device Boot Start End Blocks Id System
    /dev/sda1 1 125 1004031 82 Linux swap
    /dev/sda2 126 375 2008125 83 Linux
    /dev/sda3 376 2368 16008772+ 83 Linux
    /dev/sda4 2369 60801 469363072+ 83 Linux


    /etc/fstab file (created in Notepad++ with Unix line endings and copied to /etc/fstab) ==>
    #device Mountpoint FStype Options Dump Pass#
    /dev/sda1 none swap sw 0 0
    /dev/sda2 /opt ext3 rw,noatime 1 1
    /dev/sda3 /mnt/ftp ext3 rw,noatime 1 1
    /dev/sda4 /mnt/disk ext3 rw,noatime 1 1


    I then ran
    nvram setfile2nvram /etc/fstab
    nvram commit

    In the Tomato web interface, under Administration >> Scripts >> Init, I have put in
    mkdir /tmp/mnt/ftp
    mkdir /tmp/mnt/disk

    Questions:
    1. unless I check the Automount in USB and NAS >> USB Support, the partitions are not being automounted after a reboot. Is that expected?
    2. do I need to create the directories (for mounting) in the init script or is there an alternative recommended approach?
    3. in attached devices, in the USB Support page I have
    Partition 'My Book' swap (980.49 MB) is active
    Partition 'sda2' ext3 (1,961.06 MB) is mounted on /opt
    Partition 'sda3' ext3 (15.27 GB) is mounted on /tmp/mnt/ftp
    Partition 'sda4' ext3 (447.62 GB) is mounted on /tmp/mnt/disk
    This is a WD My_Book drive. Why does My_Book still appear as label for the swap partition? It appears that mkswap has a -L option which can be used to create a label. However that label does not appear here. OTOH, mke2fs also has a -L option, whose labels do appear for the other three partitions.

    Thanks.
     
  99. CBC888

    CBC888 Networkin' Nut Member

    Just to make sure, I erased the nvram again; and without doing anything else, I enabled the Core USB Support, enabled File Sharing (No Authentication) and set the Auto-share to Read/Write. Still, the only shares that I see are the default ones: root$ (/) and share (/mnt) as shown here:

    [​IMG]

    Here is the output from those commands:

    [​IMG]
     
  100. teddy_bear

    teddy_bear Network Guru Member

    CIFS in this mod is updated to a much newer version. Although the new version has many bugs fixed, it definitely can have some new issues and/or simply behave differently. If files are getting saved properly, I would not worry about these log messages - they might just be there for debugging purposes...
    Unfortunately, without the post-crash log it's not possible to say what's going on... If this is an option, you can try to reformat your drive as NTFS or Ext3, and see if it will resolve the problem. By the way, does it have external power supply, or is it powered from the USB port? Do you use Samba or FTP for file transfers?
    1. Yes. If you turn auto-mount off, you have to manually mount your partitions using the "mount" command. "mount" can use fstab if it exists, but you still have to run the command.
    2. If you specify certain mountpoints in the fstab, you have to create these directories. Alternative approach is to leave it all to the default handling - for example, if you label your partition "ftp", it will be auto-mounted on /mnt/ftp (and /mnt/ftp directory will be auto-created as needed) without a need to use fstab entries.
    In most cases "fstab" approach is only needed if you want to mount your partition to an existing directory outside of /mnt, i.e. /opt or /mmc.
    3. To find out whether or not there's an issue with labels displayed for swap partitions, post the output of "blkid" command with your drive attached. Also, ~1GB is a lot for a swap... For RT-N16 (which already has 128MB RAM) 256MB should be enough.
    Now I wonder where you're looking for these shares...
    Here's your automatic share:
    Code:
    [sda1]
     path = /tmp/mnt/sda1
     comment = sda1
     writable = yes
     delete readonly = yes
     force user = root
    
    So everything's fine on the router end - your share is getting created. You should see it from your Windows clients.
     

Share This Page