flashing with out ftdi cable

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
pxshock
Posts: 6
Joined: Fri Feb 05, 2010 7:22 pm

flashing with out ftdi cable

Post by pxshock »

i would like to try to install openwrt on the router without a serial interface. I am not sure if its a wise idea.

I have read the instructions, and i think i can flash the router successfully with out any visual. But the query/issue comes in when i want to ssh into the router. I am planning to use "The easy way:" by downloading the precompiled image Jeff made http://mightyohm.com/blog/2008/11/build ... g-openwrt/. I am not sure of the root password, but i read on http://www.gumbolabs.org/2009/10/08/hac ... w-openwrt/ that the default root password is possibly "root". Can any one confirm this?

I actually am planning to use the router as a router, and not as a client as the radio project does, i plan to have router be the dhcp server, online music player (wired radio player), firewall, asterisk server and others. Internet will be supplied to it via the ethernet (lan) cable, hopefully all i need to do is plug it into the wan port. Can somone advise me on this please? There is a part "Configuring OpenWRT:" on http://mightyohm.com/blog/2008/11/build ... g-openwrt/ and it requires me to have ssh to do the configurations so i am not sure about how to go about ssh-ing into the router after blindly flashing with http://mightyohm.com/files/kamikaze-2.4 ... uashfs.trx and no other configurations. Say i only had the router and my laptop, could i connect my ethernet cable to lan 1 of the router and the other end to my laptop, then ssh from my laptop into 192.168.1.1 (the router)? Has any one tried this before?

Any help will be appreciated.

Thanks guys
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: flashing with out ftdi cable

Post by mightyohm »

The router should work as a router (dhcp etc etc etc) with only very minor tweaks to the config files (ie. not setting wifi to client/station mode).

Please go over to openwrt.org and read the docs, there is a wealth of information there about configuring OpenWrt to do what you want. If it's not in the online docs, someone has probably posted about it in the forums over there.

You might want to spring for a router with more flash space (like the wl-500gp v2) if you want to install asterisk and mpd, etc at the same time. You might find that the WL-520gU will get cramped pretty quickly if you try to use it for more than one application at once. You'll certainly have to be very careful about what packages and dependencies you install, maybe custom compiling some stripped down versions of the tools you need.

To answer your first question: The default login is 'root' with no password. As soon as you set a password, telnet is deactivated and you'll have to use ssh instead.

Good luck!
pxshock
Posts: 6
Joined: Fri Feb 05, 2010 7:22 pm

Re: flashing with out ftdi cable

Post by pxshock »

Thanks so much for your reply Jeff. It is my first time playing with embedded linux so i dont know that much, yet :-)

I will go over to openWRT, but i am anxious to get at least something working asap, im sure you know how that is.

I actually have purchased the wl-520gu already, i did consider buying something with more space, but i read https://forum.openwrt.org/viewtopic.php?id=21377 that i could expand the storage space or boot off USB, so i was considering installing to, or booting from my external drive. Hopefully that will not be an issue.

I was looking at compiling my own stripped down version, but as a beginner it seems a bit overwhelming, i am hoping that i can just use your compiled openwrt to get started off.

So, just to clarify how to install OpenWRT to WL-520gU without serial interface (also not voiding warentee by opening the router :-) . The router is cheap as Jeff said, so once you start fiddling with it, consider it a loss either way).


NOTE: I have attempted this, but i take no responsibility if you brick your router

(most of this i just copied from http://mightyohm.com/blog/2008/11/build ... g-openwrt/)

1. download Jeff's openwrt http://mightyohm.com/files/kamikaze-2.4 ... uashfs.trx

2. Connect the LAN1 port of the router to your computer using a short ethernet cable. The router is hardcoded to be 192.168.1.1 on boot, and we need to configure our computer to talk to that address.

3. I set my Macbook to use a static IP of 192.168.1.185. You may need to set a gateway to 192.168.1.1. I set the netmask to 255.255.255.0. If your home network is also on the 192.168.1.x subnet, you will need to disconnect/disable it. On my Macbook, this meant disabling the internal wireless and losing internet access while the router was connected.

4. Press and hold the Restore button on the back of the router and plug in the power cable. The Restore button is shown just to the right of the red EZSetup button here: <view blog page for image>

5. Continue holding the Restore button until the power LED starts flashing once a second. Release the restore button. The router should now be listening to for images from TFTP

6. Now it’s time to transfer our .trx file to the router. These instructions are for OS X. On the box where you saves openwrt fire up a terminal and...

#cd <where openwrt is stored -- without spaces in dir path>
cd ~/kamikaze/bin
tftp
trace
timeout 1
mode binary
connect 192.168.1.1
put openwrt-brcm-2.4-squashfs.trx

7. on the tftp it says sending .. sending, the at the end it says successfully sent x amount of packets

8. At this time, the router power light will not be blinking once a second. wait a couple minutes (don’t touch anything, unplugging the router at this point could brick the router!). Wait at least 5 earth minuites, to be safe 10 i waited min.

9. Unplug the router, wait a few seconds, and then plug it back in again. The process will pause briefly while the jffs file system is created. The router should be ready in about 5 minutes, to be safe wait 10.

10. Now for the interesting bit, access into the router, leaving the router connected to your pc via lan port one. Telnet in, there is no root password as Jeff mentioned earlier.

telnet 192.168.1.1

11. You should see the router's OpenWRT CLI prompt. It says there that if you use "passwd" to set your root password, then telnet will be disabled and ssh will be enabled. If you choose to set a password (recommended) using "passwd" command, then you need to log in from ssh instead of telnet.

ssh 192.168.1.1 -l root

12. You probably wish to configure it at this point, so you may be interested in looking at http://mightyohm.com/blog/2008/11/build ... g-openwrt/

There you have it, you can now install OpenWRT into your Asus WL-520gU with out the serial interface :-)

Thank you Jeff.

And Good Luck to you all!
Last edited by pxshock on Sun Feb 07, 2010 11:21 am, edited 1 time in total.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: flashing with out ftdi cable

Post by mightyohm »

That sounds like a reasonable approach to me!
pxshock
Posts: 6
Joined: Fri Feb 05, 2010 7:22 pm

Re: flashing with out ftdi cable

Post by pxshock »

I did it last night, and it worked! I have updated the post above.

Thanks Jeff.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: flashing with out ftdi cable

Post by mightyohm »

Congratulations!!!

Awesome, nice work! :D
nhbubba
Posts: 7
Joined: Wed Mar 24, 2010 6:10 am
Location: Southern NH

Re: flashing with out ftdi cable

Post by nhbubba »

I was way too impatient to wait for my FTDI cable to arrive. Figured I'd take a swing at flashing my Asus blind..

Code: Select all

BusyBox v1.11.2 (2008-12-01 16:57:55 PST) built-in shell (ash)

...

 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r12857) -------------------
As an engineer I used to work with used to say: "I'm in like Flynn"

Thanks to pxshock for those directions. They are perfect to a T.
And thanks Jeff for posting and continuing to host your pre-built image. Eventually I'll take a shot at building my own, but in the meantime this gives me something to fiddle with.

Now... let's see what kind of damage can I do with this bad-boy!?!
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: flashing with out ftdi cable

Post by mightyohm »

Well done. That was fast!

:geek:
jeroen94704
Posts: 109
Joined: Sat Feb 13, 2010 4:27 am
Location: Eindhoven, the Netherlands

Re: flashing with out ftdi cable

Post by jeroen94704 »

Seriously, I have flashed OpenWrt dozens of times onto a bunch of different routers, and I've NEVER used a serial cable, nor have I felt the need to do so. In fact, the instructions on the OpenWrt website don't even mention the serial cable.

It may be nice to see the boot-process on the router, but in my opinion, this is not worth the trouble of the serial cable.

(Don't know if this is helpful to anyone, I've just always been a bit bemused by this :D ).

Jeroen
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: flashing with out ftdi cable

Post by mightyohm »

Perhaps - But it is more educational to see what is happening during the flash process. And I make use of the serial port later in the project - so a $20 USB-serial cable doesn't seem like a bad investment.
Post Reply