So Sep 12 23:17:22 CEST 2004

smc 2602w v3

Ever tried to get a SMC 2602Wv3 wireless card run under linux and finally gave up on it ? Seems to be a common problem. After some experimentation I got mine to work.

Quick description:
The card has an Am1771 chipset for which drivers exist at My system happened to be a fresh installed Debian unstable with a custom 2.4.27 kernel. I tried the same card with the same drivers under different conditions ( Debian stable, Knoppix 3.4(?) ) and had no luck, the system froze when I inserted the module. On the other hand, as mentioned, Debian unstable worked fine.

Quick install guide:

	aptitude install libreadline4-dev bison flex
tar xjvf Am1771.tar.bz2 cd Am1771/Linux bash source x86_setup.script make set_platf_x86 set_pci_on set_release make # the make did not encounter any errors (using gcc 3.3.4) mknod /dev/nautilus c 254 0 logout cd .. cd obj/x86/2.4.27 insmod ./Nautilus.o
After successfully executing the code above you should be able to use the Httpserver to scan for a net. DHCP did not work in my case, but I can live with that. While struggling with the card I encountered a bug or at least some strange behaviour in the drivers: Before joining a net you have to perform a search for it, otherwise the join command will result in an invalid_parameters(!) error.

Once this whole mess is set up successfully you might want to automate the procedure. I wrote a small init.d-script which loads the module, runs an expect-skript which uses Nshell to configure the card and join the net and finally sets an ip and a default route. The script to join the net is as follows:


	set timeout 10

	spawn /usr/local/src/Am1771/Linux/Applications/obj/x86/2.4.27/Nshell
	expect {
	timeout {set ERROR 1
	exit $ERROR}
	"SUCCESS" {send "\r"}}
	expect "nsh> " {send "MLME MLME_RESET.request(00:04:E2:9B:87:37, TRUE)\r"}

	expect "SUCCESS" {send "MLME MLME_SET.request(dot11FragmentationThreshold,2346)\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11RTSThreshold,2347)\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11ShortPreambleOptionImplemented, FALSE)\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11PrivacyInvoked,TRUE)\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11WEPDefaultKeyID, 0)\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11WEPDefaultKeyIndex,1)\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11WEPDefaultKeyValue,FF:EE:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF)\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11WEPDefaultKeyIndex,2)\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11WEPDefaultKeyValue,\"\")\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11WEPDefaultKeyIndex,3)\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11WEPDefaultKeyValue,\"\")\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11WEPDefaultKeyIndex,4)\r"}
	expect "SUCCESS" {send "MLME MLME_SET.request(dot11WEPDefaultKeyValue,\"\")\r"}
	expect "SUCCESS" {send "MLME MLME_SCAN.request(ANY_BSS, FF:FF:FF:FF:FF:FF, \"\", ACTIVE, 10, \[11\], 1000, 3000)\r"}
	expect "SUCCESS" {send "MLME MLME_JOIN.request((00:30:F1:B6:31:14, \"WLAN\", INFRASTRUCTURE, 100, 1, 0x0000000000000000, 0x000
	0000000000000, (11), (0,0,0,0), (0), 0x0011, \[2,4,11,22\]), 10, 10, \[2,4,11,22\])\r"}
	expect "SUCCESS" {send "MLME MLME_AUTHENTICATE.request(00:30:F1:B6:31:14, OPEN_SYSTEM, 1000)\r"}
	expect "SUCCESS" {send "MLME MLME_ASSOCIATE.request(00:30:F1:B6:31:14, 1000, 0x0011, 1)\r"}
	expect "SUCCESS" {send "MLME MLME_POWERMGT.request(ACTIVE, FALSE, TRUE)\r"}
	expect "SUCCESS" {send "quit\r"}
This script will join a WEP-encrypted net on channel 11 with essid WLAN. Note that you will have to change the first row to your own mac adress and the last few adresses (00:30..) to your access-point's adress. Also put in the right key (FF:EE:..)

In case you need more info: Linuxquestions:smc2602w.

Posted by iso | Permanent Link | Tags: nerd stuff, linux | comments >>