Login

logo6

Haikuware News & Blogs

Spread your news, software reviews, comments, & ideas about Haiku!

2009-07-11: WiFi prototype works

Colin Günther
Colin Günther
Colin Günther has not set their biography yet
User is currently offline
Jul 12 MyBlog 6 Comments

 On the screenshot, you see Firefox surfing www.haiku-os.org and downloading a 100 MiB file from my ftp server in parallel. The terminal is showing the result of the ifconfig command for my WiFi-card.


The image is scaled down and maybe cut on the right border. For full resolution save the picture and open it with your favorite app.

I managed to port the FreeBSD WiFi-stack, utilizing Haiku's FreeBSD compatibility layer. Thus I could use the WiFi-card driver for my atheros chipset from FreeBSD without any major changes to its codebase (I had to move some interrupt handler code into driver-specific glue code). The driver-binary has a size of 500 KiB, due to compiling the WiFi-stack into a static library and statically linking it and the FreeBSD compat layer with the driver. The sources are up in the repository.

The atheros driver should support every atheros chipset, which are supported by the FreeBSD driver (look in the corresponding FreeBSD manpage for more information on supported chipsets).

Designing a Haiku specific WiFi-stack will be my next step. The proposed finish date of the bounty is still 2009/09/24.

For the brave only: The source can be checked out via svn checkout http://svn.osdrawer.net/haiku-wifi/prototype/trunk/wifi. I recommend you use the 3rdparty subdirectory as checkout location, because the Jamfiles expect themselves there. With jam ath everything needed (customized FreeBSD compat layer, WiFi stack, atheros driver) gets built.

Update: For developing I used a gcc2 build environment and Haiku rev. 31286 was the newest I tested it on. There are no settings to set to make this driver work. Just put the driver in /home/config/add-ons/kernel/drivers/bin an make a symlink to /home/config/add-ons/kernel/drivers/dev/net/ath. A reboot could be required to make Haiku recognize the new driver.

To check whether your atheros card gets at least detected by this driver, watch the debug messages during the bootphase or look into the /boot/var/log/syslog file. If you see something like

Adding entry for IEEE 802.11 Wireless Ethernet mode autoselect autoselect
Adding entry for IEEE 802.11 Wireless Ethernet mode autoselect autoselect <adhoc>
Adding entry for IEEE 802.11 Wireless Ethernet mode autoselect autoselect <hostap>
Adding entry for IEEE 802.11 Wireless Ethernet mode autoselect autoselect <flag0,adhoc>
Adding entry for IEEE 802.11 Wireless Ethernet mode autoselect autoselect <monitor>

you know that your card is detected.

Update2: To connect to a WLAN make sure that it is an unprotected (no WPE, WPA, WPA2) one that doesn't need a password for login. On my Fritz!Box this is called "unverschlüsselten Zugang aktivieren" (activate unencrypted access).

For more information on technical aspects of the hardware I use surf to the bounty proposal and select the "Technical Information" tab.


I will give no support for this prototype 'cuz it is a prototype ;-). It is intended for the purpose of gaining knowledge, only.

Tags: WLAN
Hits: 18795
0 votes

About the author

Colin Günther

Colin Günther has not set their biography yet

Comments  

 
0 # Meanwhile 2009-07-11 23:07
Good work, thanks. Anybody reading this and agreeing might want to donate to the WiFi bounty...atm just about 200 dollar short of the 2000 set out for it.
 
 
0 # Meanwhile 2009-07-11 23:09
Oh, that should be 280 short...;-)
 
 
0 # umccullough 2009-07-12 00:10
He also posted this news on his haiku-os.org blog: www.haiku-os.org/blog/coling/2009-07-12/wifi_stack_prototype_works

where there are already more positive comments gathering :-)
 
 
0 # eeepc 701atomozero 2009-07-13 03:59
hi!
i have problem whit my eeepc 701, on syslog i found it:

...
KERN: atheros: init_driver(0x83fb8768)
KERN: ath_pci_attach: trying to attach
KERN: [atheros] (if_ath) bus_alloc_resource(3, [16], 0x0, 0xffffffff, 0x1, 0x2)
KERN: [atheros] (if_ath) bus_alloc_resource(1, [0], 0x0, 0xffffffff, 0x1, 0x6)
KERN: ath_pci_attach: mapped interrupt.
KERN: ath_pci_attach: PCI attaching finished.
KERN: if_initname(0x815c9c80, if_ath, 3)
KERN: [atheros] atheros: /dev/net/atheros/0
KERN: [net/atheros/0] unable to attach hardware; HAL status 13
...

...
ERN: PCI: [dom 0, bus 1] bus 1, device 0, function 0: vendor 168c, device 001c, revision 01
KERN: PCI: class_base 02, class_function 00, class_api 00
KERN: PCI: vendor 168c: Atheros Communications Inc.
KERN: PCI: device 001c: AR242x 802.11abg Wireless PCI Express Adapter (AR5007EG 802.11bg Wi-Fi mini PCI express card)
KERN: PCI: info: Network controller (Ethernet controller)
KERN: PCI: line_size 04, latency 00, header_type 00, BIST 00
KERN: PCI: ROM base host 00000000, pci 00000000, size 00000000
KERN: PCI: cardbus_CIS 00005001, subsystem_id 1026, subsystem_vendor_id 1a3b
KERN: PCI: interrupt_line 0a, interrupt_pin 01, min_grant 00, max_latency 00
KERN: PCI: base reg 0: host fbef0000, pci fbef0000, size 00010000, flags 04
KERN: PCI: base reg 1: host 00000000, pci 00000000, size 00000010, flags 0f
KERN: PCI: base reg 2: host 00000000, pci 00000000, size 00000000, flags 00
KERN: PCI: base reg 3: host 00000000, pci 00000000, size 00000000, flags 00
KERN: PCI: base reg 4: host 00000000, pci 00000000, size 00000000, flags 00
KERN: PCI: base reg 5: host 00000000, pci 00000000, size 00000000, flags 00
KERN: PCI: Capabilities: PM, MSI, PCIe, MSI-X
...

any idea?
 
 
0 # @atomozerocolin 2009-07-13 19:55
It's a known problem. Look here to get more info.
But as this is declared as a prototype driver (=throw it away of it is done) I'm not going to invest any time into solving it.
 
 
0 # colin 2009-07-13 19:56
here should link to http://dev.osdrawer.net/issues/show/272. sorry
 


Please register to post comments

The Largest BeOS/Haiku Software Repository