Konfiguration des D-Link WLan-USB-Sticks DWL-122
Der DWL-122 hat einen Prism-Chip, der von BH9 schon unterstützt wird.
Für Kanotix ab 2005-4
Einfach /etc/wlan/wlan.cfg ausfüllen:
:code:(config)
...
WLAN_DEVICES="
wlan0?"
...
SSID_
wlan0?="WOLKENREICH"
ENABLE_
wlan0?=y
...
:code:
Und eine neue SSID-spezifische Datei anlegen ...
:code:(shell)
cd /etc/wlan
cp wlancfg-DEFAULT wlancfg-WOLKENREICH
:code:
... und konfigurieren (WEP sollte es mindestens sein):
:code:(config)
...
lnxreq_
hostWEPEncrypt?=true # true|false
lnxreq_
hostWEPDecrypt?=true # true|false
dot11PrivacyInvoked?=true # true|false
...
dot11WEPDefaultKey0?=a2:3e:b4:c5:76:38:48:f9:20:3b:33:33:44 # format: xx:xx:xx:xx:xx ...
:code:
Jetzt nur noch :code:(shell) netcardconfig :code: bemühen, um die IP-Adresse etc. einzustellen.
Für frühere Kanotix-Versionen
Siehe auch Kommentare!
Folgendes Script macht DWL-122 hotplug-fähig:
:code:(shell)
#!/usr/bin/perl
# Einbinden eines D-Link DWL-122 (USB-WLan-Adapter)
use strict;
# Hier Deine Daten einstellen!
my $ip = "192.168.0.100";
my $gateway = "192.168.0.1";
my $ssid = "mynet.lx";
my $
wep128? = "20:11:20:00:20:11:19:00:20:11:20:00:ab";
# Der Rest geht von allein:
print "SSID: $ssid WEP-Schluessel: $
wep128?\nIP: $ip Gateway: $gateway\n";
&
MkFile? ("/etc/hotplug/usb/wlan.usermap",
"wlan 0x0003 0x2001 0x3700 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000\n",
"0600");
&
MkFile? ("/etc/hotplug/usb/wlan",
EOS, 0700);
#!/bin/sh
SSID=$ssid
GATEWAY=$gateway
IPADDR=$ip
WEP128=$
wep128?
ENCODED=1
wlanctl-ng
wlan0? lnxreq_ifstate ifstate=enable
wlanctl-ng
wlan0? lnxreq_autojoin ssid=\$SSID authtype=opensystem
if [ \$ENCODED != 1]; then
#WEP Konfiguration (optional, aber empfohlen)
Default-Key auswhlen
- ng wlan0? dot11req_mibset mibattribute=dot11WEPDefaultKeyID?=0
# Unverschl
- ng wlan0? dot11req_mibset mibattribute=dot11ExcludeUnencrypted?=true
fi
if [ \$ENCODED 1 ] ; then
# WEP anschalten
- ng wlan0? dot11req_mibset mibattribute=dot11PrivacyInvoked?=true
# WEP-Key setzen (hier WEP128 Beispiel)
- ng wlan0? dot11req_mibset mibattribute=dot11WEPDefaultKey0?=\$WEP128
fi
ifconfig wlan0? \$IPADDR
route add default gw \$GATEWAY
EOS
sub MkFile?{
- $name = shift;
- $content = shift;
- $mode = shift;
- (OUT, ">$name") || die "$name: $!";
- OUT $content;
- OUT;
- "$name wurde erstellt\n";
$mode = 0600 unless $mode;
- $mode, $name;
}
:code:
Einfach dieses Script erstellen, anpassen (WEP-Key, IP-Adressen...) und ausführen. Dann DWL-122 einstecken und Konfiguration mit iwconfig kontrollieren.
Dies entstand nach der Anleitung http://www.debianforum.de/forum/viewtopic.php?t=30888&highlight=dwl122∞
Kurze Erklärung:
Das Script erstellt im Verzeichnis /etc/hotplug/usb die Konfigurationsdatei wlan.usermap und das Script wlan. Stellt das Hotplug-System fest, dass ein Gerät eingesteckt wurde, erkennt es an der Vendor-Id und der Produkt-Id, dass die Konfiguration in wlan.usermap zuständig ist. Dort ist der Scriptname wlan eingetragen. Dieses wird dann ausgeführt und konfiguriert den DWL-122
Beitragender: Hamatoma