SaidinUnleashed
Group: Members
Posts: 1428
Joined: Mar. 2004 |
|
Posted: Oct. 17 2004,06:28 |
|
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 |
I'm getting in the spirit of a real linux user and writing an app to do this easily.
It'll be in C++ as source, and I'll post the source here as well as emailing the binary to ke4nt1.
I'd write it in C, but I don't know how to use variables as a part of a system call in C, although I'm not 100% sure how to in C++, that's what I've been using lately. So deal.
Here's the incomplete source for what I have so far. far from finished, so it won't compile, but I wanted to share.
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;
|
Like I said, it's not finished, but it's a start. And it should work on all prism2_usb.o based devices, when it's done.
-J.P. SaidinUnleashed
-------------- They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, cause if you play it forwards, it installs Windows.
Unleash the power of the TILDE~~~
|