Skip navigation.

NDIS on BSD

, , , ...

I spent the last day trying to set up an NDIS connection on my PC-BSD install. There are already a few "how-to"s on the Internet, but they are either dated or incomplete. Usually both. What I hope to accomplish here is to add a current manual for those who need an NDIS wrapper for their wireless cards under PC-BSD. Keep in mind that PC-BSD is basically FreeBSD, so read on if you're a FreeBSD user.

What is NDIS?

Some network cards do not have native drivers for BSD, Unix (Solaris/OpenSolaris), or Linux. In order to get these wireless cards to work we can use some software that allows us to use the Windows drivers on a non-Windows operating system.

How difficult is this to set up?

Actually, it's very easy but may require a little trial and error. The reason for this is that not all drivers are the same. I had to try 3 different drivers before I got one that worked on BSD. The OpenSolaris website has a list of drivers that are known to work under Solaris. These drivers appear to work well under BSD as well. I'll give you the link in the next section of this how-to.

Assumptions

I'm assuming you can use a wired connection while you're setting up your wireless. You will need to download some software so an Internet connection of some sorts is necessary.


Requirements

Most of the requirements will already be installed on your system if you're using PC-BSD. I haven't double checked on Free-BSD, but the requirements are:

  • NDIS... this is in the default install of PC-BSD.
  • A Windows driver. As I mentioned already, not all drivers will work. You may need to try a few out. I got lucky on my 3rd try. The drivers that are recommended for OpenSolaris seem to work fine under BSD as well. Check out the bottom of this page. If you get confused on the naming scheme then keep this in mind: (14E4,4312) will work for bcm4312 cards. Just match the numbers to your card. If you're not sure what card your using run: scanpci -v and your wireless card should be in the list. (You'll have to do this as root.)
  • cabextract, you can always install using pkg_add -r cabextract or use the ports collection.
  • Kernel source, it's on CD 2 of the PC-BSD disks.


Set it up

I'm assuming you downloaded a Windows driver. The driver files need to be extracted from your Windows executable. This is where cabextract comes in. Just run: cabextract -l driverName.exe from the command line. Obviously, you'll need to replace driverName.exe with the actual name of the driver that you downloaded. So, it may look something like: cabextract -l sp31463.exe. You'll only need 2 files from the driver. One will end in .inf while the other will end in .sys The name of both should be the same. For simplicity rename these files to ndis.inf and ndis.sys. You don't have to do this, but it's easier to remember the names if you do.

In the command line run the command: ndisgen. This will start a wizard for you which makes life wonderful and simple. Select option 3 which is: Convert Driver. The wizard will ask you for the name of the driver files. If you renamed them as I suggested then you'll just have to type in ndis.sys and ndis.inf. The wizard will take care of the rest for you and will output a driver file which will end with a .ko extension (like ndis_sys.ko).

You can now test your driver using the command: kldload ./driverName.ko (run as root and use the real name of the driver, of course). Some manuals suggest loading several modules such as "kldload ndis" and "kldload if_ndis", but these load automatically when any other module depending on them is loaded. Therefore, this is unnecessary. If you run the command dmesg now you should see an entry starting with ndis0. This means that your driver works. Else, you may see a slew of error messages including something like loading "dummy ndis". In this case your driver doesn't work. Try another Windows driver and start again. It took me 3 tries to get a driver that worked.

To get your driver to start on system boot do the following:

  • Copy your driver file to /boot/modules OR /boot/kernel (should work for both locations. In newer manuals it suggests copying to /boot/modules. My install works fine with /boot/kernel.)
  • Edit the file: /boot/loader.conf and add an entry driverName_load="YES", so if your driver name was ndis.ko then your entry should be ndis_load="YES".


Now you just need to configure your wireless card normally. You can use a graphical tool for this (included with PC-BSD) or do it by hand. The networking tool that comes with PC-BSD is very nice... by the way. =) I'm new to PC-BSD so there may be something that I've overlooked or a helpful tip that I've missed. If so, then please do pass them on to me and I'll add them to my post.

Problems with "IT"

, , ,

Yesterday a gentleman from KT Telecom visited my house to set up my Internet connection. My previous Internet provider was less stable than Windows ME and so I had had enough. It was time for a change. Initially everything seemed to be going fine until...

a) I use Linux. The gent needed to set the networking up so I opened up a graphical control panel so that he could adjust the settings. I clearly told him that the DHCP server in the router was turned off. Every computer in my network had a static IP assigned to it. I wrongly assumed that he would know that the only thing he had to do was to change the DNS settings to get things working. He stared at the screen for 2 minutes and finally gave up. He said: "I don't know how to set up Linux". I was intrigued and decided to see what kind of trouble we could get ourselves into and so I told him that this wouldn't be a problem because I could boot into Windows.

b) I logged him into Windows Vista and I got the same blank stare as I had when he was looking at Linux. Okey dokey, I thought to myself. Let's see if he can do this in XP!!?? So I booted him into Windows XP on another computer.

c) He immediately felt very comfortable and happy that he was in front of a familiar environment. He proceeded to immediately clear all the static IP information from the computer. He set the computer up to use DHCP and tested the Internet. Nothing. I asked him what he was doing and told him that what he had done wouldn't work because DHCP was turned off in the router and that each computer had a static IP. I refrained from giving him the solution to the problem though to see if he could figure it out himself. His solution was to reset the router.... Ok, that worked, but it also turned off all the security settings and left the network wide open and just waiting to be compromised by anyone with a wireless card. It also left my file shares and printer open for anyone to use.

I thanked the gentleman and set the network up myself. As I mentioned before, the only setting that had to be changed in my case was the DNS information. This was really basic and shouldn't have given any computer professional a problem.

The problem with IT today is that I can give similar and/or worse stories about other companies like Bell Canada (Sympatico), HP tech support, etc. I can understand the need to watch the bottom line and the need to make money, but I have a request for the IT/Technology companies out there. If you hire someone for a job then please make sure that they are either qualified to do their job when they start or train them so that they become qualified. Please....

New Solaris Install

, , ,

I've been a desktop Linux user for about 7 years now so I feel really comfortable in that environment. So I recently decided to take a third year UNIX administration class at the University level to update and hopefully upgrade my computer skills. With this in mind I installed both FreeBSD and Solaris as virtual machines on my main desktop at home. I really wanted to get some new experience and get out of my comfort zone so I decided not to use Linux for the course.

I've used FreeBSD on a live CD before, but this was my first longer experience with the system. My first impression was that it was a little rough around the corners. It was difficult to setup and the manual that they provide isn't particularly well written and sometimes contradicts itself. Before I get a lot of BSD users on my back I'll give an example of what I mean. The section on installing software starts with a 1 page description of downloading and installing software via command line FTP, only to state that we could have skipped this whole overcomplicated process by simply typing "pkg_add -r packageName". The manual is recommended by FreeBSD for new users and considering this why wouldn't they leave the overcomplicated examples to the end and make the simple one line answer immediately visible (instead of in the middle of a paragraph) and located at the top of the page? I also followed their example, step by step, to install Gnome 2.20.... but, I ended up getting Gnome 2.16 instead.

After a good week of solid FreeBSD use I can state that the longer I use it the more I like it. It's a powerful system that works very well and has some very nice package/software management tools included with it. I would recommend it to anyone with patience but would warn them that they would probably experience a rather bumpy start.

I also decided to install Solaris Express Developers Edition yesterday. It has the easiest installer that I've ever used, although the install took over 1 hr and consumed about 6 Gigs of hard drive space. What I found missing from the installer was the ability to delete an individual partition on the disk. I have 4 partitions on my hard drive and trying to delete the second partition would automatically delete the third and fourth partitions, which was not something that I was ready to do. I would recommend partitioning the drive before installing Solaris and leaving enough empty/unused space for Solaris somewhere on the disk.

I really like the fact that they provide a tool for testing the hardware on your computer for compatibility before you install the software, which is very convenient. On the other hand the install was very slow and the first boot took forever. After it is all set up though it works very well. It's rather heavy on resources so beware. The installer needs 756MB of ram for a graphical install and then uses about 1/2 a Gig during normal usage.

Solaris automatically configured my network via a background service called "Auto Magic" and has plenty of software available for the developer including Sun Studio. It also has the nicest looking default desktop I've seen on any Unix type system (Gnome desktop and CDE are included). It works very well and feels really polished. I'd definitely consider using this for my main system and may even make the switch after I learn a little more about it. There are a lot of advanced features including the ability to run Linux binaries without the need to recompile so I've got some serious studying ahead of me, but I feel really excited to be using this system.

Protecting copyright?

, , ,

Well, today I was reading the news and there was an article that stated that one of the Ubuntu developers, Matthew Garrett, was able to force the removal of the MPAA University Toolkit from it's download servers. This software basically allowed the MPAA to spy on students online activities while they surfed, but the reason why this software was asked to be removed in the first place was because the software was based on Xubuntu Linux and violated copyright. So, we have the MPAA (Motion Picture Association of America) who are so interested in protecting their own copyright that they willingly break someone else's copyright to protect their own. Not only that but they were unwilling to cooperate with the developer and refused to speak with him via email and telephone forcing him to call the companies ISP (Internet Service Provider) and basically force the removal of the software.

Shame on you MPAA! There is either respect for copyright or there isn't. When we have one of the loudest proponents of copyright breaking copyright then something is clearly very wrong.

An opinion about piracy: Part II

, , ,

I was reading an article this morning, on Forbes, about the science fiction author Cory Doctorow. What's unique about his approach to business is that he gives away his work for free. Not only that, but he says that giving away his work has made him a LOT of MONEY!!! Is he crazy??

Well no, he's not crazy, he's smart and business savvy. He makes the valid point that the people that download his books, and there have been 700,000 downloads so far, are people that wouldn't have bought his book anyways. He goes on to explain how this is NOT a loss of sales. In fact, this is how he builds up a customer base. People download his book, like it, and may purchase the other books that he releases.

He explains this much better than I, so here's a small quote: "Most people who download the book don't end up buying it, but they wouldn’t have bought it in any event, so I haven’t lost any sales, I’ve just won an audience. A tiny minority of downloaders treat the free e-book as a substitute for the printed book--those are the lost sales. But a much larger minority treat the e-book as an enticement to buy the printed book. They're gained sales. As long as gained sales outnumber lost sales, I'm ahead of the game. After all, distributing nearly a million copies of my book has cost me nothing."

I think that Mr. Doctorow could teach the RIAA a thing or two about making money and the value of building an audience through free product/advertising. Back in Canada I had over 300 original CD's so I hope that this isn't sounding like I just want a freebie. On the other hand, when I think of the music that I have purchased lately, then all of my purchasing decisions were based on music that I heard at: concerts (bands I had never heard of before going to the concert it that makes a difference), things I've seen on youtube, and songs I've heard of last.fm. So, most of my last purchases were in fact based on freebies that I had heard via the Internet. If you kill the freebies then you really kill many of the purchases with the same blow.

Source:
Forbes
Cory Doctorow's Homepage
December 2009
M T W T F S S
November 2009January 2010
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31