The FreeBSD Diary |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
Installing via wireless NIC
21 May 2001
|
If you have been paying attention and reading every one of my articles (which of course, everyone does, I have no doubt) you will recall that John Van Boxtel gave me a Compaq Presario 1620 laptop. This beast has an 814MB disk, 48MB of RAM, and three spare batteries. I've also been given two Lucent Orinoco wireless cards, one Gold, and one Silver. Over the weekend, I've managed to combine the two donations and get FreeBSD installed on the laptop using wireless. Also critical to this success is David Yeske who sent me an mfsroot.flp image which contained wicontrol. Without that, installing via wireless would not have worked for me. David plans to incorporate this into the install process for FreeBSD so that wireless installs are just another install option! |
What I did
|
I installed a wireless NIC into my desktop, configured it to act as a gateway, enabled NAT, and used that as the gateway for my laptop. The laptop then communicated with the gateway using its own wireless NIC. Together, these two boxes allowed me to do an install on the laptop using wireless. This was after I'd failed using the laptop's CD, which I now know is broken. This article will not go into detail concerning gateway creation, NAT, or the install process. There are other articles which cover this information and are more appropriate to those task. Please refer to the Topics for help in those areas. |
Configuring the desktop
|
My boxes have hardcoded IP addresses. I'm not using DHCP. So I added the following entries to /etc/rc.conf on my desktop box:
The entries on my laptop were created by the install process. I didn't have to create them. But I'll show you what they are in the Laptop Install section The main things you must remember to do on the desktop is to configure it as a gateway and to enable NAT. Because my desktop box was already configured with ipfilter, all I had to do was this:
|
Creating Peer-to-Peer cards
|
The two wireless cards are Orinoco cards from Lucent Technologies. One is a Gold card, the other is a Silver card. The primary difference between the two is the level of encryption available. They just plug into a PCMCIA slot on your laptop or into an adaptor in your desktop. I was given both an ISA adaptor and a PCI adaptor. I have yet to get the PCI adaptor to work, but the ISA adaptor works fine. I hear work is underway to get the PCI adaptor working. These cards appears as a wi device. And the key to getting the two wireless cards talking to each other is the port type. The cards (I'm going to start calling them NICs any moment now) can talk to either an access point or another card. In ad-hoc mode, any card to speak to any other card which is also in ad-hoc mode. In BSS mode, a card can only talk to an access point. Since I have only two cards and no access point, I'll be putting both cards into ad-hoc mode. The cards can be put into ad-hoc mode with the following command: wicontrol -i wi0 -p 3 Please refer to man wicontrol for more detail. |
/etc/pccard.conf
|
The following is from man pccard.conf: The pccard.conf file is the configuration file for the pccardd(8) PC-CARD slot management daemon. It provides information to allow card identifi- cation, and the matching of drivers (along with driver resources) to the PC-CARD cards.In short, it allows the card to be connected to a driver when the card is inserted into the laptop. The default values for the cards are located in /etc/defaults/pccard.conf. Here is the entry I've created in /etc/pccard.conf based on the defaults. I found this entry by searching for "Lucent WaveLAN" and picking the one which applied to device wi: $ more /etc/pccard.conf # Lucent WaveLAN/IEEE card "Lucent Technologies" "WaveLAN/IEEE" config 0x1 "wi" 5 # config auto "wi" 11 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop insert wicontrol -i $device -p 3 Note the last line. I added this line to force the device into ad-hoc mode. This command will be executed each time the card is inserted (or when the laptop is booted and the card is already inserted). Note that $device is a placeholder for the actual device name, in this case wi0. If you are using DHCP, there is a better solution. The above will work with DHCP, but this following method is cleaner. Gregory Shapiro said: The hook is to create /etc/dhclient-exit-hooks (chmod 0755) with:# Initialize the WaveLAN card with the proper parameters if [ "$interface" = "wi0" -a "$reason" = "PREINIT" ] then /usr/sbin/wicontrol -i $interface -P 3 fi exit 0 |
The laptop install
|
The main problem with the install now is that it doesn't use the PCCARD. You need to do something extra. Namely setup the card so it works. The existing install does attempt to use the card, but it doesn't go all the way. I managed, mostly by luck, to locate David Yeske who was planning to solve this very problem. I volunteered to test what he was working on. A couple of days later, David sent me an email directing me to his website where I found a new mfsroot.flp image. This is used on the second of the two install disks. Within this image was included wicontrol, which is what I needed in order to get the laptop wireless card functioning. I just used David's version of the image for my install disks. You can find David's files in the sample files directory. They were created for 4.4-RELEASE. Here's an overview of the install process. This should be enough to let you know how to proceed:
After that, the install just worked.... It was great! Here are the /etc/rc.conf entries from the laptop: pccard_enable="YES" pccard_ifconfig="inet 10.0.0.10 netmask 255.255.255.0" pccard_mem="DEFAULT" pccardd_flags=" -i 3" |
thanks to...
|
I'd like to thank the following people:
|