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.

Phocéen wrote:
nunojpg wrote:

luci (the web interface) is not included by default,

How to install this ?

It's OK, I find !

Hi all , Im totaly new in this forum (except reading this thread wink
I have one , little off-topic exploration (maybe someone explore it before me , but i do not notice it)
Problem with long dku-5 cable (possibli FTDI chips ,thei have worst signal reception) to serial port :
Reason is in power supply ,default supplied in box is switching (or pulse) based (sorry about my english ,i hope the point will be clear). That producing a lot of interferences which in this case kicking some ugli stuff into RX/TX transmission.
So , I take another linksys power supply from older model ,based on transformer and now i got a clear serial console wink (on about one meter cable)
Now i going to explore this device about handling a stuff that i'd like to put it in
Nice work here btw smile

(Last edited by calltrace on 23 Dec 2009, 13:09)

Damien wrote:

Thanks for your answer. You know when the firmware will stable ? And where I can find a serial cable ?

Damien

There are two ways to do this. One requires modifying an RJ45 plug. This is a little complicated, but you do not have to open the case and void the warranty. See
http://wiki.openwrt.org/toh/linksys/wrt160nl
Note than some of the Ethernet jacks on the WRT160NL have  special pads on the board that allow this.

The second way is to get a cable like a CA-42 3-wire cable. I got mine from Amazon for $2:

http://www.amazon.com/Bargaincell-Brand … /ref=pd_28

The one I bought had wires colored Green, Yellow, White. I connected it to the serial port inside using the following wiring:

CA-42 Cable    Serial tag #33
----------------------3.3V (Nearest antenna)
White ---------------TX
Yellow ------------- RX
----------------------NC
Green --------------GND

(Last edited by grymoire on 30 Dec 2009, 22:27)

Still trying  to get the WiFi working. This time I build the firmware from source. Kamikaze (r18972). U-Boot 1.1.5 (Apr  6 2009 - 13:54:11). I can configure via luci.
However, the wifi still does not work.  ath9k is installed. /etc/config/wireless says
config 'wifi-device' 'wifi0'
        option 'type' 'mac80211'
        option 'diversity' '0'
        option 'hwmode' '11bg'
        option 'disabled' '0'
        option 'txpower' '250'
        option 'channel' '11'

config 'wifi-iface'
        option 'device' 'wifi0'
        option 'ssid' 'TEST'
        option 'network' 'lan'
        option 'mode' 'ap'
        option 'encryption' 'none'

yet when I do a ifconfig -a I see wlan0, but not wifi0. When I tried to find the access point on another computer, SSID TEST does not show up.

iwconfig wlan0 says:
wlan0     IEEE 802.11bgn  Mode:Managed  Access Point: Not-Associated   
          Tx-Power=0 dBm   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

I've tried various values for TX-Power. I have no idea what the limits are to this value.
What should I try next?

I checked earlier posts, and did as obsy suggested:

wifi detect > /etc/config/wireless
uci set wireless.@wifi-device[0].disabled=0
uci commit wireless
wifi

I now have the interface mon.wlan0, and my test access point shows up.
I think this part should be added to the Wiki page.

I tested the WAN connection of openwrt, and ports 22 (ssh) 53 (dnsmasq) 80 (http) and 443 (https) were open.
I want to close these ports before I connect to the Internet. Any tips/suggestions?

grymoire wrote:

I checked earlier posts, and did as obsy suggested:

wifi detect > /etc/config/wireless
uci set wireless.@wifi-device[0].disabled=0
uci commit wireless
wifi

I now have the interface mon.wlan0, and my test access point shows up.
I think this part should be added to the Wiki page.

No,  wifi is detected automatically when you first boot, and these operations are not required. Unless manually installed kmod-ath9k.

grymoire wrote:

I tested the WAN connection of openwrt, and ports 22 (ssh) 53 (dnsmasq) 80 (http) and 443 (https) were open.
I want to close these ports before I connect to the Internet. Any tips/suggestions?

I now believe there was a flaw in my testing. I connected a system directly to the Ethernet jack labeled "Internet", and, I manually assigned the IP address to eth1. This gave me the result above, which I was concerned about.

I tried it again, connecting it to the real Internet, and when it got a DHCP-assigned IP address, and I did a port scan (using nmap), and the only port that is open is BGP.
Much better!

I am not clear on the difference between manually assigning an IP address, and getting one via DHCP. Clearly if you do this wrong, you can create a large security risk.

Using an external service like grc.com's Shields's Up is worthless in my case, as my ISP has a firewall between my machine and the Internet.

I got unenecypted WiFi working. Now I am testing various WiFi encryptions.  No luck.
When I select WEP  through Luci, a sniffer says the AP isn't encrypted.
I have included the  modules wpa-supplicant and hostapd, BTW. Now when I select WEP, and reboot, luci says I have WPA-PSK. But that doesn't work either. The sniffer still says there is no encryption.
And in any case, I cannot join the network.

just an fyi: the gui tools are built on top of command line tools that (currently) don't correctly configure the wifi on the wrt160nl. you should try reading up on the uci configs so you can manually edit the files. the nuwiki is the place to look for that info. http://wiki.openwrt.org/doc/uci
also the docs there are incomplete so if you have figured something out that isn't there please put it there so noobs like me can know what the heck to do.
also hostapd is the package you need for wpa in ap mode and wpa-supplicant is what you need for client and i think also wds modes.
<not-mine>
a (it's on another post much earlier in the thread) working wrt160nl /etc/config/wireless:

config wifi-device  wlan0
   option type     mac80211
   option channel  5
   option macaddr <your mac here>
   option hwmode_11n g             
   option ht_capab '[SHORT-GI-40][DSSS_CCK-40][HT40-][HT40+][HT20]'  

config wifi-iface
   option device   wlan0
   option network  lan
   option mode     ap
   option ssid     <your ssid here>
   option encryption none

</not-mine>
i'm working on wpa2 client mode as soon as i get the net/usb boot running as i have had to remove all the wireless packages to fit ices2 and friends on the itty-bitty 5MB storage.

(Last edited by haxwithaxe on 1 Jan 2010, 20:47)

Is the VLAN stuff working or not?

I can't manage to use it, but the switch configuration section is present at the file...

Regards

haxwithaxe wrote:

just an fyi: the gui tools are built on top of command line tools that (currently) don't correctly configure the wifi on the wrt160nl. you should try reading up on the uci configs so you can manually edit the files. the nuwiki is the place to look for that info. http://wiki.openwrt.org/doc/uci
also the docs there are incomplete so if you have figured something out that isn't there please put it there so noobs like me can know what the heck to do.
also hostapd is the package you need for wpa in ap mode and wpa-supplicant is what you need for client and i think also wds modes.

I tried using the uci interface, and I was not able to get either the WEP encryption, or WPA  encryption to work.

I meant to edit the config files directly. It is (at least for me) an easier way to see the whole picture and you don't have to worry about "uci commit" (i always forget).
here is my working wpa2 client only config.
Edit3: here is my semi-working wpa2 client only mode confi : / it was working for 10-20 minutes then suddenly stopped.
Edit2: i forgot that i had to create /var/run/ on boot so that the auto setup of wpa_supplicant doesn't complain.
@grymoire: i realize this isn't quite what you're looking for but if you change the mode to "ap" from "sta" it should work fine if you ignore my network configs, but i haven't tested yet so i'm not sure. you might need to change "key ..." to "passphrase ..." too.
Edit1: also forgot i saw this http://wiki.openwrt.org/doc/uci/wireles … e.wpa2.psk . looks like you should keep it as "key" not "passphrase"
/etc/config/wireless

config wifi-device  wlan0
   option type     mac80211
   option channel  1
   option macaddr <your mac here>
   option hwmode_11n g
   option ht_capab '[SHORT-GI-40][DSSS_CCK-40][HT40-][HT40+][HT20]'

config wifi-iface
   option device   wlan0
   option network  lan
   option mode     sta
   option ssid       <your essid here>
   option encryption psk2
   option key    <your passphrase here>

/etc/config/network

config interface loopback
        <defaults>
config interface lan
   option ifname    wlan0
   option type    bridge
   option proto    static
   option ipaddr    192.168.1.88
   option gateway    192.168.1.1
   option netmask    255.255.255.0
   option dns    192.168.1.1

<defaults for all else>

(Last edited by haxwithaxe on 4 Jan 2010, 03:34)

Hello everyone,

I built an openwrt image with the wrt160nl profile and squashfs from version 19013 of trunk. The firmware installs fine and boots into openwrt the first time. However, after installing openwrt if I power cycle or reboot the router it will not boot into openwrt. This seemed like the same problem wyngnut was having on page 15. I tried installing the hacked u-boot.bin that androsyn posted and that installed fine, however the router still will not boot into the openwrt image. It will boot just fine when the stock linksys firmware is installed, however. Here are the errors that I am receiving:

ar7100> bootwrt
## Booting WRT160NL ...
## Booting image at 81800000 ...
Bad Magic Number
ar7100> boot
## Booting WRT160NL ...
Application code length 0x003a0000
Bad CRC: trx.crc32 0x682f4f44 calculate 0x3e24ebad

After installing the new boot.bin I had to change the values of environment variables for the ip addresses, and commit them with saveenv. I am thinking maybe I need to make some more tweaks to the boot environment vars? Also, I did wait 30+ minutes after initially booting the router before power cycling it, to make sure any filesystem operations were completed.

Does anyone have any ideas?

Any help is appreciated.
Thanks,

Justin


Update:

If anyone is interested, the root problem is that when mini_fo creates the jffs2 file system, something is changed which causes the u-boot CRC check to fail upon a subsequent reboot. And for whatever reason, using a different bootcmd did not fix the problem on my box.

But I was able to work around this by creating /jffs on a USB drive instead of directly on flash, using this write-up as a starting point: https://forum.openwrt.org/viewtopic.php?id=22842

(Last edited by jethier on 11 Jan 2010, 22:05)

hi everyone ,i have problem with usb flash disk , using it as extended filesystem ,somewhere since r18xxx change to r19xxx  my system constantly rebooting if some programs acessing usb flash  . ., no error or panic  ...is it bug ? or can be misconfiguration ?

UPDATE 1
i tried recompile from clear svn , no help , i tried compile usb modules as a package and install - now it look like it is ok , i will see

UPDATE 2
i dont know preciseli where was the problem , maybe somewhere in flash rom , or some svn update, but now i have stable system ...,anyway , this cool piece of hardware is blazing fast smile i have postgresql and freeradius2 on it previsourly tested on wrt54gl , which was unusable slow

Now, i want to get wpa or radius wpa working - do somebody know where is problem , only config issue , or drivers impementation  ?

(Last edited by calltrace on 13 Jan 2010, 18:50)

Has anyone tried out adhoc mode between wrt160nl?

I tried it out. It "works", but I get abysmal performance (around 100 ko/sec).

Any Idea ?

Hi,

I am a newbie and I just got the WRT160NL. Please help me understand how to "tftp flash" the router.
I read the "toh" page and I understand the concept.
I had set up serial console and can pause "u-boot" to see the "ar7100>" prompt.

But how do I physically connect WRT160NL to so that my pc can see it on 192.168.1.1?

I tried ethernet cable to connect LAN1/WAN port to my home router and I still not see it.

Help, I'm stuck.  CJ

Hi cj6666
you have to connect your computer directli to some of four RJ-45 conectors with UTP cable to LAN
next you have to manualy set ip of your computer to 192.168.1.(anything from 2 to 254)
then pause boot on router ,you get ar7100> promt , type upgrade code.bin ,hit enter
I dont know what OS you are using , mine is linux , im using tftp
command will look like this : tftp 192.168.1.1 69
you got
>
set mode to binary
>mode binary
upload firmware file
>put /path/to/directory/openwrt-ar71xx-wrt160nl-squashfs.bin
then you should be able to see loading progres in serial console

btw : have you read this thread ? it was described here more than once............

Question to all others - do domeone know what is the limit of squashfs.bin file ,as petersv write here https://forum.openwrt.org/viewtopic.php … 615#p98615  there is 8M flash , but when mi image hit 4.8M ..build feild - is this number a limit ?

(Last edited by calltrace on 14 Jan 2010, 00:44)

Thank you calltrace. But let me put in more details:

I'm using a Laptop running Window XP. This is what I did, step by step:

(1) Connect FTD serial cable to 160NL. Power on 160NL. I hit return several times and stop the boot. This is the log:

U-Boot 1.1.6 (May 12 2009 - 07:52:28)

AP81 (ar7100) U-boot
sri
32 MB
WRT160NL u-boot version: 1.0.0
Top of RAM usable for U-Boot at: 82000000
Reserving 279k for U-Boot at: 81fb8000
Reserving 192k for malloc() at: 81f88000
Reserving 44 Bytes for Board Info at: 81f87fd4
Reserving 36 Bytes for Global Data at: 81f87fb0
Reserving 128k for boot params() at: 81f67fb0
Stack Pointer at: 81f67f98
Now running in RAM - U-Boot at: 81fb8000
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
ag7100 get ethaddr for device eth0
Fetching MAC Address from 0x81feb1e0

 --------***** Get the RTL8306SD Manufactory ID=379c *****-------
 Reg6: speed=0 nway=1 duplex=0
 Reg5: speed=0 nway=0 duplex=0
 Reg1: a1=7fd9 a2=30e0 a3=15ac a4=30e0 a5=0
 Reg1: a1=7fd9 a2=30e0 a3=15ac a4=30e0
 Reg1: a1=7fd9 a2=30e0 a3=15ac a4=30e0
 Reg1: a1=7fd9 a2=30e0 a3=15ac a4=30e0
 Reg1: a1=7fd9 a2=30e0 a3=15ac a4=30e0
eth0: 00:25:9c:c0:6d:28
eth0 up
eth0
### main_loop entered: bootdelay=1

Hit any key to stop autoboot:  0
ar7100>

(2) I disable the wirelss lan on my laptop, set the network property to

ip: 192.168.1.10
subnet mask: 255.255.255.0
default gateway: 192.168.1.1

(3) Using ethernet cable, I connect laptops ethernet port to LAN1 of 160NL.

(4) Now, I tried pinging 192.168.1.1 from my laptop and got timeout message.

And this is where I am stuck. Shouldn't I be seeing the 160NL at the 192.168.1.1 ip address?

What did I do wrong? Thanks, CJ

Hey wink It's ok , because kernel is not running , this is only boot loader ..so no icmp (ping) request are accepted ,only ftp running. Not on standart 21 port ,as you can see on command line after tipe upgrade code.bin.  It listening on 69 port

Thanks, calltrace, I can flash it now. Yay!

And now WiFi NOT working. Bummer!!!  Back to more reading.. sigh..

Do you have your own compiled image or downloaded from site ?
all what you need is ath9k module loaded
'uci show wireless' show you configuration
what must be done:
'uci set wireless.radio0.disabled=0'
'uci commit wireless'
'wifi'

iwconfig will now show you wlan0 smile and you can configure it throught web interface (i dont know if it is in default package compiled)

(Last edited by calltrace on 14 Jan 2010, 17:49)

Thanks, calltrace.

I built my own image with the ar71xx and profile wrt160nl. And I am using "make menuconfig".
Looking into make menuconfig, I saw under kernel module ->wireless drivers, the kmod-ath9k was starred.

So I did include the module, correct? Do I also need to include kmod-madwifi module?

I want to configure WRT160NL to client mode and connect to my home router which is running 802.11b. I will be using it as wifi radio.

And another question, how to make the image permanent? After power cycle, the image I tftp'ed is gone.

Thanks for your patience. CJ

Using these three command, I can enable the wifi now:

'uci set wireless.radio0.disabled=0'
'uci commit wireless'
'wifi'

From my laptop, I can see from "available wifi connection", there is "openwrt" show up. Next, trying iwconfig now...

CJ

Yes ,stared driver is correct ...
I dont know about client mode working ,not tested by me (yet),so its on you , but instead of iwconfig you should use uci command
I will do some testing around in next week ,encription and wifi modes are too my interests , now i tunning postgres and freeradius settings to work

Its strange... , after power cycle you got back to original original linksys firmware ? I think its not possible ,but tri to flash it from web interface...

Sorry, posts 451 to 450 are missing from our archive.