Solved DHCLIENT and wpa_supplicant

I'm having trouble properly configuring my laptop wireless on my FreeBSD 10.1 installation.
At boot time, it gives me this message.
Code:
starting wpa_supplicant.
starting dhclient.
wlan0: no link ...................... giving up
etc/rc.d/dhclient: WARNING: failed to start dhclient

Here is my /etc/rc.conf
Code:
hostname="name"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO"to disable"
dumpdev="AUTO"

wpa_supplicant_enable="YES"
synchronous_dhclient="YES"

wlans_bwi0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"

hald_enable="YES"
dbus_enable="YES"

My /boot/loader.conf
Code:
if_bwi_loads="YES"
kern.vty=vt

My /etc/wpa_supplicant.conf
Code:
network={
  ssid="myID"
}

If I use ifconfig_wlan0="SYNCDHCP" in my /etc/rc.conf instead, it will sometimes get a DHCP offer from my home wifi, but if there are no offers, it tries to use the last lease it had, but it still doesn't work.

I added some values in my /etc/dhclient.conf to no avail.
Code:
timeout 60;
retry 60;
select-timeout 3;
reboot 10;
backoff-cutoff 120;
initial-interval 4;

I would like to get the wpa_supplicant(8) and DHCP working properly, so I can use my laptop when I am out and about and need to connect to WiFi.
Advice would be greatly appreciated! Thank You!
 
You don't have any encryption enabled on the wireless link? That supplicant config looks to be missing a lot of info.
 
For my home wireless, no. No encryption or password. I don't know what else needs to be added to it to connect to my home wifi.
 
Ah, I must have missed that. I will test that and see if it helps make my connection less spotty on my home WiFi.
My concern though, I'll heading out to college soon, and I'm sure I will need to have to set it up so I can connect to the Wifi there.
 
Update:
I think I made a step forward. As phoenix mentioned, I think the issue was in my /etc/wpa_supplicant.conf
I finally stumbled upon this website http://www.troubleshooters.com/bsd/freebsd_initial_lessons_learned.htm#_FreeBSD_Wifi
I edited and modelled my /etc/wpa_supplicant.conf after what I found.
Code:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1
network={
     ssid="myID"
     key_mgmt=NONE

After several consecutive reboots, it has connected to my WiFi every time.

I plan to install net-mgmt/wifimgr to hopefully ease the process of adding networks, and connecting to password protected networks.

Thank you all for you advice! I was scared I would have to revert back to Ubuntu on my laptop. I like FreeBSD much better!
 
I guess I've never considered not using encryption since I've always lived in semi crowded area.
Unless you live in a cottage in the woods, password-protecting your wifi network is just common sense. Even if you think no-one can directly access your system, they can still connect to your network monitor all your traffic, or use your IP address for some malicious purpose (thus making you the prime suspect if their activities are discovered). Just because you've put all the valuables in your home in a safe doesn't mean it's okay to leave all the curtains drawn and the doors unlocked.
 
Unless you live in a cottage in the woods, password-protecting your wifi network is just common sense.
...

I agree. I knew someone who did live in the middle of nowhere and their theory was if someone was close enough to steal their wireless then they were close enough to shoot at. Needless to say, I choose not to argue with this person.
 
Back
Top