How to run this startup script on my WRT54G? DD WRT

2

3

I am trying to set something up on my old WRT54G router so that I can monitor live upload and download speeds. The info for it is here: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=75275

I am not familiar with this type of stuff by any means. I'm an everyday college kid just trying to find a way to ID bandwidth hogs on my network; that's it. I've hardly messed around with this kind of stuff before. For this reason, everything I'm reading on how to get this script running is confusing and seems to contradict other tutorials. In the linked thread, the guy is talking about moving that file where the router can access it and even using some sort of MAC-PCname.txt file. On the second page, he says to a newb, "There are two ways of running a script everytime the router starts, one is by entering the code directly through the router's Web Interface, another is to write a startup script and use the extention .startup and place it in one of the correct locations.

To make the script executable run this in the command line: Code: chmod 700 /path_to/wrtbwmon

Or if you're using WinSCP with an SD/MMC card mod, just right-click on the file, select properties, and check all the X checkboxes."

Again, I am lost. He makes no mention of how to get the file onto the router. I would just enter the script's command into the little command box on DD WRT (this is what the official DD WRT guide says to do as well), but I don't know how to find the commands of the script. Can someone please supply a newb friendly step by step guide on what to do to get this setup? I don't want to screw anything up by trying to do this on my own.

Also, I have 368 kb of free ram available on my router. Please tell me if that's not enough.

Thanks. Any help is appreciated!

EDIT: I have the micro build so I don't have SSH on there. Apparently I can compress a file and get it to fit on there if needed though. Is there any other option?

W. Hib

Posted 2016-01-06T02:02:31.400

Reputation: 21

There is a clue in the instructions. Use WinSCP to transfer files to the router – Mark Ch – 2016-01-06T06:28:50.527

Answers

1

A common method of transfering files between PC and networked device (e.g. router in this case) is to use SCP. There is a friendly windows GUI for it called WinSCP.

However,

If the "wrtbwmon" is available on the Internet somewhere, then you can download it directly onto the router by a number of methods.

Step 1:

Gain shell (terminal) access to the router

  • Option a) use telnet to log in to a router shell
  • Option b) use ssh to log in to a router shell (you already said you dont have SSH, but for completeness)
  • Option c) go to the web interface for your router in a browser and use the Administration/Commands interface

Step 2

Download file directly to the router. From the shell use "wget" command to download the file:

wget [web address of file] -O [destination folder on router]

for example:

wget http://52.90.176.152/wrtbwmon -O /tmp/wrtbwmon

Mark Ch

Posted 2016-01-06T02:02:31.400

Reputation: 521

I'm attempting to use WinSCP. Again though, it's looking like I need to enable SSH, which I don't have. So....I will try to go with option C of the alternatives. Tell me if this is correct. I can download it to my router by running this command: "wget http://www.dd-wrt.com/phpBB2/download.php?id=15332&sid=04ce0ee78af4d45cb00316a28410d100 -O [some destination on router]"

Is this correct? Also, I am unsure of where to save the file. Could you tell me a good location for that?

Thanks for your help. I really appreciate it.

– W. Hib – 2016-01-06T16:05:05.463

Try /tmp as recommended in the other answer. You can always move the file later, just try to download it first. That web address doesnt look right, that is the forum... Find the URL of the file direct – Mark Ch – 2016-01-06T16:55:09.520

Okay. We'll try putting it on /tmp. So I literally just input "/tmp" for the destination part of the command?

Also, I'm trying to create a direct link to the file within the zip, since I'm pretty sure that's what I need to download (vs. the zip itself). I unzipped the file and uploaded it to my dropbox and created what I think is a direct link. This is it: https://www.dropbox.com/s/xyfdudrjzuvib1u/wrtbwmon?dl=1 . Will that work? Check it out for yourself. The link immediately just starts the download.

Also, anything we need to do about the MAC-to-PCname.txt?

– W. Hib – 2016-01-06T18:00:29.967

nice try!... but my installation of wget can't do HTTPS (SSL), so I guess yours can't either. It would need to be uploaded somewhere with only HTTP. try this: wget http://52.90.176.152/wrtbwmon -O /tmp/wrtbwmon

– Mark Ch – 2016-01-06T19:15:26.387

Hm, well, I tried that link you supplied and it just says "Connecting to 52.90.176.152 (52.90.176.152)" (there's two more digits in the parentheses I'm leaving out in case that's some sort of private number). It never seems to do anything else. I'm guessing this means that it didn't download, correct?

Again, I really appreciate the help. Nobody else on this website has helped me out this much, hahaha :) – W. Hib – 2016-01-06T21:16:50.863

Can you see the script at http://52.90.176.152/wrtbwmon in your browser? It is there. And the wget command works on my linux box. Ive put the full command into the answer to make it clearer. Sorry, im stumped now.

– Mark Ch – 2016-01-06T22:30:08.370

I'm getting pretty frustrated with my router. I tried doing the command in telnet and still no good. All I'm getting is that "connecting" message. I can't seem to get this thing to forward any ports either...If I can't get this script running I'll just return to the stock firmware.

How can I check to see if the script is in my tmp folder? Maybe it downloaded and it just isn't reporting it. – W. Hib – 2016-01-07T19:05:43.850

Basic unix 101... "cd /tmp" then "ls" – Mark Ch – 2016-01-07T19:07:10.000

I dont know what else to suggest. How did you install the custom firmware?? – Mark Ch – 2016-01-07T19:12:24.043

Running those commands just give me a "not found" in telnet. Similar error in webui. I installed it normally I believe. I followed a tutorial on YouTube that seemed to be much cleaner and simpler (less hard resets, though I DID do some of those during installation anyways) than the guide on DD WRT. It still did all the necessary stuff like using the vxworkskiller and such. Might you recommend a return to stock firmware and again trying to install DD WRT? Then I can just run your commands again to see if they work I guess. – W. Hib – 2016-01-07T19:22:17.677

the command "ls" (remove the quotes) gives you an error?? I'm beginning to think there is no hope here... I think maybe the micro version of dd-wrt might not be worth having at all – Mark Ch – 2016-01-07T20:11:58.403

Well it says "sh: eval: line 1: 1s: not found." Yeah. Looks like I'll have to give up on it unfortunately. Pretty sure the only way for me to get a IP or MAC specific bandwidth monitor would be for me to run scripts, and that's just not happening :( I'll probably return to stock firmware and hope that I can at least forward ports on there lol. I only flashed DD WRT to try to get that bandwidth monitor. But anyways, I appreciate the attempted help! :) – W. Hib – 2016-01-08T02:02:50.153

CD (change directory) LS (list). But okay. I wish you better luck with your next venture :) – Mark Ch – 2016-01-08T06:31:35.280

0

Assuming you have DD-WRT running already:

  • Go to the directory on your local system that has the script in it
  • SSH to your router (guide available here)
  • Change directory as recommended on the thread: cd /tmp
  • Run the script as recommended: /bin/sh /tmp/wrtbwmon setup

Let me know if you need clarification - glad to help. For reference, DD-WRT has all their tutorials available here, but that doesn't make finding the right answer easy.

mbb

Posted 2016-01-06T02:02:31.400

Reputation: 2 206

Thanks for you reply. I don't seem to have an SSH tab on my DD WRT. Looks like I'm gonna have to do some work first to get that in there. It's because I have the micro build. Is there another way or should I get SSH working? – W. Hib – 2016-01-06T04:15:30.803