# Boot hangs while loading ndis0



## vexis (Mar 18, 2010)

I was trying to get wireless on my laptop with freeBSD. 

And had the ath0 does not exist situation.

Anyways i followed this:
http://www.freebsd.org/doc/handbook/config-network-setup.html

And fished out the w39n51.sys and w39n51.inc driver files for my wlan card. 

And then did this:
http://www.cyberciti.biz/faq/freebsd-install-kernel-source-code/

ndis generated my w39n51_sys.ko successfully.

and then i 

```
kldload ./w39n51_sys.ko

kldstat
```

It appeared in the kldsld stat.

Next i did:

```
ifconfig ndis0 up

ifconfig
```
It was there and "UP"


Then as the handbook suggested
I placed a copy of it in my boot/modules

and added

```
w39n51_sys_load="YES"
```
to my /boot/loader.conf

I then rebooted. And my system hangs on:

```
ndis0: <Interl(R) PRO/Wireless 3945BG Network Connection> mem0xd6000000-0xd6000fff irq 16 at device 0.0 on pci2
ndis0: [ITHREAD]
ndis0: NDIS API version: 5.1
```


Im sorry i cant paste any other stuff, the system doesnt even boot. 
Im guessing my mistake was the line i added to /boot/loader.conf 
Should have been if_ndis_load="YES".

Would appreciate some help on fixing this. If it is fixable. Thanks.


----------



## vexis (Mar 19, 2010)

I cant edit the post. 
The interl in the message above is a typo for Intel 

Also it rebooted and was running fine b4 the said changes.

Intel(R) PRO/Wireless 3945BG would be the network card i have installed. According to windowsXP on the other partition.

PS - I am a noob.


----------



## vexis (Mar 19, 2010)

http://faqs.pcbsd.org/index.php?action=artikel&cat=4&id=324&artlang=en

Tried it again using that. Still failed. same problem.

ifcongig ndis0 up scan tells me "ifconfig: unable to get scan results"


----------



## richardpl (Mar 19, 2010)

Do your homework.

If you are using 8.0 than you need to first create wlanX.

If you searched forums you would find issue with ndis and boot process - workaround is to not put stuff in loader.conf or to use older drivers without such problem.


----------



## vexis (Mar 19, 2010)

Ok, ive added 

```
wlans_ndis0="wlan0"
ifconfig_wlan0="WPA DHCP"
```
to my /etc/rc.conf 
(http://forums.freebsd.org/showthread.php?t=11978&highlight=freebsd+wireless)

Next

```
# kldload ./w39n51_sys.ko
# kldstat
```

kldstat shows that w39n51_sys.ko, if_ndis.ko, ndis.ko are loaded

then i tried

```
# ifconfig wlan0 create wlandev ndis0
ifconfig: create: bad value
```
(http://forums.freebsd.org/showthread.php?t=10687&highlight=freebsd+wireless)
Note: i think i did try this once before the previous day(and a few reboots back), and it didnt give me the bad value message.

Since that didnt work out i decided to move on n try:

```
# ifconfig wlan0 up
# ifconfig wlan0 list scan
```
The ifconfig wlan0 list scan didnt give me anything.

Next i tried

```
# ifconfig wlan0 up scan
```
And that just leaves me waiting. For a very very long time(30 mins+) till i ctrl+c.
While i was waiting, i ifconfig wlan0 'd frequently. Didnt see any changes there, not sure if i was suposed to.


What am i doing wrong?


----------



## vexis (Mar 19, 2010)

More information:

```
# /etc/rc.d/netif start wlan0
/etc/rc.d/wpa_supplicant: WARNING: /etc/wpa_supplicant.conf is not readable.
/etc/rc.d/wpa_supplicant: WARNING: failed precmd routing for wpa_supplicant
Starting Network: wlan0.
...
```

also is there a way to copy paste frm the terminal?


----------



## richardpl (Mar 20, 2010)

vexis said:
			
		

> then i tried
> 
> ```
> # ifconfig wlan0 create wlandev ndis0
> ...



There can only be one vap at time for ndis0 device, and you already created one (in rc.conf).


----------



## richardpl (Mar 20, 2010)

vexis said:
			
		

> More information:
> 
> ```
> # /etc/rc.d/netif start wlan0
> ...



You did not created wpa_supplicant.conf file

Look, this is going to be very long yourney so please start to explore documentation like FreeBSD handbooks before coming here again.
If your english is very bad, than learn it.


----------



## vexis (Mar 21, 2010)

alright thanks.


----------

