Monday, July 02, 2007

Installing usb wireless card on Debian Lenny

1/ CNet CWD-854 Dongle, P/N: 18-1HGWD85CH.
- Install the packages kernel-headers, wireless-tools.
- Go to http://rt2x00.serialmonkey.com/wiki/index.php/Downloads and download the file rt73-cvs-daily.tar.gz.
- May need to blacklist the RT73 driver available to the distro (?):
echo "blacklist rt73usb" >> /etc/modprobe.d/blacklist
- Extract rt73-cvs-daily.tar.gz, go to its Module/ directory, run make and make install.
- Run vi /etc/modules and at the end of the file, add rt73 in a new line.
- ls /etc/modprobe.d/ | grep rt73 to check if rt73 file exists, if not, touch rt73 and echo "alias rausb0 rt73" >> /etc/modprobe.d/rt73
- rm /etc/modprobe.conf as it is not necessary.
- run iwconfig to check the recognized name of the device.
- create a script called wlanz, for example:

#!/bin/sh
ifconfig wlan0 down
ifconfig wlan0 up
iwconfig wlan0 mode Managed
iwconfig wlan0 key XXXX-XXXX-XX
iwconfig wlan0 essid "My ESSID"
dhclient wlan0

chmod +x; then run it.
See Module/iwpriv_usage.txt in the driver package for information on other types of encryption and settings.
The above settings can be put in /etc/network/interfaces (restart the interfaces: /etc/init.d/networking restart):

auto wlan0
iface wlan0 inet dhcp
ifconfig wlan0 down
ifconfig wlan0 up
iwconfig wlan0 mode Managed
iwconfig wlan0 key XXXX-XXXX-XX
iwconfig wlan0 essid "My ESSID"

To list available networks: iwlist wlan0 scanning.

2/ Linksys WUSB54G:
- similar to the above
- using rt2570 chipset
- the interface named rausb0

Note: D-Link DWL-G122: rev B - chipset rt2570; rev C - chipset rt73.

Ref:
- http://ralink.rapla.net/ Ralink chipsets based wireless devices
- http://rt2x00.serialmonkey.com/wiki/index.php/Hardware
- http://ndiswrapper.sourceforge.net/joomla/index.php?/component/option,com_openwiki/Itemid,33/id,list_c-f/

Sunday, August 07, 2005

Directory index

Some (free) webservers do not allow to list files in directories. This script can help (thanks to http://www.plebian.com/news.php?artc=8):

<?php
unset($dir);
if(!empty($HTTP_GET_VARS['dir'])&&!strpos($HTTP_GET_VARS['dir'],'..')&&!strpos($HTTP_GET_VARS['dir'],'\.\.'))
{

$dir=$HTTP_SERVER_VARS['DOCUMENT_ROOT'].'/'.$HTTP_GET_VARS['dir'];
$d=&$HTTP_GET_VARS['dir'];
}
else
{
$dir='.';
$d='.';
}
clearstatcache();
if($a=@opendir($dir))
{
$dir=htmlspecialchars($dir);
$d=htmlspecialchars($d);
while(false!==($b=readdir($a)))
{
if(ereg("^\.",$b))
continue; // ignore hidden files
if ($b=='index.php') continue; //ignore index.php
echo (is_dir($b))?"
  • $b":"
  • $b";
    }
    closedir($a);
    }
    else
    {
    echo 'unable to open directory';
    }
    ?>
  • Sunday, July 31, 2005

    aMSN tip

    Since aMSN 0.95b (11/07/2005 in my case), it says that TkCximage is needed to run aMSN and it can be compiled with the makefile inside amsn folder. To compile it, tcl-dev and tk-dev are needed. Compiling is done as usual: ./configure and make.

    In this version, compilation happens in 3 places: utils/TkCximage/, utils/webcamsn/ and utils/linux/capture/ with creation of utils/TkCximage/TkCximage.so, utils/webcamsn/webcamsn.so, utils/linux/capture/capture.so, utils/linux/capture/libng/plugins/drv0-v4l2.so, and utils/linux/capture/libng/plugins/drv1-v4l.so. Then files .c, .h, .o can be deleted to save spaces in these directories.

    Disable logo: rename skins/default/pixmaps/logolinmsn.png (or comment the line ::skin::setPixmap logolinmsn logolinmsn.gif in gui.tcl, but there will be a blank line insteads).

    First post

    This post marks the registration date for this blog.