What Happened
A few days ago I installed FreeBSD 8from USB to my Macbook (Core Duo, 13").
The first thing I wanted to do was get my GUI back. I'm new to FreeBSD and it's my first time off of mac or windows, so I had some learning to do.
I tried to a make clean install of xorg with ports but it returned many "No address record" errors.
I realised I hadn't configured network settings and then the fun started.
I ran ifconfig and it found 5 devices:
msk0, ath0, fwe0, fwip0, lo0. *
ath0 was identified as media: IEEE 802.11 Wireless Ethernet autoselect so it was clear which one I needed.
From what I gathered, there are 3 files and two processes involved here:
/boot/loader.conf
/etc/wpa_supplicant.conf
/etc/rc.conf
/etc/rc.d/netif
wpa_supplicant (which is a part of the former too)
I'm certain it's a big simplification, so correct me if I'm wrong here.
What I Tried
I configured /boot/loader.conf with the few basic settings, and I'm most sure that this file is okay. The other 2 were more puzzling.
I tried to make a network package in wpa_supplicant.conf.
I found the ssid of the router, but the security wasn't so easy. The routers configuration on security is set to "Auto", with no explanation given. Other options are there, but Auto is selected. Another laptop uses WEP to connect (it's Vista, so I don't know how to get any more info than that), but I never configured it to do it. There's a string labled "wireless key" on the bottom of the router which I entered to set it up a new machine on the network (Windows and Macs, so it was simplified). I never had to choose a security type and only learned about them by installing FreeBSD.
So perhaps WEP is what "Auto" means, but I can't find any other evidence.
wpa_supplicant.conf seemed to never be correctly configured. I always got errors related to it and WPA_supplicant doesn't work. It gave me "Can't disable/enable WPA in the driver" errors and more once when I enabled -d -d. This was when I was trying some suspect configurations in rc.conf though. Usually it does nothing except hijack the shell and print "CTRL-SCAN-EVENT-RESULT" every 10 seconds.
I learned how to clone the ath0 device to a wlandev interface (wlan0).
ath0 is associated to it and their connection seems to go smoothly. But the wlan0's connection to the network is the problem. I couldn't create this with rc.conf, I do something wrong and get ifconfig: create: bad value errors whenever it's parsed. I did it via the shell instead.
What Now?
I scanned with wlan0 today: ifconfig wlan0 list scan
It shows my router, even my neighbour's router. It was a relief to finally get some feedback.
So wlan0 is UP and detects the router, but it is always status: no carrier. It can't associate with it and I can't figure out why. Running /etc/rc.d/netif start returns almost the same result as ifconfig would. It shows lo0 and wlan0, and sometimes ath0. I still not sure what lo0 is doing.
So; how do I associate with it? We can assume it's WEP security based on how the other laptop is setup. I'll give every relevant output here.
After boot, with a blank rc.conf this is what ifconfig returns:
msk0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=11a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4>
ether 00:17:f2:29:89:3b
media: Ethernet autoselect
ath0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:16:cb:bb:fe:65
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:17:f2:60:ad:7e
ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
lladdr 0.17.f2.ff.fe.60.ad.7e.a.2.ff.fe.0.0.0.0
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
I run: ifconfig wlan0 create wlandev ath0
It returns:
wlan0: bpf attached
wlan0: bpf attached
wlan0: Ethernet address: xx:xx:xx:xx:xx:xx
Ifconfig now returns:
msk0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=11a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4>
ether 00:17:f2:29:89:3b
media: Ethernet autoselect
ath0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:16:cb:bb:fe:65
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:17:f2:60:ad:7e
ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
lladdr 0.17.f2.ff.fe.60.ad.7e.a.2.ff.fe.0.0.0.0
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:16:cb:bb:fe:65
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid "" channel 1 (2412 Mhz 11b)
regdomain 106 indoor ecm authmode OPEN privacy OFF txpower 20 bmiss 7
scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
roam:rate 1 wme burst bintval 0
I run:
ifconfig wlan0 up
ifconfig wlan0 scan
It finds my router and displays its details.
I can feed it my routers details now, using: ifconfig wlan0 key value key value ...
They show up in wlan0 when I run ifconfig, but it still doesn't associate.
What details should I feed it, what exactly is needed?
What, if anything, should I have in /etc/wpa_supplicant.conf (and if that psk is needed, is it most likely the string I mentioned above)?
If I define the ssid in wpa_supplicant.conf, should I still feed it to wlan0?
What process should I then use to associate it?
5 .How should I add these things to rc.conf so it will automatically do this at boot?
A huge thank you in advance for any help you can give, I've spent hours crawling about the shell and I've learned quite a bit from it (I finally got the hang of vi too, from all that editing). But the sooner this is fixed, the better.
*P.S. I was, and still am, wondering where the extra three devices come from (the wireless and wired were all I expected to find).
lo0 is up at each boot and /etc/rc.d/netif, I have no idea what it is and can't find it in dmesg.
Resources:
/etc/loader.conf:
Code:
if_ath_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
/etc/wpa_supplicant.conf (I emptied it of everything unnecessary, because I was just causing errors)
network={
ssid="BTVOYAGER2110-1C"
}
/etc/rc.conf has no network settings, I commented them out because of errors. There was my attempt to clone ath0 and feed it info, but I did if via the shell instead.
I've included the output of dmesg as an attachment, in case it's useful.
I'd include the boot text (which appears before login) but I don't know how to catch it into a text file. If it's needed and somebody tells me how, I will (actually, even if it's not needed, how can I view it to read?).