OpenWrt Forum Archive

Topic: openwrt hostap support

The content of this topic has been archived on 24 Apr 2018. Unfortunately there are posts – most likely complete pages – missing.

tehlers wrote:

Hi,

I just saw that you solved my problem with the atheros card in openwrt. I tried
http://wifi.ozo.com/airo/asus/firmware/ … uashfs.bin
flashing on my wrt54g Version 1.0. After flashing the router hangs in a loop booting, resetting. Do I have to use a different Image for Version 1?

Thanks

tehlers

He didn't solved it. Our new includes added the needed timeout for Atheros cards to initialize.

Kaloz wrote:
tehlers wrote:

Hi,

I just saw that you solved my problem with the atheros card in openwrt. I tried
http://wifi.ozo.com/airo/asus/firmware/ … uashfs.bin
flashing on my wrt54g Version 1.0. After flashing the router hangs in a loop booting, resetting. Do I have to use a different Image for Version 1?

Thanks

tehlers

He didn't solved it. Our new includes added the needed timeout for Atheros cards to initialize.

Ok, so which patch in the openwrt-addons-source.tar.bz2 does the timeout?

As I mentioned for some reason I can't use the precompiled Image. I would compile my own then, but at first I want to understand...

Thanks

there are still known stability problems with madwifi/atheros and openwrt combos.  while hostap works quite stable for months now on a 4km asus wl500g outdoor link, the atheros do get some segfaults every now and then.  It can be a problem within the madwifi tree or with the openwrt or with the combination of two.  More debuging and testing is needed and this will come with the adaptation of openwrt and atheros solution by the community.  So be patient and do some further search/reading for this problem - never hurts - and if possible do share some of your findings with the forum!

Hi ,

I've been trying for a while to get this firmware to work on a wl500g rev 2.4.

I finally got it to boot by removing the out of the box broadcom mini pci card.
(the std one has a chip marked bcm4306kfb  model wl-120 R2.20)
Standard openwrt latest release would boot ok , but not any of acoul's versions.

I have been trying to get an atheros rev5 mini pci card to work that i scavenged
from a netgear wag311 pci card to no avail. (i'm on a learning curve with linux)
But this could be the same problem as follows.

On researching the netgear it looked like the support was a bit of a ? under madwifi
so i bought a CM9 Wistron (altheros based) expecting the ath0 to just come up on
boot, but still to no avail.

Have already tried a firstboot & mtd erase nvram

My question is for your sugestions from here;

I want to try manually loading the madwifi drivers for this card to see what actual
errors come up but am not sure of the order or required insmod commands or order.

I have a syslog server , but need instructions here to so i can set the wl500g up to
send the syslog capture on boot in the init.d somewhere.

Hope you can shed some clear light,

Thanks

Kazor

I've made some new modules based on todays madwifi cvs Main/Head tree.  I belive they've merged the BSD branch so ad-hoc and other goodies work just fine.  You can give them a shot here.  You need to load the modules by hand.  Since I don't have a box at hand, I don't remember the order, but with some testing it shouldn't be a problem to load them.

Ok just because i'm probably not the only one new to this,
here's what I found that helped.

On looking through a dmesg the hostap_pci module winges that there's not pci
device and doesn't load on boot.

So...

Here is the load order from http://www.madwifi.org/

I created a file /etc/init.d/S52atheros
then chmod 777 /etc/init.d/S52atheros
then put in this file
insmod /lib/modules/2.4.30/wlan.o
insmod /lib/modules/2.4.30/wlan_wep.o
insmod /lib/modules/2.4.30/ath_hal.o
insmod /lib/modules/2.4.30/ath_rate_onoe.o
insmod /lib/modules/2.4.30/ath_pci.o

At last ! We have an ath0

root@OpenWrt:/# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

ath0      IEEE 802.11  ESSID:""
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:00:00:00:00:00
          Bit Rate:0 kb/s   Tx-Power:20 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


Now refer to http://www.madwifi.org/Install-HOWTO/WL … config.txt for usage commands.

I have been getting segmentation faults when trying to do this but now i've got this working
i'll try your new drivers.


Thanks for the help,

Kazor

Here's an update on my progress with the WL500g

I got the CM9 Wistron to work once i worked out the madwifi load order ok.

Then i had to get the iwconfig / ifconfig /iwpriv order right,

I used

iwconfig ath0 mode master
iwconfig ath0 essid "testwl500"
iwpriv ath0 mode 1
iwconfig ath0 channel 48
iwconfig ath0 key off
ifconfig ath0 192.168.2.1 up

(refer http://www.madwifi.org/Install-HOWTO/WL … onfig.txt)

This brings it up in AP mode quite nicely.

NOTE : The drivers dont seem to like switching modes & iwconfig
dies with segfaults if you start in client mode and try to switch to AP.

I suggest you automate the iwconfig commands in the startup
script so it loads cleanly and is as stable as poss.

(Although i get kernel taint messages from ath_hal when it loads but it seems to work)

Moving on from this , i dug out the netgear mini pci card from the wag311 card.

This worked now as well , and actually showed a stronger signal on netstumbler on 5gig.
Not sure if this is because the cm9 has diversity connectors or not , but time will tell.

(By the way , i'm now using acoul's <thanks> latest madwifi drivers as linked above,
but haven't noticed any specific difference)

Cheers

Kazor

(Last edited by kazor on 17 Jul 2005, 03:42)

hi Acoul

i tried your latest trx on Toshiba WRT1000 .. the one from http://wifi.ozo.com/airo/asus/firmware/madwifi/
kismet_drone is not working ..

here is snip from dmesg

Enabling monitor mode
Enabling monitor mode
device wlan0 entered promiscuous mode
wlan0: process 1262 (kismet_drone) used deprecated iwpriv monitor - update software to use iwconfig mode monitor
wlan0: Disabling monitor mode
prism2: wlan0: operating mode changed 6 -> 3
prism2: wlan0: operating mode changed 3 -> 2
wifi0: LinkStatus=2 (Disconnected)
device wlan0 left promiscuous mode
wifi0: LinkStatus: BSSID=44:44:44:44:44:44
No Broadcom devices found.

any suggestions ?

(Last edited by svabo2k on 17 Jul 2005, 18:28)

and here is output of dmesg after acoul latest image boot

CPU revision is: 00024000
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 4kB, 2-way, linesize 16 bytes.
Linux version 2.4.31 (root@sancho) (gcc version 3.4.4) #7 Wed Jun 15 10:31:29
ST 2005
Setting the PFC value as 0x15
Determined physical RAM map:
 memory: 01000000 @ 00000000 (usable)
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/p
init noinitrd console=ttyS0,115200
CPU: BCM4710 rev 0 at 125 MHz
Using 62.400 MHz high precision timer.
!unable to setup serial console!
Calibrating delay loop... 82.94 BogoMIPS
Memory: 14300k/16384k available (1394k kernel code, 2084k reserved, 100k data,
6k init, 0k highmem)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
PCI: Fixing up bus 0
PCI: Fixing up bridge
PCI: Setting latency timer of device 01:00.0 to 64
PCI: Fixing up bus 1
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI
abled
Software Watchdog Timer: 0.05, timer margin: 60 sec
 Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Flash device: 0x400000 at 0x1fc00000
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "pmon"
0x00040000-0x003f0000 : "linux"
0x000ba5f8-0x00312000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read
nly
0x003f0000-0x00400000 : "nvram"
0x00320000-0x003f0000 : "OpenWrt"
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
ip_conntrack version 2.1 (5953 buckets, 5953 max) - 316 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 76k freed
Warning: unable to open an initial console.
Algorithmics/MIPS FPU Emulator v1.5
diag boardtype: 0000041c
jffs2.bbc: SIZE compression mode activated.
PCI: Setting latency timer of device 00:02.0 to 64
eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.23.0
PCI: Setting latency timer of device 00:08.0 to 64
eth1: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.23.0
No Broadcom devices found.
device eth0 entered promiscuous mode
br0: port 1(eth0) entering learning state
br0: port 1(eth0) entering forwarding state
br0: topology change detected, propagating
hostap_crypt: registered algorithm 'NULL'
hostap_pci: 0.3.9 - 2005-06-10 (Jouni Malinen <jkmaline@cc.hut.fi>)
PCI: Enabling device 01:01.0 (0000 -> 0002)
hostap_pci: Registered netdevice wifi0
wifi0: Original COR value: 0x0
prism2_hw_init: initialized in 200 ms
wifi0: NIC: id=0x8013 v1.0.0
wifi0: PRI: id=0x15 v1.1.1
wifi0: STA: id=0x1f v1.4.9
wifi0: defaulting to bogus WDS frame as a workaround for firmware bug in Host
 mode WDS
wifi0: Intersil Prism2.5 PCI: mem=0x40002000, irq=6
wifi0: registered netdevice wlan0
prism2_download: dl_cmd=4 start_addr=0x003f0000 num_areas=3
wifi0: test Genesis mode with HCR 0x1f
wifi0: Original COR value: 0x0
Readback test failed, HCR 0x1f write 00 e1 a1 ff read 00 c1 a1 c1
wifi0: test Genesis mode with HCR 0x0f
wifi0: Original COR value: 0xa1
Readback test succeeded, HCR 0x0f
prism2_hw_init: initialized in 10 ms
wifi0: NIC: id=0x8013 v1.0.0
wifi0: PRI: id=0x15 v1.1.4
Could not get RID for component STA
wifi0: Failed to read STA f/w version - only Primary f/w present
prism2_download: dl_cmd=1 start_addr=0x003f0c01 num_areas=3
prism2_hw_init: initialized in 30 ms
wifi0: NIC: id=0x8013 v1.0.0
wifi0: PRI: id=0x15 v1.1.4
wifi0: STA: id=0x1f v1.7.4
prism2: wlan0: operating mode changed 3 -> 2
br0: port 1(eth0) entering disabled state
br0: port 1(eth0) entering disabled state

(Last edited by svabo2k on 17 Jul 2005, 18:44)

Here is a new release based on WhiteRussian RC2.  So far hostap works rock stable.  Need testing/feedback for the cisco mpi350 and atheros mini PCI cards.

What is whiterussian rc2 ?

Now I saw the "whiterussian" at openwrt home. Thanks. :-P

I would be glad if someone would provide patches for CVS HEAD, so that the support for mini-pci cards get included in OpenWrt.

Any takers?

Hello,

will it be possible to replace the wifi  card of the wrt54g or asus accesspoint with  a 802.11a atheros minipci card and run it togehter with openwrt?
Or is there another 802.11a accesspoint  available running linux (with external antenna jack, the 802.11a/b/g netgear accesspoint has fixed antennas)?

Thanks for replys,
ray.

My openwrt firmware revision offers support for atheros along with cisco mpi350 and prism/hostap mini PCI cards.  I haven't test atheros on a real link, but next week I'll have some throughput lab results for the asus wl500g with the atheros working on 5Ghz band.  If I find some time and the openwrt developers want, I would be happy to submit patches and the procedure for merging this to the main openwrt tree.

so you bought an asus wl500g accesspoint and replaced the b/g minipci card with an atheros based 802.11a card - right?
It would be great if you could post your test results here.

can i get that firmware? i will put it on a 5.8 ghz link (7 km distance) to test CM9 (now it works on 2 linuxes with CM9 with 0.5 ms ping and 3 MB/sec speed...)

just give me a link... smile

Here are the bandwidth results for cisco mpi350, nl2511mp/prism2 and atheros cm9 Mini PCI WiFi cards on asus wl500g and a revised openwrt firmware based on WR-RC2

cisco mpi350, ad-hoc linux-2.4.31+WE-v.18
file size: 31,124,710  Transfer: 592.67 KB/s
Max, Average load: less than 0.18

nl2511mp/prism2, ad-hoc linux-2.4.31+WE-v.18
file size: 31,124,710  Transfer: 573.92 KB/s
Max, Average load: less than 0.25

nl2511mp/prism2, master/managed linux-2.4.31+WE-v.18
file size: 31,124,710  Transfer: 577.31 KB/s
Max, Average load: less than 0.41

atheros, cm9 master/managed linux-2.4.31+WE-v.18
file size: 868,628,480  Transfer: 2.68 MB/s
Max, Average load: less than 1.21

atheros, cm9 ad-hoc linux-2.4.31+WE-v.18
file size: 868,628,480  Transfer: 2.45 MB/s
Max, Average load less than 1.24

Direct Transfer PC-to-PC:
file size: 868,628,480  Transfer: 7.59 MB/s

The above test were made on a 100Mbit swicht network and
identical asus wl500g on bith ends.

All three drivers seem to behave stable but further testing is needed.

hello,
I have test the wl500g with an atheros minipci-card (chip AR5213A) and the new release based on RC2.
The new release seems to be much more stable.
It is always possible to provoke a segmentation fault  by senselessly switching between some options.
But on the whole there is no stability problem.
I test it as AP and STA in 2,4GHz band. No problem. About ~2MByte/s transfer volumen to a wl500gd.

The Problem is that the system runnig into an segmentation fault when you trying to switch between various optinons. for example, it runs as 11g AP  and i try to configure it as 11a STA.
The solution is, to relaod the kernel-modules before reconfigure the wifi-options.
I have make a simple script to reload the modules.
Doing the reload, it was possible to play wih various configurations, with out any segmentations fault´s.

creat work!

Tim wrote:

I have make a simple script to reload the modules.
Doing the reload, it was possible to play wih various configurations, with out any segmentations fault´s.

creat work!

Hello,

Would you mind sharing your script??? smile

I am having problems with segmentation faults, also....

looks like nbd also ported madwifi to the latest whiterussian build.  You may want to try his branch  He is a developer, I am just a little lazy hacker :-)  If you still need hostap support, my branch works quite rock stable on a few outdoor production units here.

New release based on openwrt-whiterussian-rc3 whith today's Madwifi CVS here.  The usual support for madwifi, hostap and cisco mpi350 wifi cards. A big thanks to the openwrt team for such a great hack oops distro I meant to say :-)

Enjoy,

--alex

(Last edited by acoul on 13 Oct 2005, 15:40)

acoul wrote:

New release based on openwrt-whiterussian-rc3 whith today's Madwifi CVS here.  The usual support for madwifi, hostap and cisco mpi350 wifi cards. A big thanks to the openwrt team for such a great hack oops distro I meant to say :-)

Enjoy,

--alex

Erm... I'm being dumb here - but does this mean that WhiteRussian-RC3 will support a vanilla (stock) Toshiba WRC-1000 out-of-the-box with no modifications? Or just that the MadWiFi has been included into the CVS tree?

Many thanks acoul for all the work published so far!

C.

As you can see there is no much feedback from the community on wifi cards other than the stock broadcom and the developers are too busy hacking to provide too much support or feedback.  I am hacking and porting stuff to whiterussian releases according to the needs of the AWMN community and the branches I make do work on real outdoor long range (1 - 9 Klm) links.  Don't expect too much support/feedback though either since my time is also too limited.

(Last edited by acoul on 16 Nov 2005, 11:03)

acoul wrote:

As you can see there is no much feedback from the community on wifi cards other than the stock broadcom and the developers are too busy hacking to provide too much support or feedback.  I am hacking and porting stuff to whiterussian releases according to the needs of the AWMN community and the branches I make do work on real outdoor long range (1 - 9 Klm) links.  Don't expect too much support/feedback though either since my time is also too limited.

OK. Here's some feedback: Sorry, but your sources are not usable for us in any way. Instead of integrating the features into the build system, you only changed the temporary source trees that are generated during the build process. There's no way that we can use that...
If you want to have your stuff integrated, please familiarize yourself with the build system and use it. I can help you with that, if you like. Then you won't have to do the same hacks over and over again whenever a new OpenWrt version is released.

The discussion might have continued from here.