# NdisWrapper

## busa_dude

I made an attempt to emerge NisWrapper and it gives me this message

```
Calculating dependencies

!!! All ebuilds that could satisfy "ndiswrapper" have been masked.

!!! One of the following masked packages is required to complete your request:

- net-wireless/ndiswrapper-1.2 (masked by: ~amd64 keyword)

- net-wireless/ndiswrapper-1.1-r1 (masked by: ~amd64 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or

section 2.2 "Software Availability" in the Gentoo Handbook.

```

I have tried to figure out how to handle the masked packages but it doesn't really explain why it's masked in the first place.  I don't want to end up setting my gentoo install onfire just after I'm able to get KDE working.  I'm attempting to get my Wireless networking going.  Naturally I have the onboard 54g broadcomm that seems to have no support anywhere.

----------

## feivelda

If you want to unmask, type

  echo "net-wireless/ndiswrapper ~amd64" >> /etc/portage/package.use

or

  echo "=net-wireless/ndiswrapper-1.2 ~amd64" >> /etc/portage/package.use

only for the 1.2 version.

But first try

  lspci -v | less

or 

  dmesg | less

and search for the chipset of your wireless card.

Then

  emerge -S [name of the chipset]

or if you have gentoolkit emerged

  esearch -S [name of the chipset]

Does it find anything?

----------

## busa_dude

when I do the lspci I get the following 

```
0000:02:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless

 LAN Controller (rev 03)

        Subsystem: Hewlett-Packard Company: Unknown device 12f4

        Flags: bus master, fast devsel, latency 64, IRQ 10

        Memory at e8100000 (32-bit, non-prefetchable)
```

What would be considered the chipset? [/code][/quote]

----------

## Stolz

 *feivelda wrote:*   

> If you want to unmask, type
> 
>   echo "net-wireless/ndiswrapper ~amd64" >> /etc/portage/package.use
> 
> or
> ...

 

¿Are you sure? /etc/portage/package.use is for seting USE flags for specific packages. To add an arch keyword you should use /etc/portage/package.keywords  :Wink: 

busa_dude, to learn how to deal with masked packages read the official handbook: Mixing Software Branches and also, for wireless read Wireless Networking

Hope it helps.

----------

## busa_dude

I figured out how to do the unmasking thing but I guess my question is now, is it worth it?  The handbook kinda frowns upon unmasking in order to emerge something.  I guess I'm not sure if I'm just taking too big of a step forward into something I'm not familure with.  Does anyone know if they have been able to get a broadcomm 54g WIFI to work on a laptop before I try to unmask and end up sending my gentoo install into orbit?

----------

## coolsnowmen

Yes its definitly

/etc/portage/package.keywords

to unmask a testing package (~amd64)

```

echo "net-wireless/ndiswrapper" >> /etc/portage/package.keywords

```

also to get my dell notebook wifi broadcom drivers working I used >=ndiswrapper-1.0

Downloaded the install file from dell, unziped it in windows(self extracting) and then send the *.inf and the required files over.

If you need more info ask, but as my laptop is at work right now I cannot give you more details.  But I did find someone had done this on the internet.  Try searching for your wirless card model and "ndiswrapper" or linux, maybe someone made a kernel modual for it.

----------

## busa_dude

I have found an actual kernel module from someone who has the same model laptop and wifi and so fourth, what do you do to update a kernel module?  I'm reading all over the place about recompiling the kernel and all sorts of stuff.   I almost hate to do to cause I just got mine working.  Is it a difficult process?

----------

## coolsnowmen

Precompiled kernal modules *.ko files usually only work with specific kernal versions.

There are kernel options to widen this, but for instance, a 2.4 kernal module will not work with a 2.6 kernel as far as I know.

Usually kernal modules come with instructions on how to compile a wrapper .ko file for their driver.

Like the emerge for nvidia-kernel, their driver is closed-source, but can somehow be added to the running kernel.

```
modprobe modulename 
```

will add a module to the running kernel.  But it has to be in the kernel modules path somewhere

/lib/modules/`uname -r`/...

insmod is the lower (and older) function if you want another place to look for programs to add kernel modules

if a modprobe fails, dmesg can sometimes tell you more information than what is on the console.

I wish I could help more...

PS. Where did you find a kernel modules for a 54g broadcom?

----------

## busa_dude

The website I found that is giving me the most information is http://www1.pacific.edu/~khughes/presario-r3120us/

This is the exact model laptop that I have and have pretty much been trying to mirror my settings off of it.   I still cannot get my touchpoint to work. Probably because I still do not understand the whole re-compile the kernel options and so fourth.  I used genkernel so I didn't get to view everything that was envolved in setting up the kernel option.  I'm still trying to get the touchpoint and WIFI working.  I'll tackle sound later cause that sounds like it will take alot more in depth work.

----------

## coolsnowmen

That post seems like it should help...

the ndiswrapper IS a kernal modules

you can add ndiswrapper to the /etc/modules.autoload.d/kernel-2.6 file for startup

and 

```
modprobe ndiswrapper
```

 for doing it yourself.

If you read the documentation on ndiswrapper, it would tell you that ndiswrapper is a module that allows the 

wireless tools 

```
emerge wireless-tools
```

, to access the network card using the windows wifi drivers for your card.  

As I said before, you need to find the windows drivers and coresponding .inf file to do this. Ndiswrapper comes with a command to install the drivers and uses the .inf file as an argument.

----------

## busa_dude

I had a few days of dedicated school and work so I had to step away from the project for a fiew.  I got Ndiswrapper and all of the proper inf and sys files but when I go to emerge ndiswrapper, I get a weird error message.   I have been looking threw the forums and so fourth and have even tried to re=emerge my sources and so fourth.  This is the error message I'm getting

```
--- Invalid atom in /etc/portage/package.keywords: n

Calculating dependencies ...done!

>>> emerge (1 of 1) net-wireless/ndiswrapper-1.2 to /

>>> md5 files   ;-) ndiswrapper-1.1-r1.ebuild

>>> md5 files   ;-) ndiswrapper-1.2.ebuild

>>> md5 files   ;-) files/ndiswrapper-1.2-suspend2.patch

>>> md5 files   ;-) files/digest-ndiswrapper-1.1-r1

>>> md5 files   ;-) files/digest-ndiswrapper-1.2

>>> md5 src_uri ;-) ndiswrapper-1.2.tar.gz

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found sources for kernel version:

 *     2.6.12-gentoo-r6

 * getfilevar requires 2 variables, with the second a valid file.

 *    getfilevar <VARIABLE> <CONFIGFILE>

 * Could not find a usable .config in the kernel source directory.

 * Please ensure that /usr/src/linux points to a configured set of Linux sources.

 * If you are using KBUILD_OUTPUT, please set the environment var so that

 * it points to the necessary object directory so that it might find .config.

!!! ERROR: net-wireless/ndiswrapper-1.2 failed.

!!! Function linux-info_pkg_setup, Line 521, Exitcode 1

!!! Unable to calculate Linux Kernel version

!!! If you need support, post the topmost build error, 
```

Anymore ideas and would it be easier to just buy an external wireless NIC  like a D-link or something[/code][/quote]

----------

## coolsnowmen

 *busa_dude wrote:*   

> 
> 
> ```
> --- Invalid atom in /etc/portage/package.keywords: n 
> ```
> ...

 

This is a separate problem: There is a syntax problem in /etc/portage/package.keywords

post

```
cat /etc/portage/package.keywords
```

if you want help.

 *busa_dude wrote:*   

> 
> 
> ```
> 
>  * Determining the location of the kernel source code
> ...

 

You made a kernel, but somehow you dont have the .config file in it anymore?

Does /usr/src/linux point to /usr/src/linux-2.6.12-gentoo-r6

check with 

```
ls -l /usr/src
```

Is your running kernel one and the same (does uname -r return 2.6.12-gentoo-r6)?

Does the .config file exist? ls /usr/src/linux/.config

If it doesnt, you might be able to get it for your current running kernel if you kernel was compiled with that ability. (if /proc/config.gz exists, copy it to /usr/src/linux and gunzip it)

----------

## busa_dude

I fixed the problem with the atom error and I also fixed the problem with the sources issue.  I went and borrowed a PCMCIA wireless network card from a friend of mine to attempt to get the wireless working that round and recompiled my kernel.   YEAH!!!!  And Linux still works.   Problem I'm having now is that I can't even get it to notice the D-link wireless card that is attached to the PCMCIA slot.  I used Ndiswrapper to attempt it and no dice.  Do you think a USB adaptor would be easier to configure?   I'm still not giving up on my internal but IT said they are switching our network at work over to full wireless so I won't be able to use valuable work time to play with Gentoo unless I can get some kind of wireless access.

----------

## coolsnowmen

 *busa_dude wrote:*   

> IT said they are switching our network at work over to full wireless so I won't be able to use valuable work time to play with Gentoo unless I can get some kind of wireless access.

 

This is a sad day, a wired infrastructure is so much better but dont get me started....

Have you ever done anything with pcmcia on this box before? compiled it into the kernel? does it work with the live cd? (that can be a good place to see what to compile in by seeing what modules are loaded with 

```
lsmod
```

I've only used pcmcia once ever (though for exactly what you are doing) so I dont have much experiance, but I dont mind helping.

----------

