# Dell Wireless 1397 with FreeBSD 11.2 RC3



## Vinay Sonwani (Jun 25, 2018)

Hi All,

I have installed FreeBSD 11.2 RC 3 in my Dell laptop along with Windows 10.
The problem is when I go for network setting during FreeBSD installation, It does not detect my wireless card but only Ethernet card is detected.
I checked the supported hardware list and found that my wireless card driver is not supported.
So far fine but I am not able to buy this thing since FreeBSD can run on very minimalistic hardware I heard. 

Please correct me if I am wrong.



Thanks in advance.


----------



## tobik@ (Jun 25, 2018)

Can you post the output of `pciconf -lv`?


----------



## Phishfry (Jun 25, 2018)

https://wikidevi.com/wiki/Dell_Wireless_1397_(DW1397)

Shoot I see this one is a problem child from way back..

Here is the manpage:
https://www.freebsd.org/cgi/man.cgi?query=bwn
You need to load firmware.


----------



## Phishfry (Jun 25, 2018)

I couldn't find real good instructions for the Broadcom driver:
https://forums.freebsd.org/threads/broadcom-bcm4312.32374/

You must install from the ports tree some firmware.
`cd /usr/ports/net/bwn-firmware-kmod/ && make install clean`

There are 2 kernel modules to test individually. Don't load both.
`kldload bwn_v4_ucode`
and
`kldload bwn_v4_lp_ucode`

I would start with the LP version first. Then run the test like the post above shows.
Create the interface and do a scan, See if it bombs out.


----------



## Vinay Sonwani (Jun 25, 2018)

tobik@ said:


> Can you post the output of `pciconf -lv`?



Hi,

PFA screenshot.


----------



## tobik@ (Jun 25, 2018)

Vinay Sonwani said:


> Hi,
> 
> PFA screenshot.


So as Phishfry suggested trying to setup bwn(4) or bwi(4) after the installation is probably your best bet.


----------



## Phishfry (Jun 25, 2018)

You can see from your `pciconf` output that this is the LP card. As such use that kernel module.


----------



## Vinay Sonwani (Jun 27, 2018)

Phishfry said:


> You can see from your `pciconf` output that this is the LP card. As such use that kernel module.



Hi,

As suggested by Phishfry, I executed the command and I got what is attached here.


----------



## SirDice (Jun 27, 2018)

Connect the network to the wired interface. You'll need to have internet access to be able to download and install anything.

"No address record" means you're not connected or you haven't configured /etc/resolv.conf correctly.


----------



## tingo (Jun 27, 2018)

And in the case where you are connected to a network, but still get the "No address record" message when trying to fetch packages, try to `ping` the address and then retry the pkg / fetch command. Sometimes it helps.


----------



## Phishfry (Jun 27, 2018)

Once you get this firmware built and tested good the following line can be added to start up automatically:
/boot/loader.conf:

```
bwn_v4_lp_ucode_load="YES"
```


----------



## Vinay Sonwani (Jul 11, 2018)

Hi all,

As suggested by all, I tried connecting my machine with Ethernet wire, it shows me active in ifconfig but I was unable to connect.
Then, I tried with USB tethering with my mobile and got the same result. I was able to use tethering in windows 10 successfully  on the same machine.

Please guide me.


----------



## SirDice (Jul 11, 2018)

Vinay Sonwani said:


> As suggested by all, I tried connecting my machine with Ethernet wire, it shows me active in ifconfig but I was unable to connect.


Please post the output. This will also show us _which_ wired interface you have.


----------



## Vinay Sonwani (Jul 13, 2018)

Hi,

Attached is the output window. Please guide.


----------



## Phishfry (Jul 13, 2018)

OK so you have an Marvel Yukon with msk0. I am guessing that is built in your laptop.
What is ue0? Do you also have a wireless USB ethernet adapter attached?

Have you configured msk0 in your startup file /etc/rc.conf? Please post the ifconfig lines and any network settings.
You should have a line like this ifconfig_msk0="DHCP" for dynamic IP. For static IP adjust to suit.


----------



## Vinay Sonwani (Jul 14, 2018)

Hi all,

Yes, I have an Marvel Yukon with msk0 and that is built in my PC.
I attached  USB tethering with my mobile to check if it works but it didn't (with windows it worked on the same machine).
I have configured my /etc/rc.conf file as suggested by you. Attached is the screenshot


----------



## Chris_H (Jul 16, 2018)

Hello, Vinay Sonwani 
for the sake of installation, and setup. Please disable, and disconnect the ue0 device by commenting out that line in /etc/rc.conf(5) like so:

```
#ifconfig_ue0="DHCP"
```
Then unplug the usb device, and reboot. This should give you a working connection. You do have your ethernet cable connected to the network plug on your computer, and to your internet connection. Don't you? 

If you still have problems _after_ doing this. Please post the output of ifconfig(8).

HTH

--Chris


----------



## Vinay Sonwani (Jul 16, 2018)

Hi Chris_H,

Thanks for the reply.
I only connected mobile tethering connection when Wi-Fi and Ethernet connection failed. Previously I was only trying with Wi-fi then Ethernet connection but both failed one by one. Output of ifconfig with only Ethernet connection, is attached.

Please guide.


----------



## Chris_H (Jul 16, 2018)

Hmm.. well that's not what we're looking for. 
Anything interesting in /var/log/messages , or /var/run/dmesg.boot ?
As to your previous attampts at WiFi
Is there anything interesting in /etc/resolv.conf , or /var/db/dhclient.* ?
In fact the dhclient file will also apply to your ethernet.

Just looking for clues here. 

--Chris


----------



## Vinay Sonwani (Jul 25, 2018)

Hi All,

Attached are the screenshots for /var/log/messages and /etc/resolv.conf.

Apart from this, I went to /usr/src/sys/amd64/conf and checked my Kernel file. In that file bwi and bwn entries were commented with '#' character. I uncommented them, rebuild my kernel and installed the same again. After this when I hit ifconfig, still I am getting only msk0 and lo0 devices. Now I am completely lost.

Please guide me.


----------



## Phishfry (Jul 25, 2018)

You see your problem right?

Something in your upstream router/switch is set wrong.
You have a subnet mask showing for your Nameserver IP.
resolvconf -lv
Here is mine:

```
kook@E6420:~ # resolvconf -lv
DOMAIN=''
SEARCH=''
NAMESERVERS='192.168.200.1'
LOCALNAMESERVERS=''
DOMAINS=''
```
You can see here that my connections (dhcp/dns) server is not setup completely either.
SEARCH= should have an IP of 192.168.200.1 for me.


----------



## Phishfry (Jul 25, 2018)

You are showing this:
search=192.168.0.103
nameserver=255.255.255.0

So all kinds of weirdness here. Usually you skip the 192.168.0.0 domains and start at 192.168.1.0
Also usually any servers like search, or nameserver are on the x.xxx.x.1 address unless specifically set differently.

So what is upstream of you? A router?
Totally wild guess here: You are behind an existing 192.168.1.1 box so you had to change the default IP on your router..


----------



## Phishfry (Jul 25, 2018)

Everything I say above is predicated on the guess that you did not edit /etc/resolv.conf

Is this correct? resolv.conf does not need manual settings.
`resolvconf` is the service that handles populating /etc/resolv.conf and it will happen automatically if your network DHCP server is setup correctly.
To see what your dhcp/dns server is providing use `resolvconf -l`or`resolvconf -lv`


----------



## Chris_H (Jul 25, 2018)

Looks like you're hooked up to CPE.
Tho, not without exception. Generally speaking (as Phishfry mentions), those boxes have a base of `192.168.0.0`, and net of `192.168.0.255`, with a single ethernet port. They run a DHCP server, that listens for solicitation(s) on `192.168.0.1`. In fact. They usually have a web based GUI setup at that same address. So my guess would be. That if you wipe the contents of /etc/resolv.conf, and put _only_ `ifconfig_ue0="DHCP"`. You'll get a connection.
I _just_ last night setup a Dell laptop, with similar gear.
My (ethernet) NIC is a different brand (broadcom) but my video is also Intel (different model), and my wireless NIC is also bwn(4).
The interesting parts of my rc.conf(5):

```
ifconfig_bfe0="DHCP"
kld_list="i915kms bwn_v4_ucode if_bwn"
wlans_bwn0="wlan0"
ifconfig_wlan0="ssid WirelessAP DHCP"
```
Everything on my Dell laptop just works.
I use an `ssid` (WirelessAP) in my config. Because I filter on MAC addresses for security.
Your line should read as necessary. But to start with, should only read `ifconfig_wlan0="DHCP"`.
I also used the `bwn[B]_[/B]v4[B]_[/B]ucode` as opposed to the `bwn[B]_[/B]v4[B]_[/B]lp[B]_[/B]ucode`. Because on my laptop, the `bwn[B]_[/B]v4[B]_[/B]lp[B]_[/B]ucode` caused an instant panic.

--Chris


----------



## SirDice (Jul 25, 2018)

The search option in /etc/resolv.conf should not contain an IP address, remove it. If you don't know what to set search to then don't set it at all. It typically contains a list of (sub)domains to search in case somebody used a single hostname instead of a FQDN. 

For example:

```
search example.com sub1.example.com sub2.example.com
nameserver 8.8.8.8
```
Now, if I try to ping a (short) hostname, like `ping host1`, the search will cause it to automatically lookup host1.example.com, host1.sub1.example.com and host1.sub2.example.com. This option is really only useful if you have multiple (sub) domains and you want to use short hostnames.


----------



## Vinay Sonwani (Jul 26, 2018)

Hi All,

So as suggested by Phishfry, *Chris_H and *SirDice, I made some changes in following files - 

/etc/rc.conf 
/boot/loader.conf
/etc/resolv.conf

now, when I hit ifconfig command, my wireless card is listed in available devices  .
But I am still not able to access the internet through it. I am guessing that I may not have configured the wireless card correctly so I am attaching screenshots of ifconfig and other commands.

I am also attaching my router's configuration page.
Please guide.


----------



## SirDice (Jul 26, 2018)

Your wlan0 is showing "no carrier", which means your wireless network isn't associated and you therefor have no connection. Did you configure wpa_supplicant(8) correctly? Your `ifconfig_wlan0` should show this too:

```
ifconfig_wlan0="WPA DHCP"
```


----------



## Chris_H (Jul 26, 2018)

IMHO Since I see _both_ IF' are showing no carrier. It looks to me, that the "upstream" isn't setup correctly.
Unless the directions, or your provider told you otherwise. Can I suggest that you change your current entry from `192.168.1.2` to `192.168.0.1`, and see if that works for you?

--Chris


----------



## Vinay Sonwani (Aug 7, 2018)

Hi All,

As suggested by you all I made changes in following files - 

/etc/rc.conf
/etc/wpa_supplicant.conf

Also, I asked my ISP to correctly configure my router. I am attaching screenshot for the same from Windows 10.

I tried with `ifconfig wlan0 -v list scan` and `ifconfig wlan0 up scan` commands to check available SSIDs but these commands did nothing. 

Please guide me.


----------



## Phishfry (Aug 7, 2018)

Your settings look OK. if `ifconfig wlan0 up scan` didn't scan then I suspect you are not loading the firmware.
Please show your /boot/loader.conf

https://forums.freebsd.org/threads/dell-wireless-1397-with-freebsd-11-2-rc3.66398/#post-392580


----------



## Phishfry (Aug 7, 2018)

One more thing, I notice in your ifconfig that the wifi is attempting to use Channel 165 with 802.11a.
But on one of your screens I see a SSID name with '2.4' in it.
Just for clarification, you have both 2.4 and 5ghz available to use from your upstream wireless access point? Channel 165=5 ghz.
Looks like I am seeing different SSID's for each frequency? Is that correct?

Also my /etc/wpa_supplicant.conf has a few extra lines. Not sure if they are required or not:

```
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1

network={
ssid="nanoapu2"
key_mgmt=WPA-PSK
proto=RSN
psk="**********"
}
```


----------



## Vinay Sonwani (Aug 8, 2018)

Hi All,

My /boot/loader.conf file contains following lines -

```
if_bwi_load ="YES"
if_bwn_load="YES"
```
I posted two screenshots for /etc/wpa_supplicant.conf in the previous post because I tried with only SSID in the first and SSID with frequency in the second (someone suggested me). 

My router has only one band and that is 2.4 Ghz of frequency. Now If FreeBSD is searching for the WiFi on channel 165 which is 5Ghz frequency band then how to force it to search on 2.4 Ghz of frequency (that's why I wrote 2.4 Ghz along with SSID in the /etc/wpa_supplicant.conf file but, not sure if it will work).

Please help.


----------



## Phishfry (Aug 8, 2018)

You are missing the firmware. Add this line to your:
/boot/loader.conf

```
bwn_v4_lp_ucode_load="YES"
```
.



Vinay Sonwani said:


> how to force it to search on 2.4 Ghz of frequency


Well don't worry about this just yet.
When the wifi is not associated with an access point it is constantly scanning channels.
If you run `ifconfig wlan0` over and over again you will see what I mean. Just keep your eye on it.

Your problem is firmware. It is not loaded until you do a scan. No scan=no firmware
In dmesg the device will look fine even without firmware.

So add the above line, reboot  and try to scan again.


----------



## Vinay Sonwani (Aug 20, 2018)

Hi All,

*Phishfry*, as suggested by you I added following line in /boot/loader.conf file -

bwn_v4_lp_ucode_load="YES"

but, it didn't work as well. The result is all same. Ifconfig showing no carrier.
It's searching all frequencies but not able to connect.


Please help.


----------



## Vinay Sonwani (Sep 4, 2018)

Hello everyone,

Please help, I am stuck at this.
I wont give up so easily


----------



## Martin Paredes (Sep 4, 2018)

Where you able to download the firmware?

What is the output of `pkg info -l bwn-firmware-kmod`

Were you able to use the msk0?

In all the pictures, msk0 show "no carrier", that means that no cable is connected to the laptop, check the connection


----------

