[Discuss] adventures with suse usb wifi

D. S. news.observer at gmail.com
Fri Jul 20 16:50:08 PDT 2007


I finally got wifi on SUSE 10 to work on my friend's PC, after
considerable effort.

We first tried his D-Link WUA-2340 wireless USB Wifi.  To make a long
story short, SUSE didn't see it or set it up, so I downloaded Win32
drivers for it from the D-Link site, and tried ndiswrapper.
Ndiswrapper loaded, and appeared to load the driver, but the driver
never initialized and no wlan0 wireless interface appeared with
iwconfig. Nothing I could do would convince iwconfig to show a
wireless interface of any type. Running ndiswrapper -l showed the
driver was loaded, lsusb showed the device was there too. After
messing around with this for hours trying to get a wireless interface
to appear with iwconfig I gave up.

My friend then gets a usb wifi that SUSE users have had good success
with (Linksys WUSB54GC), and I try again. I first try to get the SUSE
network manager to see the the usb wifi, but no go. So I try with
ndiswrapper, and this time, I see a wlan0. Yay! After more iwconfig
configuration to set the essid and the wep password, I'm on my router
and surfing.

I adapted a damnsmalllinux script which was in
/usr/local/bin/ndiswrapper.sh on dsl, for my friend's site, and
invoked it from /etc/init.d/boot.local

===========================
#!/bin/bash
#
# Usage example:
#  ndiswrapper.sh net8180.inf wlan0 myessid 1234567890
#
#     net8180.inf - (full path to) the Win32 driver .inf file
#                   (The .sys file should be in the same dir)
#     wlan0       - wireless interface name
#     myessid     - the ESSID (wifi router's name)
#     1234567890  - the WEP key
#
# - place this script, ndiswrapper.sh in /usr/local/bin or /usr/bin, etc.
#
# - copy the .inf and .sys (Win32 driver) files to a directory somewhere on
#   the pc. (and remember the full path to the .inf file.)
#
# - call this script from /etc/rc.d/rc.local or /opt/bootlocal.sh, etc.
#   with the correct parameters for your site
#
# (adapted from /usr/local/bin/ndiswrapper.sh on damnsmalllinux)
#
/usr/sbin/ndiswrapper -e rt73 # TODO this shouldn't be hard-coded
/usr/sbin/ndiswrapper -i "$1"
sleep 5
/sbin/modprobe ndiswrapper
/usr/sbin/ndiswrapper -l
/usr/sbin/iwconfig
sleep 5
# iwconfig should show a wireless (wlan0) interface now.
# configure it for this site:
/usr/sbin/iwconfig "$2" channel 6  # ?
sleep 5
/usr/sbin/iwconfig "$2" essid "$3"
sleep 5
if [ -n "$4" ]; then
   /usr/sbin/iwconfig "$2" enc "$4"
   sleep 5
fi
#
# damnsmalllinux:
#  pump -i "$2"
# suse:
killall dhcpcd
rm -f /var/run/dhcpcd-wlan0.pid
sleep 5
/sbin/dhcpcd -HD "$2"

===========================


More information about the Discuss mailing list