# How to set up NIC



## pwdr (Oct 21, 2016)

I have a MacBook Pro Retina 13" with FreeBSD11 installed to a USB key. During installation the option to set up ipv4 was not available as no network cards were found. This, I believe, is a bug of sorts as the Broadcom card in my machine should be supported by the bwn(4) driver. It should presumably, therefore, load on boot and recognise my card, enabling ipv4 setup during installation(?)

`sysinstall` has been removed, which would have enabled me to run through the semi-automated process of setting up my wireless card. 

I can add `if_bwn_load="YES"` to /boot/loader.rc but that's only part of the process.

There is information available here and here which _seems_ helpful, but not so much when you're trying to learn BSD and need to look up each of the steps involved. It becomes a very convoluted process of trying to guess what I'm supposed to be doing and potentially messing the system up in the meantime. 

Is there a guide (or can someone let me know) how to manually configure the various files in order to get my wireless card to run (driver loaded at boot etc.)?

Thanks!


----------



## SirDice (Oct 21, 2016)

pwdr said:


> Is there a guide (or can someone let me know) how to manually configure the various files in order to get my wireless card to run (driver loaded at boot etc.)?


Handbook: 30.3. Wireless Networking


----------



## pwdr (Oct 22, 2016)

SirDice said:


> Handbook: 30.3. Wireless Networking



Step 2: `ifconfig | grep -B3 -i wireless` - produces no output, just returns me to the prompt. I have got `if_bwn_load="YES"` added to /boot/loader.rc but still no response. 

The guide doesn't say what to do in this case. It does say "If a wireless adapter is not listed, an additional kernel module might be required, or it might be a model not supported by FreeBSD." Well we know it's supported because the driver states it is, so how do I load an additional kernel module? Which module? Where does it need to be added? Once added to the relevant files, how do I load it without a reboot? And will it automatically load after boot?


----------



## kpa (Oct 22, 2016)

Post your `dmesg` output and also the output of `pciconf -lv`.

It's /boot/loader.conf, not /boot/loader.rc where you should add the `if_bwn_load="YES"` line.


----------



## pwdr (Oct 22, 2016)

Any flags? Just input `dmesg` ?


----------



## tobik@ (Oct 22, 2016)

pwdr said:


> Step 2:  ifconfig | grep -B3 -i wireless - produces no output, just returns me to the prompt. I have got  if_bwn_load="YES" added to /boot/loader.rc but still no response.


It won't on FreeBSD 11.0 and the handbook needs an update. Run `sysctl net.wlan.devices` to see if it was detected. If it was you can continue with the guide.


----------



## pwdr (Oct 22, 2016)

tobik: `sysctl net.wlan.devices` returns no output. Though I haven't tried it since adding `if_bwn_load="YES"` to /boot/loader.conf.

kpa: `dmesg` produces quite a lot of output. Any lines in particular? I photographed them but can reproduce any specific lines.

`pciconf -lv` showed (relevant line):


```
none6@pci0:3:0:0:                   class=0x028000 card=0x0133106b chip=0x43ba14e4 rev=0x01 hdr=0x00
  vendor   = 'Broadcom Corporation'
  device   = BCM43602 802.11ac Wireless LAN SoC
  class    = network
```


----------

