OpenWrt Forum Archive

Topic: OpenWRT on WAP54G Howto

The content of this topic has been archived on 7 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

Could you help me creating a minihowto about openwrt on wap54g?

These are the frist steps worked for me:
1. Enabled boot_wait. I could do this with installing Sveasoft Freya firmware, anabled telnet on the web page, so that I got a prompt on the AP.
nvram set boot_wait=on; nvram commit
Before flasing openwrt, make sure the AP is in AP mode and you can connect it via wireless!

2. I could tftp (netkit-tftp doesn't work for me, but atftp does) openwrt-linux.trx (CVS version) to the AP.

3. After booting with openwrt, I could ping the AP, however telnet does not work from the lan. I had to connect via wireless and telnet works. Seems that openwrt configures the léan interface as the wan interface on the wrt54g.

As I've seen, eth1 and br0 has the same IP while eth1 is added to br0 also. I think eth1 shouldn't have to be configured with IP.

I'm at this stage now, and I've made a mistake (bad net configuration whith self created network startup script), so that I can't telnet via lan and no wireless sad
Could someone help me how to remove this bad startup script now?
I've tried to flash via tftp the original Linksys(Cisco) firmware. It works, and in this case the AP is ok. After this I've re-flashed openwrt, and it went back into the original bad state (I can ping via lan on the IP I've set up, but no telnet, no wireless). Seems that flashing the original firmware doesn't clean the jffs2 partition, so that the re-flashed openwrt can mount and use it sad
Any suggestion?

Regards,
Slapic

something different on your nvram settings?

did you set your nvram settings identical to the way it was when it was stock (beside the boot_wait)??

I really hope you get this going as I have been wanting openwrt on a wap54 for quite a while now smile

what version of wap54 are you using?

something different on your nvram settings?

did you set your nvram settings identical to the way it was when it was stock (beside the boot_wait)??

I really hope you get this going as I have been wanting openwrt on a wap54 for quite a while now smile

what version of wap54 are you using?

My problem is not the nvram, but the changed /etc/init.d/S40network script. I've disabled wlan and configured it to correctly configure the laninterface.
I've forget to disable the firewall script, so it filters telnet on the lan side sad

Anyway, using the howto I've written you can try to flash openwrt onto your WAP54G I think. Just don't make the same mistake I've done. Configure everithing via nvram, so that you can use the reset button to revert it.

Regards,
Slapic

The problem stems from the fact there's no simple way to identify what hardware openwrt is running on. It will detect a wap54g as a wrt54g v1.0 and attempt to use vlans to control the ethernet switch, which only works if you have an ethernet switch or a vlan equipped network.

Edit /etc/nvram.overrides, comment out the following:

  remap lan_ifname                                                              
  remap lan_ifnames
  remap wifi_ifname
  remap wifi_ifnames
  remap wan_ifname
  remap wan_ifnames
  remap pppoe_ifname

The problem stems from the fact there's no simple way to identify what hardware openwrt is running on. It will detect a wap54g as a wrt54g v1.0 and attempt to use vlans to control the ethernet switch, which only works if you have an ethernet switch or a vlan equipped network.

Edit /etc/nvram.overrides, comment out the following:

  remap lan_ifname                                                              
  remap lan_ifnames                                                             
  remap wifi_ifname                                                            
  remap wifi_ifnames                      
  remap wan_ifname                        
  remap wan_ifnames          
  remap pppoe_ifname            

That works. Thanx.
I've removed S45firewall from /etc/init.d and commented out the lines above. Now I can telnet to the AP via LAN interface.

I'll copy the howto to the WiKi.

Regards,
Slapic

Could someone please post an NVRAM dump from a WAP54G?

I can, I have one still new in a box. Whats the best way for me to do that? There a way I can get that using the stock linksys firmware?

I'm very interested in openwrt on the waps, let me know if I can do anything smile

The userguide describes how to set boot_wait and view the nvram variables via ping.asp, if you only want to view the variables all all you need is:

;cp${IFS}*/*/nvram${IFS}/tmp/n
;*/n${IFS}show>tmp/ping.log

I flashed freya on to it and enabled telnet..

here's the output of nvram show

BusyBox v0.60.0 (2004.04.16-23:22+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# nvram show
os_ram_addr=80001000
wan0_primary=1
wl0_frameburst=off
log_ipaddr=0.0.0.0
il0macaddr=00:0F:66:18:84:94
boardrev=0x10
et0macaddr=00:0F:66:18:84:94
d11g_mode=1
watchdog=1000
boot_wait=on
wl_phytypes=g
wl0_infra=1
wl0_country_code=JP
et0mdcport=0
SNMPCommunityOne=public
fw_disable=0
wshaper_enable=0
wl_infra=1
pmon_ver=CFE 3.51.21.0
restore_defaults=0
antenna_selection=default
wshaper_downlink=0
ap_repeater_channel=
d11g_dtim=3
http_wanport=
wl0_ifname=eth1
wshaper_uplink=0
wan_netmask_1=255
wan_netmask_2=255
wan_netmask_3=255
wan_netmask_4=0
wl0_mode=ap
wan_gateway=192.168.0.1
wan_ipaddr_1=192
wan_ipaddr_2=168
wan_ipaddr_3=0
os_flash_addr=bfc40000
wan_ipaddr_4=245
wshaper_nopriohostsrc=
wl0_gmode=1
sromrev=2
auth_mode=disabled
boardtype=0x0446
FilterSwitch=0
wl_gmode=1
wl0_auth_type=2
wl_mac_index=0
d11g_rate=0
lan_netmask=255.255.255.0
SYSName=
wl0_ssid=linksys
wl0_dtim=3
http_username=
os_date=Dec 30 2003
FirmwareVersion=v2.06, Dec 16, 2003
http_lanport=80
wds0=
wl_plcphdr=long
wds1=
wl_macmode=disabled
wds2=
wds3=
wl0_key1=
wl0id=0x4320
wl_phytype=g
wan_netmask=255.255.255.0
wl0_key2=
wl_lazywds=1
wl0_key3=
wl0_key4=
wshaper_nopriohostdst=
d11g_rts=2346
ag0=255
http_passwd=admin
lan_stp=1
chk_downgrade_hdr=Enabled
wl_mode=ap
wl0_plcphdr=long
wl0_closed=0
wl0_rate=0
wl0_macmode=disabled
wl0gpio0=0
d11g_rateset=default
wl0_radioids=BCM2050
wl0gpio1=0
wl0_phytype=g
wl0gpio2=0
wl0_lazywds=1
wl0gpio3=0
wl0gpio4=0
wl0gpio5=2
d11g_rts_cts=off
boardflags2=0
wl0_antdiv=-1
cfe_version=3.51.21.0.5
wl_dtim=3
wl_ssid=linksys
ap_client_wep_key=
d11g_bcn=100
radius_port=1812
wl_mac_hwaddr=
wl_passphrase=
os_server=
wan_proto=static
wl_key1=
wl_key2=
wl0_unit=0
wl_key3=
wl_country_code=JP
wl_key4=
wshaper_noprioportsrc=
wl_hwaddr=
PassphraseKeyLength=0
pa0itssit=62
SNMPEnable=0
MyFirmwareVersion=v1.45.16(USA), Dec 29, 2003
ap_client_wep=off
d11g_frag=2346
wl0_wds=
ap_mode=0
wl_rate=0
cctl=0
ap_client_ssid=
log_level=0
telnetd_enable=1
SYSLocation=
lan_ifnames=eth0 eth1
wl0_auth=0
wl0_radius_port=1812
sshd_port=22
wshaper_noprioportdst=
wl_country=Japan
pa0maxpwr=60
ap_client_mac=
wl_auth_type=2
wl_rateset=default
clkfreq=200
lan_ipaddr=192.168.0.245
os_name=linux
lan_proto=static
aa0=3
RWEnableTwo=0
wl_unit=0
wl0_phytypes=g
wl0_wep=off
wl0_frag=2346
fw_hdr=00 90 4B 21 BC C7 00 06
d11g_channel=6
router_disable=1
sdram_config=0x0032
wl0_country=Japan
radius_ipaddr_1=0
radius_ipaddr_2=0
wl_wds=
sshd_passwd_auth=0
scratch=a0180000
radius_ipaddr_3=0
sshd_enable=1
radius_ipaddr_4=0
ccode=0
wl0_rateset=default
SYSContact=
lan_ifname=br0
boardflags=8
wl0_mac=
sdram_refresh=0x0000
wl_auth=0
sdram_ncdl=0x1c
radius_key=
wl_frameburst=off
wan_ipaddr=192.168.0.245
wl0_passphrase=
wl0_mac_hwaddr=
radius_ipaddr=
wl0_rts=2346
wl_ifname=
wl_wep=off
chk_fw_hdr=Disabled
os_version=3.51.21.0
wl_gmode_protection=off
wl0_wpa_gtk_rekey=300
sshd_rsa_host_key=
wan0_desc=Default Connection
wl_frag=2346
wl0_key=1
RWEnableOne=0
wl_maclist=
txant=3
et0phyaddr=0
console_loglevel=1
security_mode_page=4
wan_ifname=eth1
sshd_authorized_keys=
wl_radioids=
lastpage=1
wan_hostname=Linksys WAP54G
wl_mac=
ap_client_wep_mode=open
wl0_radio=1
wl_corerev=
wl_channel=6
d11g_hwaddr=
wl0_bcn=100
wl0_hwaddr=00:0F:66:18:84:94
wl_radio=1
wl0_gmode_protection=off
pa0b0=0x119a
wl0_maclist=
pa0b1=0xfb93
pa0b2=0xfea5
sdram_init=0x0002
wl_rts=2346
wl0_mac_index=0
dl_ram_addr=a0001000
EnableLAN=on
wpa_psk=
lan_hwnames=et1 wl0
wan0_unit=0
SNMPCommunityTwo=private
ap_repeater_mode=stop
wl0_corerev=7
wl_key=1
wl0_channel=6
curpage=1
wl0_auth_mode=disabled
wpa_gtk_rekey=300
wl_closed=0
txpwr=28
wan_gateway_1=192
boardnum=1024
log_ipaddr_1=
wan_gateway_2=168
ap_repeater_mac=
ap_repeater_ssid=
log_ipaddr_2=
wan_gateway_3=0
wl_bcn=100
log_ipaddr_3=
wan_gateway_4=1
log_ipaddr_4=
wl_antdiv=-1
size: 3807 bytes (28961 left)

Thanks.

It appears as if the only thing preventing openwrt from working is the fact openwrt firewalls off the wan interface by default, which in this case is also the lan interface.

I've updated some of the scripts to avoid this, hopefully the current snapshots will work on the wap54g without requiring any changes.

I've updated some of the scripts to avoid this, hopefully the current snapshots will work on the wap54g without requiring any changes.

So, does that mean that if I install a new snapshot on a wap54g with the reset button near the ethernet jack it will actually work?

I've updated some of the scripts to avoid this, hopefully the current snapshots will work on the wap54g without requiring any changes.

So, does that mean that if I install a new snapshot on a wap54g with the reset button near the ethernet jack it will actually work?

I don't think so.
In that unit, something is wrong with the LAN interface, so that the current driver (all drivers in Openwrt, Freya, Mustdie and all Linksys firmware with version 2.x up to 2.06) can't handle the lan chip.
On this unit, you can use Linksys firmwares 1.x and 2.y where y >= 7 (eg. 2.07 works, 2.06 doesn't). For me, nothing else worked.

On units, where the reset button is near to the antenna, all firmwares worked for me.
As Linksys hasn't released sources for 2.07 firmware, I don't know what is the difference between 2.06 and 2.07.

Regards,
Slapic

ps.:
WAP54G has a completly different web interface than on WRT54G(S), and no ping.asp to break in.
You can try to install Sveasoft Freya to enable boot_wait (as I remember, Freya enables boot_wait automatically).

As Linksys hasn't released sources for 2.07 firmware, I don't know what is the difference between 2.06 and 2.07.

Take that back! tongue j/k, but on linksys's site they do have the firmware sources for 2.07... 2.07   Source

Hi, I'm interesting in flashing the WAP54G ver 1.1 with the OpenWRT firmware. The WAP54G I have is the one with the reset-button near to the rj45 port, this is because the board inside is the half size of other version of wap's. I flashed with Freyra to set the boot_wait=on and both ethernet and wireless interfaces are running. Now I'm ready to flash with Openwrt via tftp, but when I execute the comand

 # atftp 192.168.1.245
tftp> trace
Trace mode on.
tftp> timeout 1
tftp> put Freya-v2.06-1sv.trx
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
tftp: aborting

asap when I connect the power I get no response from the server. I tried several times, but nothing.
I scanned the tcp and udp ports 69 (tftp) of the wap54g with nmap during the boot process but nmap says that all ports are closed. I read that this version of hardware 1.1 with the reset-button near the rj45 port has difficulties with some firmware like Freyra, Openwrt and also with Linksys 2.06, but I could flash with Freyra 2.06. Now my question:
Has this hardware release got the tftp server in the boot process? Remember I'm talking the WAP54G ver 1.1 made in Taiwan.
Well, thanks for your support.
Marcos

Hi, I'm interesting in flashing the WAP54G ver 1.1 with the OpenWRT firmware. The WAP54G I have is the one with the reset-button near to the rj45 port, this is because the board inside is the half size of other version of wap's. I flashed with Freyra to set the boot_wait=on and both ethernet and wireless interfaces are running. Now I'm ready to flash with Openwrt via tftp, but when I execute the comand

 # atftp 192.168.1.245
tftp> trace
Trace mode on.
tftp> timeout 1
tftp> put Freya-v2.06-1sv.trx
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
sent WRQ <file: Freya-v2.06-1sv.trx, mode: octet <>>
timeout: retrying...
tftp: aborting

asap when I connect the power I get no response from the server. I tried several times, but nothing.
I scanned the tcp and udp ports 69 (tftp) of the wap54g with nmap during the boot process but nmap says that all ports are closed. I read that this version of hardware 1.1 with the reset-button near the rj45 port has difficulties with some firmware like Freyra, Openwrt and also with Linksys 2.06, but I could flash with Freyra 2.06. Now my question:
Has this hardware release got the tftp server in the boot process? Remember I'm talking the WAP54G ver 1.1 made in Taiwan.
Well, thanks for your support.
Marcos

set Your client to ping 192.168.1.1 now connect the wap54g to power source .. at 3rd second (since powered) you should see pings coming back, sometimes you get 1 sometimes 3 or sometimes you get none. If You don't get any, boot_wait is'nt set ... point beeing: write the tftp command, connect ap to power outlet, count to three and hit enter, repeat until sucessful.

let "us" know where it gets you, I was'nt able to modify anything last time I tried, the filesystem was readonly and unlocking/mounting did'nt work after firstboot though there was no safe boot variable present so I got tired for a while ...

Using a new v2 WAP54G, I got to the same place as "Illegal" above.

dmegs output shows:
[snip]
Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1e00000 for the chip at 0x0
number of CFI chips: 1
0: offset=0x0,size=0x2000,blocks=8
1: offset=0x10000,size=0x10000,blocks=31
Flash device: 0x200000 at 0x1c000000
Physically mapped flash: squashfs filesystem found at block 913
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "pmon"
0x00040000-0x001f0000 : "linux"
0x000e4498-0x001b58a9 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x001f0000-0x00200000 : "nvram"
0x001c0000-0x001f0000 : "OpenWrt"
sflash: found no supported devices

mount output shows:
@Linksys WAP54G:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               896.0k    896.0k         0 100% /
/dev/mtdblock/4         192.0k    192.0k         0 100% /jffs

any further attempt to write to /jffs fails "out of space".

@Linksys WAP54G:/# mkdir /jffs/bin
mkdir: Cannot create directory `/jffs/bin': No space left on device

I opened up the WAP54G and found a single Intel TE 28F160 on the back of the board. Looking this device up on Intel.com confirms it's a 2 Meg part.
     
http://www.intel.com/design/flcomp/supp … 060805.pdf

So the Flash is pretty much full on a v2 WAP54G before firstboot can even copy root to jffs2.

Hi folks, I finally flashed my WAP54G ver 1.1 (with the reset button near the ethernet port) with the OpenWrt firmware. First, I flashed with Freya to insepct the network interfaces and found out that there were 2 ethernet ifaces (eth0 and eth1), but only eth1 is the real ethernet port, and the wireless iface (eth2). Both eth1 and eth2 were added to the bridge br0. So, I modified the init.d scripts:
S10boot:

#!/bin/sh
sysctl -p
echo "S" > /proc/jffs2_bbc

mkdir -p /var/run

insmod et
insmod wl

ifconfig lo 127.0.0.1 up
ifconfig eth0 promisc
ifconfig eth1 promisc

syslogd -C 16

S40network

#!/bin/sh
if=$(awk 'sub(":","") {print $1}' /proc/net/wireless)
/usr/sbin/wlconf $if up
/sbin/ifconfig eth0 0.0.0.0 up
/sbin/ifconfig eth1 0.0.0.0 up
/sbin/ifconfig eth2 0.0.0.0 up
/usr/sbin/brctl addbr br0
/usr/sbin/brctl stp br0 off
/usr/sbin/brctl addif br0 eth0
/usr/sbin/brctl addif br0 eth1
/usr/sbin/brctl addif br0 eth2
/sbin/ifconfig br0 192.168.1.245 up

removed S45firewall
S50services

#!/bin/sh
/usr/sbin/telnetd -l /bin/login
/usr/sbin/httpd -p 80 -h /www -r WRT54G Router
/usr/sbin/dnsmasq

Fourtunatelly, I flashed with success, but happyness never is complete sad, the wireless iface is down. Aparently the wl.o module has conflicts:

@(none):/# insmod wl
Using /lib/modules/2.4.20/wl.o
insmod: init_module: wl: No such device

Has anybody know why I can't insmod the wl.o module?

Hi everybody... This week I succesfully installed FreiFunk OpenWRT software on my WAP54g v 2.0. First I enabled Telnet (Freya firmware), set Boot_Wait=On, TFTP-ed Freifunk trx file. After that I lost communication over LAN port and I had to connect to AP through WiFi. To enable LAN port on WAP54g v 2.0 you have to do the following:

nvram set lan_ifnames=eth0 eth1

eth0 is the LAN port on WAP54g v 2.0

I am using this AP as a wireless client on 2km link to my Internet source... And before I upgraded it to OpenWRT it was rebooting all the time - every few hours, and everytime you had to manually connect it to the other AP (search for Wireless networks - Connect). It works now for 2 days without any ping to the other side lost.

The discussion might have continued from here.