Nov
19

Looking for NDIS Testers (FreeBSD and PC-BSD)

The ndisgen(8) utility can be used to convert an existing Windows network driver to a FreeBSD kernel loadable module. This can allow you to access network devices for which a FreeBSD driver doesn’t currently exist (typically wireless drivers). The utility has been around for a while and typically works well on 32 bit systems. However, users on 64 bit systems often experience kernel panics or drivers that load but don’t do anything.

Paul Mahol is working on improvements to ndisgen and is looking for testers so that it can be tested on as much hardware as possible before the improvements are committed to the FreeBSD repository. If you have a network device without a FreeBSD driver, you can help (and possibly get yourself a working driver!) by doing the following:

As the superuser, use the download link on the NDISulator page to download either the .tgz or .zip file.

Update: on 9.0, use this download link instead.

Uncompress that file to /tmp, then:

cd /tmp/richardpl-NDISulator-9ee6cda/
make attach
make build
make install

Download an XP or Windows 2003 driver for your device and make note of the locations of the .inf and .sys files that came with the download. Make sure you download and use the files that match your architecture (32 or 64 bit). Run the interactive script and input the paths to those files when prompted:

ndisgen

Once the conversion is complete, the script will indicate the name of the kernel module (it will end in a .ko extension) which was created in your current directory. After exiting the script, try to load the driver:

cp driver_name.ko /boot/modules
kldload driver_name

If all went well, the network device should now be accessible using ndis(4) as described in the FreeBSD Handbook. When you are finished, don’t forget to:

make detach

If things went well, take a moment to double-check that your device is mentioned in Table 1 of the Wireless Testing page and add it if it is not.

If all did not go well, head over to the Ndisulator Wiki. Take a minute to read its content (it’s short and sweet), especially the Making useful bug reports page. If you don’t have a github login, you can create one here so that you can submit your bug report here.

Share This Post:
  • Digg
  • Facebook
  • Twitter
  • email
  • LinkedIn
  • Slashdot

Written by dru. Posted in hardware, testers

Trackback from your site.

Comments (9)

  • […] This post was mentioned on Twitter by Dru Lavigne and Oliver Herold, PC-BSD. PC-BSD said: Looking for NDIS Testers (FreeBSD and PC-BSD) http://​ht​.ly/​3​c​ucI […]

  • Licorne Negro
    November 20, 2010 at 9:07 pm |

    Just commenting…
    Thanks for the info and the help (not just for me, but for everyone with the same problem). I’ll be testing on my notebook. =D
    And no, not even the last post review, with the instructions to ndisgen the similar drive, helped me.
    I starting to think if this is not an shady plot by MicroSoft. (ok, I don’t like conspiracies. :P) Or maybe, is just because I don’

  • August 28, 2012 at 5:55 am |

    hi ‚have problem in copilation make . check error.
    I copy packeages on /usr/src
    /////////////////////////////

    desshi# pwd
    /usr/home/desshi/Descargas/ndisulator
    desshi# ls
    Makefile README src
    desshi# make attach
    mounting NDISulator code on top of FreeBSD code
    mount_nullfs src/sys/compat/ndis /usr/src/sys/compat/ndis
    mount_nullfs src/sys/dev/if_ndis /usr/src/sys/dev/if_ndis
    mount_nullfs src/sys/modules/ndis /usr/src/sys/modules/ndis
    mount_nullfs src/sys/modules/if_ndis /usr/src/sys/modules/if_ndis
    mount_nullfs src/usr.sbin/ndiscvt /usr/src/usr.sbin/ndiscvt
    mount_nullfs: Resource deadlock avoided
    *** Error code 1

    Stop in /usr/home/desshi/Descargas/ndisulator.
    desshi# make build
    cd /usr/src/sys/modules/ndis && make
    ”/usr/share/mk/bsd.kmod.mk”, line 12: “can’t find kernel source tree“
    *** Error code 1

    Stop in /usr/home/desshi/Descargas/ndisulator.
    desshi# make install
    cd /usr/src/sys/modules/ndis && make install
    ”/usr/share/mk/bsd.kmod.mk”, line 12: “can’t find kernel source tree“
    *** Error code 1

    Stop in /usr/home/desshi/Descargas/ndisulator.

    • August 28, 2012 at 5:59 am |

      It looks like /usr/src is not installed on that system.

  • boniek
    August 28, 2012 at 5:21 pm |

    Sorry, I am a beginner on freeBSD + kde 3.xx
    can I help with a exactly steps ?!

    pliss.

    thanks freedom

  • curtrey
    March 23, 2013 at 4:57 am |

    I really think I am now in over my head!!!! Don’t understand a word of it.

    richard@pcbsd-4326] ~% cd /tmp/ndisulator-stable/
    [richard@pcbsd-4326] /tmp/ndisulator-stable% make attach
    mounting NDISulator code on top of FreeBSD code
    mount_nullfs src/sys/compat/ndis /usr/src/sys/compat/ndis
    mount_nullfs: Resource deadlock avoided
    *** [attach] Error code 1

    Stop in /tmp/ndisulator-stable.
    [richard@pcbsd-4326] /tmp/ndisulator-stable% make build
    cd /usr/src/sys/modules/ndis && make
    Warning: Object directory not changed from original /usr/src/sys/modules/ndis
    cc –O2 –pipe –fno-strict-aliasing –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 /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c
    In file included from /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:51:
    @/compat/ndis/hal_var.h:45:1: warning: “X86_BUS_SPACE_IO” redefined
    In file included from ./machine/bus.h:6,
    from /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:46:
    ./x86/bus.h:119:1: warning: this is the location of the previous definition
    In file included from /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:51:
    @/compat/ndis/hal_var.h:46:1: warning: “X86_BUS_SPACE_MEM” redefined
    In file included from ./machine/bus.h:6,
    from /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:46:
    ./x86/bus.h:120:1: warning: this is the location of the previous definition
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘WRITE_PORT_ULONG’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:101: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:101: error: (Each undeclared identifier is reported only once
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:101: error: for each function it appears in.)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘WRITE_PORT_USHORT’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:108: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘WRITE_PORT_UCHAR’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:115: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘WRITE_PORT_BUFFER_ULONG’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:122: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘WRITE_PORT_BUFFER_USHORT’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:130: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘WRITE_PORT_BUFFER_UCHAR’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:138: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘READ_PORT_USHORT’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:146: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘READ_PORT_ULONG’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:153: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘READ_PORT_UCHAR’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:160: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘READ_PORT_BUFFER_ULONG’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:167: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘READ_PORT_BUFFER_USHORT’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:175: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function ‘READ_PORT_BUFFER_UCHAR’:
    /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:183: error: ‘AMD64_BUS_SPACE_IO’ undeclared (first use in this function)
    *** [subr_hal.o] Error code 1

    Stop in /usr/src/sys/modules/ndis.
    *** [build] Error code 1

    Stop in /tmp/ndisulator-stable.
    [richard@pcbsd-4326] /tmp/ndisulator-stable%

    Help please
    I can’t swim
    Curtrey
    Report Post

  • ArchBSD
    April 22, 2013 at 1:03 am |

    Hi. I’m having a similar problem to what boniek has experienced. I have also the “/usr/share/mk/bsd.kmod.mk”, line 12: “can’t find kernel source tree” problem. In my case I already have the /usr/src directory populated, and I also have checked if the file is there and it is. I’ve been struggling with this for a full day.

Leave a comment

*

Please leave these two fields as-is:

Help the Project, Donate Today!