Here some manual how to set up wireless usb stick(D-link dwa-110) on Debian Linux box step-by-step.
First you need to get Windows drivers from your drivers CD(you can find this stuff in your modem’s box). Also you need to install ndiswrapper.
Put directory with drivers to /root/Drivers/ and install ndiswrapper:
apt-get install ndiswrapper-common ndiswrapper-utils-1.9 rt73-common
Make ndiswrapper work with your windows driver:
ndiswrapper -i /root/Drivers/WinXP_2K_9X/Dr71WU.inf
in case of previous step was successfully done, generate new configuration for modprobe:
ndiswrapper -m
Try to determine what name has you wireless interface:
ifconfig -a
By default it’s wlan0 , but in my case it’s wlan1. Let’s bring it up:
ifconfig wlan1 up
Add interface configuration to your /etc/network/interfaces. In case you have no dhcpd server inside the network set your settings statically :
auto wlan1
allow-hotplug wlan1
iface wlan1 inet static
address 192.168.0.3
network 192.168.0.0
gateway 192.168.0.1
netmask 255.255.255.0
wireless-essid Homeee
wireless-mode Managed
wireless-key DFFB9E2CC1
Or if you have dynamic server inside:
auto wlan1
iface wlan1 inet dhcp
wireless-essid amber
wireless-mode managed
wireless-key 6170-706C-65
wireless-rate 54M
Restart your computer and enjoy. Or at least run :
/etc/init.d/networking restart
Also below some tips how to make manual configuration:
ifconfig wlan1 192.168.0.1 netmask 255.255.255.0 up
- bring network up with defined ip and net mask.
iwconfig wlan1 essid "name of network"
- to set network name
iwconfig wlan1 mode "new_mode"
- set mode there is 7 modes are present. See man iwconfig to get more details.
iwconfig wlan1 key "key string"
- to set key up
or
iwconfig wlan1 key "s:key_string"
- to WEP ascii key.
iwconfig wlan1 rate 54M
- to set up spesific transfer date speed
iwlist wlan1 scan
- to get all available networks and its parameters.
UPDATE:
You can create little script which will be able restart ot start you wifi connection.
cat > /bin/wifi-restart
#!/bin/bash ifconfig wlan1 down sleep 5 iwconfig wlan1 essid amber iwconfig wlan1 key s:apple iwconfig wlan1 rate 54M ifconfig wlan1 up dhclient3 wlan1
Now set executable bit on it:
chmod +x /bin/wifi-restart
To start or restart wifi, run it:
wifi-restart