Adding wireless to PPC 9.0 STABLE

I've successfully installed 9-STABLE on my 15" Powerbook PPC. I successfully got Xorg up and running and after a week of a [cmd=]make install clean[/cmd] in the x11/gnome2 port I now have Gnome up and running. I'm able to connect to the web via ethernet and load a browser. Still need to install firefox.

Now I'm trying to understand the Handbook concerning wireless setup and modules versus a kernel compile of capabilities. I'm a newbie to FreeBSD and just installed the standard configuration, but I did install the source.

The Handbook states:

32.3.2 Basic Setup
32.3.2.1 Kernel Configuration
To use wireless networking, you need a wireless networking card and to configure the kernel with the appropriate wireless networking support. The latter is separated into multiple modules so that you only need to configure the software you are actually going to use.

The first thing you need is a wireless device. The most commonly used devices are those that use parts made by Atheros. These devices are supported by the ath(4) driver and require the following line to be added to the /boot/loader.conf file:

if_ath_load="YES"
The Atheros driver is split up into three separate pieces: the proper driver (ath(4)), the hardware support layer that handles chip-specific functions (ath_hal(4)), and an algorithm for selecting which of several possible rates for transmitting frames (ath_rate_sample here). When this support is loaded as kernel modules, these dependencies are automatically handled for you. If, instead of an Atheros device, you had another device you would select the module for that device; e.g.:

if_wi_load="YES"
for devices based on the Intersil Prism parts (wi(4) driver).

Note: In the rest of this document, we will use an ath(4) device, the device name in the examples must be changed according to your configuration. A list of available wireless drivers and supported adapters can be found in the FreeBSD Hardware Notes. Copies of these notes for various releases and architectures are available on the Release Information page of the FreeBSD Web site. If a native FreeBSD driver for your wireless device does not exist, it may be possible to directly use the Windows® driver with the help of the NDIS driver wrapper.

Under FreeBSD 7.X, with a device driver you need to also bring in the 802.11 networking support required by the driver. For the ath(4) driver these are at least the wlan(4), wlan_scan_ap and wlan_scan_sta modules; the wlan(4) module is automatically loaded with the wireless device driver, the remaining modules must be loaded at boot time via the /boot/loader.conf file:

wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
Since FreeBSD 8.0, these modules are part of the base wlan(4) driver which is dynamically loaded with the adapter driver.

With that, you will need the modules that implement cryptographic support for the security protocols you intend to use. These are intended to be dynamically loaded on demand by the wlan(4) module but for now they must be manually configured. The following modules are available: wlan_wep(4), wlan_ccmp(4) and wlan_tkip(4). Both wlan_ccmp(4) and wlan_tkip(4) drivers are only needed if you intend to use the WPA and/or 802.11i security protocols. If your network does not use encryption, you will not need wlan_wep(4) support. To load these modules at boot time, add the following lines to /boot/loader.conf:

wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
With this information in the system bootstrap configuration file (i.e., /boot/loader.conf), you have to reboot your FreeBSD box. If you do not want to reboot your machine for the moment, you can load the modules by hand using kldload(8).

Note: If you do not want to use modules, it is possible to compile these drivers into the kernel by adding the following lines to your kernel configuration file:

device wlan # 802.11 support
device wlan_wep # 802.11 WEP support
device wlan_ccmp # 802.11 CCMP support
device wlan_tkip # 802.11 TKIP support
device wlan_amrr # AMRR transmit rate control algorithm
device ath # Atheros pci/cardbus NIC's
device ath_hal # pci/cardbus chip support
options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors
device ath_rate_sample # SampleRate tx rate control for ath
Both following lines are also required by FreeBSD 7.X, other FreeBSD versions do not need them:

device wlan_scan_ap # 802.11 AP mode scanning
device wlan_scan_sta # 802.11 STA mode scanning
With this information in the kernel configuration file, recompile the kernel and reboot your FreeBSD machine.

When the system is up, we could find some information about the wireless device in the boot messages, like this:

ath0: <Atheros 5212> mem 0x88000000-0x8800ffff irq 11 at device 0.0 on cardbus1
ath0: [ITHREAD]
ath0: AR2413 mac 7.9 RF2413 phy 4.5

I added both
Code:
if_ath_load="YES"
and
Code:
if_wi_load="YES"

My Powerbook does have wireless capabilities, but in network preferences or "anywhere" I don't see an option to connect to a "wireless" network. So do I have to start all over and somehow study how to build a custom kernel to include wireless capabilities?

If so where do I get started?

Thank you, Samuel.
 
The very first question to answer is what type of wireless chipset is installed. Try this:
% pciconf -lv | grep -B3 network

What does that show? If it lists an Atheros card, that's good news. See Quick Wireless Setup On FreeBSD.

Either way, please show the output.
 
wblock@ said:
The very first question to answer is what type of wireless chipset is installed. Try this:
% pciconf -lv | grep -B3 network

What does that show? If it lists an Atheros card, that's good news. See Quick Wireless Setup On FreeBSD.

Either way, please show the output.

Don't see an Aheros Card:
Here is my output:
Code:
localhost# pciconf -lv | grep -B3 network
none0@pci1:0:18:0:	class=0x028000 card=0x004e106b chip=0x432014e4 rev=0x03 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM4306 802.11b/g Wireless LAN Controller'
    class      = network
--
gem0@pci2:0:15:0:	class=0x020000 card=0x00000000 chip=0x0032106b rev=0x80 hdr=0x00
    vendor     = 'Apple Computer Inc.'
    device     = 'UniNorth 2 GMAC (Sun GEM)'
    class      = network

I tried the quick setup method and rebooted and no go.
I'll check out the manual methods.
 
Ah, Broadcom, the kiss of death. There is a chance that card will work with bwi(4). See that man page (it's a link). You have to install a port for the firmware that makes that card operate, then load it in /boot/loader.conf.
 
wblock@ said:
Ah, Broadcom, the kiss of death. There is a chance that card will work with bwi(4). See that man page (it's a link). You have to install a port for the firmware that makes that card operate, then load it in /boot/loader.conf.

So at term # man bwi ?

So are you running a ppc version of FreeBSD ?
What port ?
 
Still trying wireless on my powerbook

wblock@ said:
Yes, or click the link in post #4.
No.

Hope your still out there wblock in FreeBSD forum land somewhere. I finally got around to installing the "bwi" port and then adding to my /boot/loader.conf
Code:
if_ath_load="YES"
if_wi_load="YES"
if_urtw_load="YES"
if_bwi_load="YES"
When I run the command
# ifconfig
I get the following output:
Code:
localhost# ifconfig
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 02:0a:95:db:71:32
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	ch 1 dma -1
gem0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
	ether 00:0a:95:db:71:32
	inet6 fe80::20a:95ff:fedb:7132%gem0 prefixlen 64 scopeid 0x6 
	inet6 2002:42e9:489:0:20a:95ff:fedb:7132 prefixlen 64 autoconf 
	inet 192.168.1.132 netmask 0xffffff00 broadcast 192.168.1.255
	nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=3<RXCSUM,TXCSUM>
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x7 
	inet 127.0.0.1 netmask 0xff000000 
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
I know the gem0 is my ethernet I'm connected to and lo0 has something to do with localhost. I don't see the name of my wireless network in the above code..., so does this mean that the "bwi" is the wrong option for discovering my network ? Or should I do some more studying of the ifconfig command and the wireless portion of the handbook to see if there is more I'm missing in my "loader.conf" .

Thanks as always for any input !!!

Samuel
 
Look at the dmesg(8) output for clues, it's possible that the card you have isn't supported by any of the drivers you loaded or there's some other problem with the drivers.
 
macunkie said:
Hope your still out there wblock in FreeBSD forum land somewhere. I finally got around to installing the "bwi" port and then adding to my /boot/loader.conf
Code:
if_ath_load="YES"
if_wi_load="YES"
if_urtw_load="YES"
if_bwi_load="YES"

There is not much point in the first three. bwi(4) will not work without the firmware, which needs to be loaded here in addition to the driver itself.
 
wblock@ said:
There is not much point in the first three. bwi(4) will not work without the firmware, which needs to be loaded here in addition to the driver itself.

I did goto the port
ports/net/bwi-firmware-kmod
and did a "make install clean". It seemed to build fine. Just don't know if there is any other configuration that needs to be done besides adding
if_bwi_load="YES" to the loader.conf
to the loader.conf ? I'll do some more reading of the man pages for bwi, but so far I'm still in the dark looking for confirmation that my system sees my wireless network .

Thanks as always !

Samuel..
 
Back
Top