OpenWrt Forum Archive

Topic: Wrt160nl?

The content of this topic has been archived between 9 Mar 2018 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Tommy wrote:

I brick my wrt160nl.
Can acsess it widt putty, but do not know comand to put in firmware thats work?

Do you have serial access to it? If not you might be screwed until you do.

vincentfox wrote:

WRT160NL profile exists in trunk and works fine.  Build firmware yourself and Wifi works.

The OpenWRT & X-WRT buildbot makes a generic Atheros image that doesn't include WRT160NL profile.   Thus those images have no Wifi.

Clear now?

Clear...thank you.

I happen to have installed a build environment and have build my first image last night.
Still have a lot to learn from you guys.

Thank you

That's why it's always the best if you build your own images and packages.

Tommy wrote:

I brick my wrt160nl.
Can acsess it widt putty, but do not know comand to put in firmware thats work?

It's not "bricked" if you can "access it with putty".

The very fact you can access it with putty, says a working copy of OpenWRT
is installed and you just don't know what to do next.

Hm, I tried to install my image using the following mtd-method (used dd to convert my .bin to the .trx and strip the first 32 bytes):

root@OpenWrt:/tmp# ls -lha
drwxrwxrwt    7 root     root          280 Jan  1 00:04 .
drwxr-xr-x    7 root     root            0 Jan  1 00:00 ..
-rwx------    1 root     root            0 Jan  1 00:00 .failsafe
drwx------    2 root     root           40 Jan  1 00:00 .uci
-rw-r--r--    1 root     root            4 Jan  1 00:00 TZ
-rw-r--r--    1 root     root            0 Jan  1 00:00 dhcp.leases
-rw-r--r--    1 root     root          124 Jan  1 00:00 fstab
-rw-r--r--    1 root     root         2.6M Jan  1 00:04 image.trx
drwxr-xr-x    2 root     root           60 Jan  1 00:00 lock
drwxr-xr-x    2 root     root           80 Jan  1 00:00 log
-rw-r--r--    1 root     root           21 Jan  1 00:00 resolv.conf
-rw-r--r--    1 root     root            0 Jan  1 00:00 resolv.conf.auto
drwxr-xr-x    2 root     root          100 Jan  1 00:00 run
drwxr-xr-x    2 root     root          100 Jan  1 00:00 state
root@OpenWrt:/tmp# mtd -r write image.trx linux
Could not open mtd device: linux
Can't open device for writing!
root@OpenWrt:/tmp#

TFTP doesn't work either, I guess because of a lack of a TFTP-server. Any ideas how to flash my image? And sorry for the slightly off-topic talk.

Try sysupgrade.

BlackWizard wrote:

Hm, I tried to install my image using the following mtd-method (used dd to convert my .bin to the .trx and strip the first 32 bytes):

root@OpenWrt:/tmp# ls -lha
drwxrwxrwt    7 root     root          280 Jan  1 00:04 .
drwxr-xr-x    7 root     root            0 Jan  1 00:00 ..
-rwx------    1 root     root            0 Jan  1 00:00 .failsafe
drwx------    2 root     root           40 Jan  1 00:00 .uci
-rw-r--r--    1 root     root            4 Jan  1 00:00 TZ
-rw-r--r--    1 root     root            0 Jan  1 00:00 dhcp.leases
-rw-r--r--    1 root     root          124 Jan  1 00:00 fstab
-rw-r--r--    1 root     root         2.6M Jan  1 00:04 image.trx
drwxr-xr-x    2 root     root           60 Jan  1 00:00 lock
drwxr-xr-x    2 root     root           80 Jan  1 00:00 log
-rw-r--r--    1 root     root           21 Jan  1 00:00 resolv.conf
-rw-r--r--    1 root     root            0 Jan  1 00:00 resolv.conf.auto
drwxr-xr-x    2 root     root          100 Jan  1 00:00 run
drwxr-xr-x    2 root     root          100 Jan  1 00:00 state
root@OpenWrt:/tmp# mtd -r write image.trx linux
Could not open mtd device: linux
Can't open device for writing!
root@OpenWrt:/tmp#

TFTP doesn't work either, I guess because of a lack of a TFTP-server. Any ideas how to flash my image? And sorry for the slightly off-topic talk.

I assume WRT160NL.
Don't convert it to trx, leave bin. Store the image somewhere on local lan, accessible for example by http. In OpenWrt go to

/tmp# wget address/image.bin
/tmp# mtd write image.bin firmware && reboot

That's it.

I transfered the firmware via SCP, that's easier smile. And now cross your fingers, I'll flash my image right now.

EDIT: WOHOOO!!! It work's! Thx for your help! Now I have to figure out how to enable multiple SSIDs / ClientMode / WDS to extend the range of the WEP-router. But that should be documented already.

(Last edited by BlackWizard on 30 Aug 2009, 22:58)

BlackWizard wrote:

I transfered the firmware via SCP, that's easier smile. And now cross your fingers, I'll flash my image right now.

EDIT: WOHOOO!!! It work's! Thx for your help! Now I have to figure out how to enable multiple SSIDs / ClientMode / WDS to extend the range of the WEP-router. But that should be documented already.

How did you actually gain access to router's console?

nemozny wrote:

How did you actually gain access to router's console?

Pretty easy: I opened the packaging, plugged the router in, went to the default webif, did a firmware-upgrade to openwrt-wrt160nl-squshfs.bin from the trunk (prebuild), connected via telnet (telnet 192.168.1.1), changed the default PW (passwd) to enable SSH, connected via SSH (ssh root@192.168.1.1), tried to get wifi to work, read a lot in the wiki and the forums, compiled my own image with the wrt160nl profile in it to enable wifi, flashed this new image, did the same telnet and SSH stuff and then was done. That's all I did.

Does this answer your question?

(Last edited by BlackWizard on 31 Aug 2009, 00:55)

I just want to say a big THANKS for all you guys. I compiled my own image to enable wifi and it works.

I need to reflash my router via the serial cable.  So I cut the dcu-5 cable short, and how/what do I use to connect it to the pins?  I mean I could just solder it on... but... I'd rather not.  Also, is there a visual diagram showing the connection between the cable and the router so I get the wires correct the first time?  Thanks guys,

~Specto

BlackWizard wrote:
nemozny wrote:

How did you actually gain access to router's console?

Pretty easy: I opened the packaging, plugged the router in, went to the default webif, did a firmware-upgrade to openwrt-wrt160nl-squshfs.bin from the trunk (prebuild), connected via telnet (telnet 192.168.1.1), changed the default PW (passwd) to enable SSH, connected via SSH (ssh root@192.168.1.1), tried to get wifi to work, read a lot in the wiki and the forums, compiled my own image with the wrt160nl profile in it to enable wifi, flashed this new image, did the same telnet and SSH stuff and then was done. That's all I did.

Does this answer your question?

Thanks, today I realized the same, that upgrading through original firmware web interface is sufficient. That's my second WRT160NL router reflashed with OpenWrt. The first one I've disassembled and flashed using serial connection.

Edit 1: Although I've tried to flash it through web twice, first the page freezed and then it said "Firmware upgrade failure". So I reloaded the page, began second upgrading. then it correctly showed progress bar and said "Firmware upgrade failure" again. Then powered off and on the router and voilá! Kamikaze.

specto wrote:

I need to reflash my router via the serial cable.  So I cut the dcu-5 cable short, and how/what do I use to connect it to the pins?  I mean I could just solder it on... but... I'd rather not.  Also, is there a visual diagram showing the connection between the cable and the router so I get the wires correct the first time?  Thanks guys,

~Specto

Try web flashing as well, there is no need to open the device. But build your own trunk image in advance.

(Last edited by nemozny on 31 Aug 2009, 15:03)

specto wrote:

what do I use to connect it to the pins?  I mean I could just solder it on... but... I'd rather not.

I didn't solder mine on.  I just used some pico-sized test leads I picked up at Frys to clip onto the serial pin headers, then clipped the other end to the wire ends coming from the Nokia cable.  Simple and I'm not planning to do a permanent install.  I suppose if I were I'd use pin-header ends.  These are squarish sleeves that you crimp your wire into one end, and then slide the sleeve over the right pin no soldering required.  It's only 3 wires.

The arrangement of pins is simple, pin#1 is at the "top" of the board, with the top defined as the side with the antennas.  I originally found this out by looking on the back of the PCB since pin#1 is usually denoted by a squarish white marker instead of rounded.

vincentfox wrote:
Tommy wrote:

I brick my wrt160nl.
Can acsess it widt putty, but do not know comand to put in firmware thats work?

It's not "bricked" if you can "access it with putty".

The very fact you can access it with putty, says a working copy of OpenWRT
is installed and you just don't know what to do next.

Thats rigt, have try different comands, i want to put back the orginal firmware, but i cant find the rigt comando, it say it cant find the file that i named code.bin?

vincentfox wrote:
specto wrote:

what do I use to connect it to the pins?  I mean I could just solder it on... but... I'd rather not.

I didn't solder mine on.  I just used some pico-sized test leads I picked up at Frys to clip onto the serial pin headers, then clipped the other end to the wire ends coming from the Nokia cable.  Simple and I'm not planning to do a permanent install.  I suppose if I were I'd use pin-header ends.  These are squarish sleeves that you crimp your wire into one end, and then slide the sleeve over the right pin no soldering required.  It's only 3 wires.

The arrangement of pins is simple, pin#1 is at the "top" of the board, with the top defined as the side with the antennas.  I originally found this out by looking on the back of the PCB since pin#1 is usually denoted by a squarish white marker instead of rounded.

Thanks vincentfox.  I just realized I have a ton of mini clips that would probably work.  Thanks for the idea.

I see failsafe code was committed, but so far in my test of trunk r17452 it is not working.
The message goes out on broadcast "press failsafe now" but pressing reset or WPS
does not enter failsafe mode.  In fact if pressed after boot is complete seems to just
work to halt the OS.

Can anyone else test & confirm this?

Anyone got the switch configure using the swconfig tool?

Here is my network config.

package 'network'

config 'interface' 'lan'
        option 'proto' 'static'
        option 'type' 'bridge'
        option 'ipaddr' '192.168.1.1'
        option 'netmask' '255.255.255.0'
        option 'ifname' 'eth0.1'

config 'interface' 'wan'
        option 'proto' 'dhcp'
        option 'ifname' 'eth1'

config 'switch' 'eth0'
        option 'reset' '1'
        option 'enable_vlan' '1'

config 'switch_vlan' 'eth0_1'
        option 'device' 'eth0'
        option 'vlan' '1'
        option 'ports' '0 1 2 3 4t'

(Last edited by Dogge on 1 Sep 2009, 19:41)

Hi! I bought a WRT160NL one week ago and was interested in installing OpenWRT on it so I had a few questions:

After installing OpenWRT can I upgrade the OpenWRT build using the web upgrade or could there be problems (this may sound like a dumb question but I read there were some problems with the old wrt160n)?

In the unlikely case I make openwrt unbootable can I still recover using the boot TFTP restore or will I be forced to install a serial port or reflash using a JTAG interface?

Hello vertix, yes you should be able to upgrade using the the web interface
though I'm not sure if there's a snapshot build for wrt160nl with working wifi yet.
If not you would need to build your own from source.

(Last edited by kyri on 3 Sep 2009, 02:00)

Thanks for the answer. I'm building the image right now, hoping nothing goes wrong. If it works fine I'll build a clean one with only wi-fi and usb(+mass-storage) enabled and upload it somewhere in case someone else needs it.

(Last edited by vertix on 3 Sep 2009, 03:14)

I read somewhere else on the forum can't remember the exact wording now but the general principle is that if you don't know how to compile your own images (or at least be able to figure out how to it by reading the relevant openwrt docs ans/or forum threads) then you shouldn't be using such images.
I.e. wait for an official release, or use a snapshot.
That's why you won't find many user-built images floating around in the forum (though I did notice a couple).

(Last edited by kyri on 3 Sep 2009, 11:06)

vertix wrote:

In the unlikely case I make openwrt unbootable can I still recover using the boot TFTP restore or will I be forced to install a serial port or reflash using a JTAG interface?

PLEASE READ THE THREAD SEVERAL TIMES!

Let's make it clear.  You are flashing "trunk" bleeding edge firmware.  There is no apparent "boot_wait" allowing TFTP recovery like with Broadcom platforms.  If you buy a cheap Nokia DKU-5 cable you can have serial and fix a "bricked" router with a single command.  However I REALLY want to caution AGAINST anyone flashing any alternate firmware onto an Atheros-board like this, if they are unwilling or unable to hack up a serial console to dig yourself out if something goes wrong.  Actually it's rather apallling to me that Atheros boards go out without some sort of rescue or recovery capability, doesn't this create a support issue even with flashing factory updates?

(Last edited by vincentfox on 3 Sep 2009, 03:53)

I read the thread, I was asking those questions for confirmation to know if I understood the issues correctly.

About firmware recovery, I would like to know if it's possible to make a serial connector using the serial port on my PC (a real one, no usb-serial adapter) and the router's ethernet jack (there are serial ports on two jacks, right? so I can use one for the network and another one for the serial port): would that work or would there be voltage issues?

vertix wrote:

I read the thread, I was asking those questions for confirmation to know if I understood the issues correctly.

About firmware recovery, I would like to know if it's possible to make a serial connector using the serial port on my PC (a real one, no usb-serial adapter) and the router's ethernet jack (there are serial ports on two jacks, right? so I can use one for the network and another one for the serial port): would that work or would there be voltage issues?

No, you can't, voltage level is different. Search the web, IMHO 3 V router <-> 12 V PC.

I've seen some references to serial port in WAN/LAN4 port, I've observed hardware closely and I did not find anything.