c39c
![]() |
|
|
|
|
|||||||
| Networking Network related discussions (including general TCP/IP stuff, routing, etc). |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello everyone,
I am completely new to both FreeBSD and this forum so please bear with me. I believe I am following the forum rules and guidelines, but please forgive me if I'm doing something wrong. I have successfully installed FreeBSD-9.0-STABLE on my ASUS 1225B laptop and I have created the kernel modules (is it "modules" or "drivers"?) for my Broadcom wireless network adapter (BCM4313) using ndisgen. In order to use these modules I placed them in the /boot/modules/ directory, and created the following /etc/rc.d script (I first tried to load the modules from /boot/loader.conf, but doing so the kernel wouldn't boot at all): Code:
#!/bin/sh
# PROVIDE: bcm4313
# REQUIRE: NETWORKING
# BEFORE: LOGIN
# KEYWORD: nojail
. /etc/rc.subr
name="bcm4313"
start_cmd="${name}_start"
stop_cmd=":"
bcm4313_start()
{
echo "Loading Broadcom BCM4313 NDIS kernel modules."
kldload bcm43xx64.cat.ko
kldload bcmwlcoi64.dll.ko
kldload bcmwl564_sys.ko
}
load_rc_config $name
run_rc_command "$1"
Code:
wlans_ndis0="wlan0" ifconfig_wlan0="WPA SYNCDHCP" Code:
network={
ssid="<router name>"
psk="<router wpa key>"
}
My question is; since I am running the system on a laptop that I will carry with me, I may want to connect to a wireless WPA-protected network on the spot, without having to reboot the system. How exactly do I do that? I assume that no matter what I will always have to edit /etc/wpa_supplicant.conf to match the network I am trying to connect to, but other than that, how? This is what I have tried so far: Code:
# ifconfig wlan0 create wlandev ndis0 # ifconfig wlan0 up # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf # dhclient wlan0 # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -BI now expect wpa_supplicant to have associated wlan0 with the router, but it hasn't. Here is the output of: # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -ddCode:
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf' Reading configuration file '/etc/wpa_supplicant.conf' Line: 1 - start of a new network block ssid - hexdump_ascii(len=7): 4e 45 54 47 45 41 52 PSK (ASCII passphrase) - hexdump_ascii(len=13): [REMOVED] PSK (from passphrase) - hexdump(len=32): [REMOVED] Priority group 0 id=0 ssid='NETGEAR' Own MAC address: 00:08:ca:ef:f4:22 wpa_driver_bsd_del_key: keyidx=0 wpa_driver_bsd_del_key: keyidx=1 wpa_driver_bsd_del_key: keyidx=2 wpa_driver_bsd_set*countermeasures: enabled=0 RSN: flushing PMKID list in the driver Setting scan request: 0 sec 100000 usec EAPOL: SUPP_PAE entering state DISCONNECTED EAPOL: Supplicant port status: Unauthorized EAPOL: KEY_RX entering state INITIALIZE EAP: EAP entering state DISABLED EAPOL: Supplicant port status: Unauthorized EAPOL: Supplicant port status: Unauthorized Added interface wlan0 State: DISCONNECTED -> SCANNING Starting AP scan for wildcard SSID EAPOL: disable timer tick EAPOL: Supplicant port status: Unauthorized Sorry for a long post and thanks in advance. |
| The Following User Says Thank You to niflheim For This Useful Post: | ||
cpu82 (August 19th, 2012) | ||
|
#2
|
|||
|
|||
|
I just stumbled across the answer myself. Apparently there are more options for wpa_supplicant than mentioned in the man pages; I found what I needed in the /etc/rc.d/wpa_supplicant script. My wlan0 is now associating with the network and I can run dhclient perfectly fine. Here is the complete command :
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D ndis.Cheers!
|
|
#3
|
||||
|
||||
|
Quote:
If you prefer to start wpa_supplicant when the system booted, add this line in /etc/rc.conf Code:
wpa_supplicant_enable="YES" |
![]() |
| Tags |
| bcm4313, ifconfig, wpa_supplicant |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Network / wireless frustrations | FreeBCP | Mobile Computing | 7 | September 11th, 2011 19:00 |
| Connecting to wireless | zjames | Networking | 11 | September 9th, 2010 01:25 |
| Setting up network manually? I need of some help | Gogeden | Networking | 6 | May 24th, 2010 00:26 |
| [Solved] Problem connecting to wireless network | bojinov | Networking | 2 | December 8th, 2009 12:09 |
| Best way to automate connecting to a wifi network | kpedersen | Networking | 5 | October 20th, 2009 12:11 |