# Intel Centrino Advanced-N 6235 WiFi Driver



## IRL_Grant (Oct 31, 2012)

Hello,

 I know that someone was working on this driver as recent as August but I haven't been able to find anything else about it. I would love to have this particular WiFi card working, so if anyone knows of a more recent status (if any) I'd really appreciate it.

Thanks much!


----------



## xmj (Nov 1, 2012)

Hi,

I do have the same issue. 

One thing that might have worked (or so I thought) but didn't was:

Modify /usr/src/sys/dev/iwn/if_iwn.c to include

```
{ 0x8086, 0x088e, "Intel Centrino Advanced-N 6235"              },
```
in its 
	
	



```
static const struct iwn_ident iwn_ident_table[]
```
 where all other chips are listed. 

`# pciconf -lbcev` yields the following

```
none4@pci0:3:0:0:       class=0x028000 card=0x40608086 chip=0x088e8086 rev=0x24 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = network
    bar   [10] = type Memory, range 64, base 0xf7800000, size 8192, disabled
    cap 01[c8] = powerspec 3  supports D0 D3  current D3
    cap 05[d0] = MSI supports 1 message, 64 bit 
    cap 10[e0] = PCI-Express 1 endpoint max data 128(128) FLR link x1(x1)
ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected
ecap 0003[140] = Serial 1 c48508ffff3ca99c
  PCI-e errors = Correctable Error Detected
                 Unsupported Request Detected
     Corrected = Advisory Non-Fatal Error
```
and I'm using  
	
	



```
FreeBSD 10.0-CURRENT #4: Mon Oct 29 13:32:42 EET 2012
```
 on an ASUS UX32VD-R4001 notebook.

I'd love to see a solution for this, not being a programmer myself.


----------



## lee170 (Nov 4, 2012)

A couple of reasons why your modification of if_iwn.c did not work are:

Simply editing the iwn_ident_table without actually adding driver code will not do anything.
If the driver code were available, you'd need to compile and link if_iwn.c for it to have an effect.
There is a developer who's taken responsibility for the *I*ntel 6235 driver but he's been quiet since August.  I also have that card and cannot use [size=-1][*Free*? -- mod.][/size]BSD because of the lack of a driver.


----------



## xmj (Nov 4, 2012)

@lee170: Needless to say I recompiled the system after adding that one-liner. And guess what? After downloading the latest firmware, it works.

Instructions:

Add the oneliner   
	
	



```
{ 0x8086, 0x088e, "Intel Centrino Advanced-N 6235"              },
```
 to /usr/src/sys/dev/iwn/if_iwn.c as described above.
Download the latest firmware from http://intellinuxwireless.org/?n=downloads -- make sure it's the iwlwifi-6000g2b-ucode-18.168.6.1.tgz.
Extract the tgz, copy iwlwifi-6000g2b-6.ucode to /usr/src/sys/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw.
Modify /usr/src/sys/modules/iwnfw/iwn6000g2b/Makefile so that it looks like this:

```
<SNIP>
KMOD=   iwn6000g2bfw
IMG=    iwlwifi-6000g2b-18.168.6.1
</SNIP>
```


`# make -C /usr/src/sys/modules/iwnfw/iwn6000g2b/ clean all install`.
This should be everything needed to get some verbose messages confirming that iwn0 indeed has been successfully added. I'll submit a patch/PR over the next few days.

There is one issue (happened three times, can reproduce): If I want to `# kldunload if_iwn`, my system reboots. I don't know why that is (yet), but... as I don't intend to unload it all too often, it's not as relevant for me as for others - so I trust someone else will take a look at it.


----------



## lee170 (Nov 5, 2012)

Nice work!  I'll try that today.


----------



## xmj (Nov 5, 2012)

Thanks. Please do report any additional steps though, in case I've forgotten to list something. Then I'll file a PR with the respective patches and one day we'll see it move upstream


----------



## IRL_Grant (Nov 8, 2012)

Thanks for figuring all of that out @xmj. I am not quite sure what all that means TBH but I will read up a bit more to try to get that working for my system as well.

Thanks again!


----------



## xmj (Nov 11, 2012)

I forgot to include the obvious - load the kernel module.

4. 
	
	



```
# kldload iwn6000g2bfw
# kldload if_iwn
```


----------



## vandunen (Nov 11, 2012)

Hi @xmj, must this *ucode file be source code or pure binary? In the aforementioned directory all other other files's name are *.fw.uu and seem to be text files, at least the headers. After compiling via Makefile I get the erro*r* message

```
Don't know how to make /usr/../contrib/dev/../*iwl*.fw.uu
```
I use the PC-BSD 9.0*.*


----------



## xmj (Nov 12, 2012)

The file should be *ucode. I put the firmware into /usr/src/sys/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw.uu. When I tried to cat it, the output was garbage. After uudecoding it, as is invoked by some other Makefile, I was able to actually see some source code. I didn't do anything with it, though.

Make sure you point the /usr/src/sys/modules/iwnfw/iwn6000g2b/Makefile to the iwlwifi-6000g2b-18.168.6.1.fw.uu -- just leave out the .fw.uu part.


----------



## vandunen (Nov 13, 2012)

I uuencoded the microcode and the compilation via described Makefile worked. Thanks a lot!

The only problem I had is with _the_ kernel loading the if_iwn, but I guess that's another topic
which is not supposed to be to mentioned in this thread*.*


----------



## patpro (Nov 17, 2012)

Hello,

I'm not using FreeBSD 9 yet, but I plan to migrate my FreeBSD gateway to a brand new box, with a fresh install of FreeBSD 9.x. The box I'm planing to buy uses an Intel N6230 WiFi card. I don't care about Bluetooth support, but I do need proper WiFi support. Do you think I must adapt the procedure above for this card, or will it be supported out of the box?

*R*egards*.*


----------



## xmj (Nov 21, 2012)

/usr/src/sys/dev/iwn/if_iwn.c comes with support for two "Intel Centrino Advanced-N 6230" chips.

```
<SNIP>
        { 0x8086, 0x0090, "Intel Centrino Advanced-N 6230"              },
        { 0x8086, 0x0091, "Intel Centrino Advanced-N 6230"              },
<SNIP>
```


It should be supported out of the box but as this is a different chip, you might want to look in a different thread. Try for instance this one: http://forums.FreeBSD.org/showthread.php?t=23573&highlight=6230. It's more than a year old and focuses on another chip -- then again, it uses a solution developed for your N 6230 on that other chip. Both facts suggest that other people don't have issues with the chip. Should you encounter any, it shouldn't be that hard to upgrade the firmware (mentioned in here) and look for other people's solutions on *G*oogle or ##freebsd on freenode IRC.


----------



## patpro (Nov 22, 2012)

Thank you @xmj, that's good news.  It looks like I can buy this "Relia" box then  http://aleutia.com/products/relia-fanless-industrial-server


----------



## xmj (Nov 24, 2012)

To get back on topic, here's the output for FreeBSD 10.0-CURRENT #7 r243502M: Sat Nov 24 22:51:00 EET 2012
`# svn diff`

```
Index: sys/dev/iwn/if_iwn.c
===================================================================
--- sys/dev/iwn/if_iwn.c        (revision 243502)
+++ sys/dev/iwn/if_iwn.c        (working copy)
@@ -93,6 +93,7 @@
        { 0x8086, 0x0886, "Intel Centrino Wireless-N + WiMAX 6150"      },
        { 0x8086, 0x0896, "Intel Centrino Wireless-N 130"               },
        { 0x8086, 0x0887, "Intel Centrino Wireless-N 130"               },
+       { 0x8086, 0x088e, "Intel Centrino Advanced-N 6235"              },
        { 0x8086, 0x08ae, "Intel Centrino Wireless-N 100"               },
        { 0x8086, 0x08af, "Intel Centrino Wireless-N 100"               },
        { 0x8086, 0x4229, "Intel Wireless WiFi Link 4965"               },
Index: sys/modules/iwnfw/iwn6000g2b/Makefile
===================================================================
--- sys/modules/iwnfw/iwn6000g2b/Makefile       (revision 243502)
+++ sys/modules/iwnfw/iwn6000g2b/Makefile       (working copy)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
 KMOD=  iwn6000g2bfw
-IMG=   iwlwifi-6000g2b-17.168.5.2
+IMG=   iwlwifi-6000g2b-18.168.6.1
 
 .include <bsd.kmod.mk>
```


----------



## bschmidt (Nov 26, 2012)

Thanks for the effort guys.

Just wondering, did you also test 802.11n and 40 MHz channels? The last time I've looked into adding 6235 support, I had really big issues at HT40, firmware crashes, terrible throughput, .. As you've probably noticed, I've pushed the firmware into the tree already, but did not add the IDs for that reason.

Point is, I suspect that there is some driver incompatibility with the new firmware rendering the device close to unusable and because the FW is also used for the 6230, that one too. It'd be highly appreciated if someone is willing to compare our driver with the Linux one to figure out what's going on.


----------



## quali (Jan 23, 2013)

xmj said:
			
		

> lee170:
> Needless to say I recompiled the system after adding that one-liner.
> 
> 
> ...





One little addition here.

Instead of 
`# uuencode`
in case it takes one hour to encode and you start to realize you're doing something wrong;
`# b64encode -o iwlwifi-6000g2b-18.168.6.1.fw.uu iwlwifi-6000g2b-6.ucode iwlwifi-6000g2b-18.168.6.1.fw.uu`

Happy wireless surfing. P


----------



## quali (Jan 23, 2013)

Ok it actually didn't work for me. None of these methods.

It gives me an error due to linux driver incompatibility.
Even after changing the kernel modules and loading only this wireless module. I dont know, I tried everything.


----------



## lunix1 (Feb 8, 2013)

I come from linux and I wanted to use FreeBSD; without wireless connections it is useless for me; *I*'m not enthusiastis to use exclusively command-line on a new operating system so I choose PCBSD-9.1 for the beginning. 

After 2 months of work only to set up the wireless connection on Intel 6235, I finally succeeded. IT REALLY WORKS!, good speed, stable, no interruptions.

       Briefly,

On a fresh install, on the entire SSD, I fetched the sources, I did line 1 from xmj post, then I rebuilt the kernel. After that, the iwn0 interface appeared in Network Manager but "no carrier" and no wireless flashing LED.
I proceeded to line 2. and 3 (xmj's post) with a small but necessary additional step to *b64encode* the .ucode before copying it. After that, I was able to *kldload iwn6000g2bfw*, *kldunload* it, no need to *kldload if_iwn* already loaded at boot, no succes to *kldunload if_iwn* (no reboot but "can't find if_iwn.ko file" message).

Now wlan0 is created in NM, status: associated, wireless LED is up and responding to Fn +F... keys combination, BUT wlan0 (and me) struggled to acquire an IP address from a router restored to factory defaults (no filter, no security, no firewall) for a whole month. Meanwhile, of course, frustrating no wireless connection.

"I tried everything" and no post on net was helpful; I decided to enter the router menu to inspect once again, I activated the "AP isolation" option (that was just the case but not important at all), save and REBOOT (the router); when I clicked "reboot" I lost my connection to the router and it didn't come up again in reasonable time, so I DISCONNECTED the cable from my machine; very soon after refreshing the browser, I had the reboot bar on my screen and I knew that I was on a functional wireless connection. 

All the system settings are the same like the day before, when I couldn't get IP; wlan0 status is still "associated" (not active); AP isolation was just a try and disabling it can't break the wireless connection.

Conclusions:

the iwn driver really works
I don't know what happened when the connection was finally up and I don't know how can I control this step.
If anyone thinks that I can help with a system message, please ask.


----------



## HenryHu (May 11, 2013)

I just tried to use iwn with 6235 on my ASUS UX51VZ. By using this method, I'm able to create wlan0. However, it keeps switching between "associated" and "no carrier". After configuring it with -ht40, it works fairly well. I've not tested the performance, but at least the connection seems stable.


----------



## xmj (Aug 13, 2013)

The following diff integrates http://people.freebsd.org/~mav/iwn6235.patch

and keeps compatibility with the changes that recently hit HEAD.

Apply to /usr/src/sys/dev/iwn:


```
Index: if_iwn.c
===================================================================
--- if_iwn.c	(revision 254177)
+++ if_iwn.c	(working copy)
@@ -113,6 +113,8 @@
 	{ 0x8086, IWN_DID_5x00_2, "Intel WiFi Link 5100"			},
 	{ 0x8086, IWN_DID_6x00_3, "Intel Centrino Ultimate-N 6300"		},
 	{ 0x8086, IWN_DID_6x00_4, "Intel Centrino Advanced-N 6200"		},
+    { 0x8086, IWN_DID_6235_1, "Intel Centrino Advanced-N 6235"      },
+    { 0x8086, IWN_DID_6235_2, "Intel Centrino Advanced-N 6235"      },
 	{ 0x8086, IWN_DID_5x50_1, "Intel WiMAX/WiFi Link 5350"			},
 	{ 0x8086, IWN_DID_5x50_2, "Intel WiMAX/WiFi Link 5350"			},
 	{ 0x8086, IWN_DID_5x50_3, "Intel WiMAX/WiFi Link 5150"			},
@@ -858,6 +860,9 @@
 		if (pid != 0x0082 && pid != 0x0085) {
 			sc->fwname = "iwn6000g2bfw";
 			sc->sc_flags |= IWN_FLAG_ADV_BTCOEX;
+		    /* xmj 3lines Override chains masks, ROM is known to be broken. */
+		    sc->txchainmask = IWN_ANT_AB;
+		    sc->rxchainmask = IWN_ANT_AB;
 		} else
 			sc->fwname = "iwn6000g2afw";
 		break;
@@ -5209,7 +5214,7 @@
 	cmd.energy_cck         = htole16(calib->energy_cck);
 	/* Barker modulation: use default values. */
 	cmd.corr_barker        = htole16(190);
-	cmd.corr_barker_mrc    = htole16(390);
+	cmd.corr_barker_mrc    = htole16(sc->limits->barker_mrc);
 
 	DPRINTF(sc, IWN_DEBUG_CALIBRATE,
 	    "%s: set sensitivity %d/%d/%d/%d/%d/%d/%d\n", __func__,
@@ -5791,7 +5796,7 @@
 		sc->rxon.ofdm_mask = 0;
 	} else {
 		/* Assume 802.11b/g. */
-		sc->rxon.cck_mask  = 0x0f;
+		sc->rxon.cck_mask  = 0x03;
 		sc->rxon.ofdm_mask = 0x15;
 	}
 	if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) {
@@ -7030,12 +7035,11 @@
 		/* Use internal power amplifier only. */
 		IWN_WRITE(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_RADIO_2X2_IPA);
 	}
-	if ((sc->hw_type == IWN_HW_REV_TYPE_6050 ||
-	     sc->hw_type == IWN_HW_REV_TYPE_6005) && sc->calib_ver >= 6) {
+	if (sc->hw_type == IWN_HW_REV_TYPE_6050 && sc->calib_ver >= 6) {
 		/* Indicate that ROM calibration version is >=6. */
 		IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_CALIB_VER6);
 	}
-	if (sc->hw_type == IWN_HW_REV_TYPE_6005)
+	if (sc->hw_type == IWN_HW_REV_TYPE_6050)
 		IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_6050_1X2);
 	return 0;
 }
Index: if_iwn_devid.h
===================================================================
--- if_iwn_devid.h	(revision 254177)
+++ if_iwn_devid.h	(working copy)
@@ -156,7 +156,16 @@
 #define	IWN_SDID_6035_2		0x4260
 #define	IWN_SDID_6035_3		0x4460
 #define	IWN_SDID_6035_4		0x4860
+
 /*
+ * xmj hack goes here
+ */
+
+#define IWN_DID_6235_1		0x088e 
+#define IWN_DID_6235_2		0x088f
+
+
+/*
  * --------------------------------------------------------------------------
  * Device ID for 1030 and 6030 Series
  * --------------------------------------------------------------------------
Index: if_iwnreg.h
===================================================================
--- if_iwnreg.h	(revision 254177)
+++ if_iwnreg.h	(working copy)
@@ -1891,6 +1891,7 @@
 	uint32_t	min_energy_cck;
 	uint32_t	energy_cck;
 	uint32_t	energy_ofdm;
+	uint32_t	barker_mrc;
 };
 
 /*
@@ -1905,7 +1906,8 @@
 	200, 400,
 	 97,
 	100,
-	100
+	100,
+	390
 };
 
 static const struct iwn_sensitivity_limits iwn5000_sensitivity_limits = {
@@ -1917,7 +1919,8 @@
 	170, 400,
 	 95,
 	 95,
-	 95
+	 95,
+	390
 };
 
 static const struct iwn_sensitivity_limits iwn5150_sensitivity_limits = {
@@ -1929,7 +1932,8 @@
 	170, 400,
 	 95,
 	 95,
-	 95
+	 95,
+	390
 };
 
 static const struct iwn_sensitivity_limits iwn1000_sensitivity_limits = {
@@ -1941,7 +1945,8 @@
 	170, 400,
 	 95,
 	 95,
-	 95
+	 95,
+	390
 };
 
 static const struct iwn_sensitivity_limits iwn6000_sensitivity_limits = {
@@ -1951,9 +1956,10 @@
 	128, 232,
 	125, 175,
 	160, 310,
-	 97,
-	 97,
-	100
+	110,
+	110,
+	110,
+	336
 };
 
 /* Get value from linux kernel 3.2.+ in Drivers/net/wireless/iwlwifi/iwl-2000.c*/
```


----------



## Spike (Sep 22, 2013)

xmj said:
			
		

> lee170:
> Needless to say I recompiled the system after adding that one-liner.
> 
> 
> ...



I followed these instructions, but it does not seem to work. If I launch  `# kldload if_iwn`, I obtain: 
	
	



```
Exec [I]format[/I] error
```
 while if I launch `# kldload [b]iwn6000g2bfw[/b]`, I do not obtain anything and wlan0 is not created.

Any idea? 
Thanks

p.s. I have Freebsd FreeBSD 9.2-RC4, fresh installation


----------



## xmj (Sep 28, 2013)

Spike said:
			
		

> I followed these instructions, but it does not seem to work. If I launch  `# kldload if_iwn`, I obtain:
> 
> 
> 
> ...



Check Quali's post from January 23rd, 2013, 05:13, it looks like you forgot the b64encode part mentioned there. The wlan0 device is created upon start of the system service netif, so it'll not become created until you do a `service netif restart`.

Also, you'll have to load the (b64-encoded) firmware before being able to load if_iwn.


----------



## Spike (Sep 29, 2013)

xmj said:
			
		

> Check Quali's post from January 23rd, 2013, 05:13, it looks like you forgot the b64encode part mentioned there.


I didn't forget that part, I read all the topic.
I launched `kldload iwn6000g2bfw` and then `service net restart`, but wlan0 isn't.



			
				xmj said:
			
		

> Also, you'll have to load the (b64-encoded) firmware before being able to load if_iwn.


Explain me this part, please. I'm newbie of FreeBSD 
Thanks


----------



## Spike (Oct 6, 2013)

In summary, I followed these steps:

I applied this patch: http://people.freebsd.org/~mav/iwn6235.patch.

The output of `pciconf -lbcev` is: 

```
none2@pci0:1:0:0:    class=0x028000 card=0x40608086 chip=0x088e8086 rev=0x24 hdr=0x00 
    vendor     = 'Intel Corporation' 
    class      = network 
    bar   [10] = type Memory, range 64, base 0xf0600000, size 8192, enabled 
    cap 01[c8] = powerspec 3  supports D0 D3  current D0 
    cap 05[d0] = MSI supports 1 message, 64 bit  
    cap 10[e0] = PCI-Express 1 endpoint max data 128(128) FLR link x1(x1) 
                 speed 2.5(2.5) ASPM L0s/L1(L0s/L1) 
ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected 
ecap 0003[140] = Serial 1 c48508ffff266ac9 
  PCI-e errors = Correctable Error Detected 
                 Unsupported Request Detected 
     Corrected = Advisory Non-Fatal Error
```
I'm using: 
	
	



```
FreeBSD freebsd.localdomain 9.2-RC4 FreeBSD 9.2-RC4 #0 r255465: Wed Sep 11 05:11:03 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
```

I downloaded the latest firmware iwlwifi-6000g2b-ucode-18.168.6.1.tgz and extracted the tgz*.*
I ran `b64encode -o iwlwifi-6000g2b-18.168.6.1.fw.uu iwlwifi-6000g2b-6.ucode iwlwifi-6000g2b-18.168.6.1.fw.uu` 
Then this: `make -C /usr/src/sys/modules/iwnfw/iwn6000g2b/ clean all install`. *T*he output is: 
	
	



```
rm -f iwlwifi-6000g2b-17.168.5.2.fw iwn6000g2bfw.c export_syms iwn6000g2bfw.ko iwn6000g2bfw.kld iwlwifi-6000g2b-17.168.5.2.fw.fwo iwn6000g2bfw.o 
Warning: Object directory not changed from original /usr/src/sys/modules/iwnfw/iwn6000g2b 
uudecode -p /usr/src/sys/modules/iwnfw/iwn6000g2b/../../../contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu > iwlwifi-6000g2b-17.168.5.2.fw 
iwlwifi-6000g2b-17.168.5.2.fw iwlwifi-6000g2b-17.168.5.2.fw 
awk -f @/tools/fw_stub.awk iwlwifi-6000g2b-17.168.5.2.fw:iwn6000g2bfw -miwn6000g2bfw -ciwn6000g2bfw.c   
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c iwn6000g2bfw.c 
ld  -d -warn-common -r -d -o iwn6000g2bfw.ko iwlwifi-6000g2b-17.168.5.2.fw.fwo iwn6000g2bfw.o 
:> export_syms 
awk -f /usr/src/sys/modules/iwnfw/iwn6000g2b/../../../conf/kmod_syms.awk iwn6000g2bfw.ko  export_syms | xargs -J% objcopy % iwn6000g2bfw.ko 
objcopy --strip-debug iwn6000g2bfw.ko 
install -o root -g wheel -m 555   iwn6000g2bfw.ko /boot/kernel 
kldxref /boot/kernel
```

I loaded the module: `kldload iwn6000g2bfw` (no output, so I think it's all ok)*.*
*W*hen I try to load if_iwn (`kldload if_iwn`), I obtain:  

```
kldload: can't load if_iwn: Exec format error
```
The dmesg output is: 

```
interface iwn.1 already present in the KLD 'kernel'! 
linker_load_file: Unsupported file type
```
*I*f I run `service netif restart`, obviously I have:

```
Stopping Network: lo0 re0.
lo0: flags=8048<LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether e8:03:9a:b6:ec:fe
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (none)
    status: no carrier
Starting Network: lo0 re0.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 
    inet 127.0.0.1 netmask 0xff000000 
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether e8:03:9a:b6:ec:fe
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (none)
    status: no carrier
```
So, where do I go wrong?

Thanks a lot to anyone who wants to help me!


----------



## xmj (Oct 13, 2013)

It looks like you're using the old firmware (17.*) instead of the new one (18.*) -- check posts #4 and #17.


----------



## Uby (Oct 13, 2013)

*Same problem I don't have wlan0*

Hello I am really new to FreeBSD, and I am having the same problem as @Spike, I followed the instructions, I tried many times always from a fresh install of FreeBSD 9.2 but nothing I have iwn0 but WLAN doesn't come up. I really don't know what else to do, please if you have any suggestions, I already read the discussion many times but I don't think I am missing something...

Thanks in advance.


----------



## Spike (Nov 3, 2013)

Solution? Rebuilding Kernel.
After patching files on 'iwn' directory, you have to rebuild the kernel.
Now, I'm currently browsing with my laptop and FreeBSD. 

Thanks a lot to everyone.


----------



## petterk (Mar 19, 2014)

Is this merged into FreeBSD 10 yet? Or do I have to apply the patch and recompile for it to work on Fbsd FreeBSD 10? 

I have a laptop which currently runs Linux and uses the intel Centrino 6235 chip.


----------



## schulzad (Jun 11, 2014)

petterk said:
			
		

> Is this merged into FreeBSD 10 yet? Or do I have to apply the patch and recompile for it to work on Fbsd FreeBSD 10?
> 
> I have a laptop which currently runs Linux and uses the intel Centrino 6235 chip.



The firmware shows up in FreeBSD10:

```
root@blackbox:/usr/src/sys/contrib/dev/iwn # ls
LICENSE					iwlwifi-5000-8.83.5.1.fw.uu		iwlwifi-6000g2a-18.168.6.1.fw.uu	iwlwifi-6000g2b-6.ucode
iwlwifi-1000-39.31.5.1.fw.uu		iwlwifi-5150-8.24.2.2.fw.uu		iwlwifi-6000g2b-17.168.5.2.fw.uu	iwlwifi-6050-41.28.5.1.fw.uu
iwlwifi-2000-18.168.6.1.fw.uu		iwlwifi-6000-9.221.4.1.fw.uu		iwlwifi-6000g2b-18.168.6.1.fw.uu	iwnwifi-2030-18.168.6.1.fw.uu
iwlwifi-4965-228.61.2.24.fw.uu		iwlwifi-6000g2a-17.168.5.2.fw.uu	iwlwifi-6000g2b-18.168.6.1.fw.uu.orig
```

But the Makefile in /usr/src/sys/modules/iwnfw/iwn6000g2b/Makefile still points to the older version

I built the releng kernel without iwn() or iwn6000g2b. Install the kernel and loaded the modules manually and the device showed up.  At this point I think all that's needed is the Makefile in iwnfw/iwn6000g2 to be updated.


----------



## HenryHu (Jun 11, 2014)

It seems like that the new version is not merged to 10-STABLE. You can manually replace it with the version in head (http://svnweb.freebsd.org/base/head/sys ... 35&view=co).


----------



## wblock@ (Jun 11, 2014)

Code is frozen in 9-STABLE for the upcoming 9.3-RELEASE.  But sometimes MFCs are forgotten, too, and filing a bug report can act as a reminder.


----------



## doa379 (Jul 11, 2014)

Any more tips anyone would care to add to this tutorial?
I've managed to muddle through the procedures but I seem to have only a partial solution. The interface iwn0 now shows up in `ifconfig`. I have the wireless network setup through wpa_supplicant. But running `dhclient wlan0` reports no link....giving up or Network is down. wpa_supplicant also reports Device not configured.

1. I added:

```
{ 0x8086, 0x088e, "Intel Centrino Advanced-N 6235"              },
{ 0x8086, 0x088f, "Intel Centrino Advanced-N 6235"              },
```
to /usr/src/sys/dev/iwn/if_iwn.c

2. Altered /usr/src/sys/modules/iwnfw/iwn6000g2b/Makefile to read:

```
KMOD=   iwn6000g2bfw
IMG=    iwlwifi-6000g2b-18.168.6.1
```

3. Copied iwlwifi-6000g2b-6.ucode > /usr/src/sys/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw

4. Recompiled the kernel:
`cd /usr/src`
`make buildkernel`
`make installkernel`

5. Merged these firmware files in /usr/src/sys/contrib/dev/iwn/:
b64encode -o iwlwifi-6000g2b-18.168.6.1.fw.uu iwlwifi-6000g2b-6.ucode iwlwifi-6000g2b-18.168.6.1.fw.uu

6. Reboot


*EDIT*
It is working on FreeBSD-10-STABLE-r268038 (subject patching and recompiling if_iwn.c) and it is also working out of the box on FreeBSD-11-CURRENT-r267801.

This wireless adaptor supports dual 2.4GHz and 5GHz bands.
But the only caveat (seeing I was having problems earlier on) is that only the 2.4GHz works and not the 5GHz one.
Still need more firmware to use this adaptor properly!


----------



## doa379 (Jul 14, 2014)

Firmware is fine. There is a glitch somewhere, 5G doesn't work or is very unstable at best (barely connects).


----------



## balanga (Sep 3, 2014)

I have just come across this thread and guess much of the discussion will also apply to the Intel Centrino Ultimate-N 6300, which, AFAICT is already supported in FreeBSD 10.0-STABLE which I am running. Having read through this thread I am a bit lost about what I need to do to get WiFi working. On boot up the WiFi adapter is recognised. It appears in dmesg. But when I run `ifconfig iwn0` it shows the status as 'no carrier'.

In rc.conf, I have

```
ifconfig_iwn0="dhcp ssid xxx"
```

What else do I need?

One thing I couldn't figure out was where wlan0 comes into play. Could someone explain?


----------



## doa379 (Sep 3, 2014)

The interface wlan0 only comes into play when you make the reference in rc.conf. It's just a link to iwn0.

'no carrier' doesn't matter. Connect first and then, as is common with wifi access, you need to get a DHCP lease to connect to the outside www. 

There are a number of good sources online to set up wifi under BSD.

I've gone back to Debian, so forgive me if I'm rusty again.


----------



## kpa (Sep 3, 2014)

The wlan0 is a cloned network interface created with `ifconfig wlan0 create wlandev iwn0` from the real interface that corresponds to the detected hardware, in this case iwn0. The reason why the cloning is used and not the iwn0 interface directly is to support cards that support creation of multiple virtual WLANs with different SSIDs and operating modes. Using just the detected interface wouldn't work because one interface can have only one set of certain settings. The cloning procedure is explained in the handbook (section Infrastructure Mode->FreeBSD Clients->How to Find Access Points):

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html


----------



## doa379 (Sep 3, 2014)

Couldn't have said it better


----------



## segfault (Sep 22, 2014)

Just tried installing using the snapshot named FreeBSD-11.0-CURRENT-amd64-20140918-r271779 on my zenbook UX31A and the wireless (Centrino 6235) is never detected, nor is it UEFI bootable out of the box. Is anyone else experiencing this?


----------



## adrian@ (Oct 18, 2014)

Hi!

(Wow this is an old thread.)

FreeBSD -HEAD has updated support, including the 6235 support.

-a


----------



## Chris2000SP (Dec 9, 2016)

Hello,
i'm new to FreeBSD and have installed 11.0 Release.

I have read all here, and have try to compile kernel with here posted tips. Nothing worked.

Here my dmesg:
`# dmesg | grep 'iwn0'`

```
iwn0: <Intel Centrino Advanced 6235> mem 0xf2400000-0xf2401fff irq 17 at device 0.0 on pci3
iwn0: adapter type id : 0x088f sub id :0x5260 rev 11 not supported (subdevice)
iwn0: could not attach device, error 45
device_attach: iwn0 attach returned 45
```

I wonder about 'subdevice' meaning the Bluetooth part i think.

`# grep -i '6235' /usr/src/sys/dev/iwn/if_iwn.c`

```
{ 0x8086, IWN_DID_6035_1, "Intel Centrino Advanced 6235"       },
   { 0x8086, IWN_DID_6035_2, "Intel Centrino Advanced 6235"       },
   { 0x8086, 0x088f, "Intel Centrino Advanced-N 6235"           },
               sc->limits = &iwn6235_sensitivity_limits;
               sc->base_params = &iwn_6235_base_params;
```

I am a newbie, not only on FreeBSD but also to UNIX OS's for all.
I have some experience with Ubuntu and Arch Linux.
I hope that's clear now.

I found a couple days ago somthing on mailing list but i didn't found the link any more. Maybe ill find it later by searching in my Browser history.

So finaly i couldn't get a device in ifconfig.

Please help.
C.

EDIT:
Fix grep copy paste issue

EDIT:
I realize that FreeBSDs hardware support is not as high like Linux (For Desktop). I think that i simply wait for support and use Linux.


----------

