Quote (Aiku @ Sep. 20 2004,01:19 (in the "Verified Wireless Cards" Thread)) |
Here is what I use for basic connection for my Netgear USB MA111 #!/bin/bash wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable wlanctl-ng wlan0 lnxreq_autojoin ssid=YOUR_SSID authtype=opensystem pump -i wlan0 kill `pidof wmnet` wmnet -w -W wlan0 & I mainly use it a public access points |
Code Sample |
#include <iostream.h> #include <string> #include <stdlib.h> int main() { // This program will configure your prism2_usb.o based USB wireless device for use in Damn Small Linux v.0.8.2 // This was thrown together by J.P. Nimmo, a.k.a. SaidinUnleased late at night, and as such may be buggy, crappy, ed up, or may not work all together. If you experience problems, fix it yourself. system ("clear"); cout << "This program will configure and enable your prism2 based USB wireless device and restarts wmnet to monitor it.\n"; short int menuchoice = 0; string devname = wlan0; string authtype = opensystem; string sid; while (menuchoice != 6) { cout << "--------MAKE SURE YOU DO 3--------\n"; cout << "1 - run iwconfig \(so you can see the name of your USB wireless device, usually wlan0\)\n"; cout << "2 - set your USB wireless device's name \(default wlan0\)\n"; cout << "3 - set your SSID \(the name of the network, usually\)\n"; cout << "4 - set your authtype \(default is opensystem\)\n"; cout << "5 - execute the setup, according to your settings and exit\n"; cout << "6 - Exit without doing anything\n" cout << "--------MAKE SURE YOU DO 3--------\n"; cout << endl; cout << Enter your choice: "; cin >> menuchoice; if (menuchoice<1 || menuchoice>5) { cout << "THAT CHOICE IS NOT VALID!!!\n"; cout << endl; } if (menuchoice == 1) { system ("sudo iwconfig"); cout << endl; } if (menuchoice == 2) { cout << "Enter the name of the wireless device: "; cin >> devname; cout << endl; } if (menuchoice == 3) { cout << "Enter your SSID: "; cin ssid; cout << endl; } if (menuchoice == 5) { cout << "Executing config with Device name \"" << devname << "\" with SSID \" << ssid << "\" and authtype \"" << authtype << "\".\n"; cout << "Is this correct? \(y or n\) "; char confirm; |