Re: Newbie questions

Vikram KAUL <[email protected]> Mon, 7 Nov 2005 18:33:48 -0500 (Eastern Standard Time)
Newsgroups gmane.linux.linux-wlan.user
Message-ID <[email protected]>
Hi Peter, others

 Thanks for the log outputs. That gave me the pointer to look carefully 
into the /var/log/messages for cardmgr. I saw that the commands are not 
executing properly for some reason. The "wlan-ng" which is in /etc/pcmcia 
is probably the source of the problem. Nothing after that works.
For an orinoco card, it works fine, of course.

Then, I did the following

cd /etc/pcmcia
./wlan-ng start wlan0

Voila !! 
It works like a charm.

Not sure why the problem is occuring. I need to investigate further. In 
the meanwhile, if you or anyone has any pointers, that would be welcome

Thanks
Vikram

See the cut-n-paste below for the problem, and then the post-fix 

Problem:
------
[root@ar12-73 wlan]# cat /var/log/messages | grep cardmgr
Nov  7 18:09:52 ar12-73 cardmgr[1719]: socket 1: Linksys WCF12 11Mbps 
802.11b WLAN Card (Prism 3)
Nov  7 18:09:53 ar12-73 cardmgr[1719]: executing: './wlan-ng start wlan0 
2>&1'
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + cat: /proc/sys/kernel/hotplug: 
Permission denied
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + /etc/wlan/shared: line 73: [: too 
many arguments
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + grep: 
/proc/net/p80211/wlan0/wlandev: Permission denied
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + /etc/wlan/shared: line 133: 
_fwload: command not found
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + Firmware failed to load for 
device wlan0
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + wlanctl-ng: Permission denied
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + FAILED: /sbin/wlanctl-ng wlan0 
dot11req_start ssid=XXAAXX bsstype=independent beaconperiod=100 
dtimperiod=3 cfpollable=false cfpollreq=false cfpperiod=3 
cfpmaxduration=100 probedelay=100 dschannel=6 basicrate1=2 basicrate2=4 
operationalrate1=2 operationa
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + rate2=4 operationalrate3=11 
operationalrate4=22
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + cp: cannot create regular file 
`/tmp/wlan_scheme_18:09:53.tmp': Permission denied
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + ls: /tmp/wlan_scheme*.tmp: No 
such file or directory
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + cat: -: Bad file descriptor
Nov  7 18:09:53 ar12-73 cardmgr[1719]: + cat: closing standard input: Bad 
file descriptor



After the fix:
--------------



[root@ar12-73 wlan]# cd /etc/pcmcia/
[root@ar12-73 pcmcia]# ./wlan-ng start wlan0
message=lnxreq_ifstate
  ifstate=fwload
  resultcode=success
Reading S-record file /etc/wlan//prism2_ak.hex...
NIC ID: 0x801b v1.0.0
MFI ID: 0x1 v1 1->1
CFI ID: 0x2 v2 1->1
PRI ID: 0x3 v1 4->4
Version:  ID 0x15 1.1.4
Compat: Role 0 Id 0x3 v4 4->5
Compat: Role 0x1 Id 0x2 v2 1->1
Seq: 0
Platform:  ID 0x800c 1.0.0
Platform:  ID 0x8013 1.0.0
Platform:  ID 0x8017 1.0.0
Platform:  ID 0x801b 1.0.0
Platform:  ID 0x8022 1.0.0
prism2dl: warning: Failed to find PDR for plugrec 0x0005.
prism2dl: warning: Failed to find PDR for plugrec 0x0402.
prism2dl: warning: Failed to find PDR for plugrec 0x0403.
prism2dl: warning: Failed to find PDR for plugrec 0x0404.
prism2dl: warning: Failed to find PDR for plugrec 0x0408.
Reading S-record file /etc/wlan//prism2_rf.hex...
NIC ID: 0x801b v1.0.0
MFI ID: 0x1 v1 1->1
CFI ID: 0x2 v2 1->1
PRI ID: 0x3 v1 4->4
Seq: 0
Version:  ID 0x1f 1.8.4
Compat: Role 0 Id 0x4 v4 1->15
Compat: Role 0x1 Id 0x1 v1 1->1
Compat: Role 0x1 Id 0x2 v2 1->1
name inforec len 7
Platform:  ID 0x800a 1.0.0
Platform:  ID 0x800b 1.0.0
Platform:  ID 0x800c 1.0.0
Platform:  ID 0x800d 1.0.0
Platform:  ID 0x8012 1.0.0
Platform:  ID 0x8013 1.0.0
Platform:  ID 0x8014 1.0.0
Platform:  ID 0x8016 1.0.0
Platform:  ID 0x8017 1.0.0
Platform:  ID 0x8018 1.0.0
Platform:  ID 0x801a 1.0.0
Platform:  ID 0x801b 1.0.0
Platform:  ID 0x801c 1.0.0
Platform:  ID 0x8021 1.0.0
Platform:  ID 0x8022 1.0.0
Platform:  ID 0x8023 1.0.0
Platform:  ID 0x800a 1.0.0
Platform:  ID 0x800e 1.0.0
Platform:  ID 0x8015 1.0.0
Platform:  ID 0x8019 1.0.0
Platform:  ID 0x801d 1.0.0
Platform:  ID 0x8024 1.0.0
prism2dl: warning: Failed to find PDR for plugrec 0x0412.
prism2dl: warning: Failed to find PDR for plugrec 0x0414.
prism2dl: warning: Failed to find PDR for plugrec 0x0406.
prism2dl: warning: Failed to find PDR for plugrec 0x0302.
prism2dl: finished.
message=lnxreq_ifstate
  ifstate=disable
  resultcode=success
IBSS mode started.



On Mon, 7 Nov 2005, Peter Ison wrote:

pison>Date: Mon, 7 Nov 2005 21:13:10 -0000
pison>From: Peter Ison <[email protected]>
pison>To: Vikram KAUL <[email protected]>
pison>Subject: Re: [lwlan-user] Newbie questions
pison>
pison>This is what I see for the MA111 usb:
pison>
pison>Nov 7 20:18:36 myntech kernel: ident: nic h/w: id=0x8026 1.0.0
pison>Nov 7 20:18:36 myntech kernel: ident: pri f/w: id=0x15 1.1.3
pison>Nov 7 20:18:36 myntech kernel: ident: sta f/w: id=0x1f 1.8.3
pison>
pison>According to the driver file shared.prism2 your device 0x801b maps to "SST Parallel Flash".
pison>
pison>A firmware load is embedded in the wlan-ng driver and is usually performed at boot and possibly at other times by hotplug using prism2_fwload located in prism2/shared.prism2. That routine determines which firmware files (/etc/wlan/*.hex) to load for any particular device.
pison>
pison>The instruction to load the firmware is in the file /etc/wlan/shared, and is in the line "if ! ${nsdname}_fwload $1 ; then" which appears in the extract I quoted. ( {nsdname}_fwload maps to prism2_fwload ).
pison>
pison>wlan_enable() is called conditionally from /etc/pcmcia/wlan-ng.
pison>
pison>An instruction such as "service wlan restart" runs the script /etc/init.d/wlan which calls wlan_bring_it_up which calls wlan_enable() which causes the selected firmware modules to be loaded. Sometimes, after error conditions while testing, that script stops working but a reboot clears the problem.
pison>
pison>If the firmware fails to load I get a message to that effect in the log, and if all goes well I see this:
pison> 
pison>Nov 7 20:18:35 myntech kernel: usbcore: registered new driver prism2_usb
pison>Nov 7 20:18:35 myntech wland[3624]: wland daemon init successful
pison>Nov 7 20:18:35 myntech wland[3624]: netlink socket opened and bound successfully
pison>Nov 7 20:18:35 myntech kernel: PDA Read from 0x007f0000 in EXTDS space.
pison>Nov 7 20:18:35 myntech kernel: PDA Read from 0x007f0000 in EXTDS space.
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7e2ffe
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7e3ffe
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7e4ffe
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7e5ffe
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7e6ffe
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7e7ffe
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7e8ffe
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7e9ffe
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7eaffe
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7ebffe
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7ecffe
pison>Nov 7 20:18:35 myntech kernel: Writing 4096 bytes to ram @0x7edffe
pison>Nov 7 20:18:35 myntech kernel: Writing 3010 bytes to ram @0x7eeffe
pison>Nov 7 20:18:35 myntech kernel: Writing 416 bytes to ram @0x7efc20
pison>Nov 7 20:18:35 myntech kernel: Writing 16 bytes to ram @0x7efdd0
pison>Nov 7 20:18:35 myntech kernel: Writing 4044 bytes to ram @0x7f0800
pison>Nov 7 20:18:36 myntech kernel: Writing 3288 bytes to ram @0x7fe000
pison>Nov 7 20:18:36 myntech kernel: ident: nic h/w: id=0x8026 1.0.0
pison>Nov 7 20:18:36 myntech kernel: ident: pri f/w: id=0x15 1.1.3
pison>Nov 7 20:18:36 myntech kernel: ident: sta f/w: id=0x1f 1.8.3
pison>Nov 7 20:18:36 myntech kernel: MFI:SUP:role=0x00:id=0x01:var=0x01:b/t=1/1
pison>Nov 7 20:18:36 myntech kernel: CFI:SUP:role=0x00:id=0x02:var=0x02:b/t=1/1
pison>Nov 7 20:18:36 myntech kernel: PRI:SUP:role=0x00:id=0x03:var=0x01:b/t=1/4
pison>Nov 7 20:18:36 myntech kernel: STA:SUP:role=0x00:id=0x04:var=0x01:b/t=1/15
pison>Nov 7 20:18:36 myntech kernel: PRI-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1
pison>Nov 7 20:18:36 myntech kernel: STA-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1
pison>Nov 7 20:18:36 myntech kernel: STA-MFI:ACT:role=0x01:id=0x01:var=0x01:b/t=1/1
pison>Nov 7 20:18:36 myntech kernel: Prism2 card SN: \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
pison>Nov 7 20:18:36 myntech kernel: linkstatus=DISCONNECTED (unhandled)
pison>Nov 7 20:18:42 myntech wlan.agent[3620]: WLAN wlan0 brought up successfully.
pison>Nov 7 20:18:42 myntech wlan.agent[3620]: WLAN bringing up layer 3+ with /sbin/ifup
pison>Nov 7 20:18:44 myntech kernel: linkstatus=CONNECTED
pison>
pison>Regards,
pison>
pison>Peter
pison>
pison>----- Original Message ----- 
pison>From: "Vikram KAUL" <[email protected]>
pison>To: "Peter Ison" <[email protected]>
pison>Cc: <[email protected]>
pison>Sent: Monday, November 07, 2005 4:49 PM
pison>Subject: Re: [lwlan-user] Newbie questions
pison>
pison>
pison>> 
pison>> Peter
pison>> 
pison>> pison>I am using a Netgear MA111 usb device with driver .0.2.2 and Fedora Core 4.
pison>> pison>Although you have a different device, you are getting exactly the same result as I did before I found a patch to /etc/wlan/shared which resolved the problem.
pison>> 
pison>> What version if pri f/w and sta f/w are you using now ? 
pison>> 
pison>> pison>
pison>> pison>David suggested it might be a problem with downloading the firmware. In my situation, after the download of the firware, the device did not then switch out of the firmware download mode.
pison>> 
pison>> What process did you use for the firmware download ? XP based, or prism2dl ?
pison>> 
pison>> I added the line you suggested, but it didn't help. When and how does this 
pison>> primitive (wlan_ebable) get executed ? At boot time only ? Can I not call 
pison>> it as a script after bootup ?
pison>> 
pison>> regards..
pison>> Vikram
pison>> 
pison>> pison>Therefore, it might be worth adding one line to the file:
pison>> pison>
pison>> pison>In /etc/wlan/shared: 
pison>> pison>        wlan_enable()
pison>> pison>        .......
pison>> pison>        nsdname=`wlan_nsdname $1`
pison>> pison>        if ! ${nsdname}_fwload $1 ; then
pison>> pison>                ${ECHO} "Firmware failed to load for device $1"
pison>> pison>                return 1
pison>> pison>        fi
pison>> pison>        # Enable the interface
pison>> pison>        # ADD THE FOLLOWING LINE
pison>> pison>        $WLANCTL $1 lnxreq_ifstate ifstate=disable
pison>> pison>        result=`$WLANCTL $1 lnxreq_ifstate ifstate=enable`
pison>> pison> 
pison>> pison>Then reboot and see what happens.
pison>>