16 décembre 2005

Adaptateur Wifi D-Link USB DWL-122 ss linux PPC

This is what got a DWL-122 (D-Link 802.11b USB stick) working on my PowerBook 12":
I installed linux-wlan-ng from universe repository, modified /etc/wlan/wlan.conf and copied /etc/wlan/wlancfg-DEFAULT to /etc/wlan/wlancfg-"your_ssid_here" and edited that accordingly.

I then created the following script to run whenever I need it (DHCP-no WEP configuration):


#!/bin/sh

sudo modprobe prism2_usb
sudo rmmod prism2_usb
sudo modprobe prism2_usb prism2_doreset=1
sudo wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
sudo wlanctl-ng wlan0 lnxreq_autojoin ssid="your_ssid_here" authtype=opensystem
sudo dhclient wlan0


Somepeople report that they had to execute the "sudo wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable" line twice to get the interface up.

For an static IP config with WEP (hexadecimal key), here is the script:

#! /bin/sh
#
# Wireless USB setup
#

# Step 1 - enable wireless USB for wlan0
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable

# Step 2 - set SSID for your network
wlanctl-ng wlan0 lnxreq_autojoin ssid=stayoutofmynet authtype=opensystem

# Step 3 - set WEP attributes
wlanctl-ng wlan0 lnxreq_hostwep encrypt=true decrypt=true
wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11PrivacyInvoked=true

# Step 4 - set WEP key
wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11WEPDefaultKeyID=0
wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11WEPDefaultKey0=12:34:56:78:9A

# Step 5 - set IP configuration
ifconfig wlan0 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
route add default gw 192.168.1.11
So you can easily mix the two scripts for e.g. DHCP-WEP configuration support.

Enjoy wireless on PPC Linux!

Aucun commentaire: