View Single Post
Old 1st May 2009
geekswordsman geekswordsman is offline
Port Guard
 
Join Date: Apr 2009
Location: DC Area
Posts: 24
Smile It Lives!

So after no luck at all with the pre-release snapshot of 4.5 this week, I decided to go ahead and give it a shot tonight with the official release version.

Fired it up, immediately attempted an ifconfig on ath0, and system froze. Attempted numerous configurations, but anytime I specified a nwid with hostap enabled the system would lock up, no errors.

I could enable hostap, but that doesn't exactly do me any good without having a NWID to connect to, and some form of security on it!

So did a little digging, and notice a little nugget right out of the ath(4) man page that I have somehow overlooked:
Code:
   The following hostname.if(5) example creates a host-based access point on
     boot:

           inet 192.168.1.1 255.255.255.0 NONE media autoselect \
                   mediaopt hostap nwid my_net chan 11
Now that's interesting... Why is it using inet and not ifconfig? And I need to specify the nwid after hostap? Logically it makes sense, but why do I need to use inet directly and not ifconfig?

Apparently hostap mode on wireless networks is not controllable via ifconfig. It needs to be handled by inet directly. And this means that you must create a hostname.if file with the parameters, and do
Code:
# sh /etc/netstart
to get the interface up. Here's my final hostname.ath0 (nwid and wpa-psk obfuscated, obviously)
Code:
inet 192.168.1.1 255.255.255.0 NONE media autoselect mediaopt hostap /
nwid my_network wpa wpaakms psk wpaprotos wpa1 wpapsk $(wpa-psk /
my_network mywpapskey)
That's all that's needed! Setting up dhcpd and pf is of course still required, but at least my wireless host is now working

Thanks again to everyone for the assist!
Reply With Quote