# Mac Mini 2010 * could not enable WiFi



## Maenexus (Mar 20, 2011)

Hallo, 
I am new to FreeBSD, but that does not mean that I have not done anything in my power to get this work! No luck! So, I am asking the FreeBSD community for help. I am running FreeBSD 8.2 i386 inside VirtualBox on my Mac Mini 2010 edition, I was unable to get my wireless to work. 

So, firstly - I am not sure with WiFi chipset I have got with my Mac Mini, I was unable to find this, but I tried to configure a couple of drivers and still no luck! Do I need to configure Ethernet, if I wish to use WiFi only?

Thank you, 

Please if anyone could provide some steps on how to get my WiFi work, I would be very pleased.


----------



## wblock@ (Mar 20, 2011)

With FreeBSD inside a VM, it doesn't know (or need to know) that the host system has wireless.  That hardware doesn't appear inside the virtual machine.  But the virtual machine sees an Ethernet connection with the host system, and the host system acts as a DHCP server and router.

In VirtualBox, set the Network properties of the FreeBSD VM to NAT.  Click the Advanced drop-down and see what it has chosen for Adapter Type.  Should be PCnet-PCI II or Intel PRO/1000 MT Desktop.

Now start the FreeBSD VM.  Log in as root, and edit /etc/rc.conf.  Remove any ifconfig lines already there, then add

```
ifconfig_DEFAULT="SYNCDHCP"
```

That runs dhclient(8) when FreeBSD starts on whatever Ethernet interface is present.

The end result is that the FreeBSD VM sees an Ethernet interface and gets a DHCP lease from the host.  The host's net connection can be wireless, it doesn't matter to the VM.

(You can also set the VirtualBox network connection to Bridged, where it can directly share the host's network interfaces.  Most of the time, that shouldn't be necessary.)


----------



## Maenexus (Mar 20, 2011)

Thanks! The solution was pretty simple, I just configured AirPort as an ethernet networking device inside VirtualBox and everythink just works! 

I am just wondering - if I would like to install FreeBSD outside VM, on my Mac to a separate partition as a dualboot, how can I configure WiFi in that case? (Without ethernet connection or functional AirPort connection...)

Thanks again.


----------



## wblock@ (Mar 20, 2011)

The long form: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html

The short form (replace _ath0_ with your device):
/etc/rc.conf

```
wlans_ath0="wlan0"
ifconfig_wlan0="SYNCDHCP"
```

/etc/wpa_supplicant.conf

```
network={
        ssid="myssid"
        psk="myultrasupersecretpsk"
}
```


----------

