Help! for set AP mode

jiabao bao <[email protected]>
Newsgroups gmane.linux.linux-wlan.devel,gmane.linux.linux-wlan.user
Message-ID <[email protected]>
Dear All,

This problem has nearly make me be carzy! I need to find a way to set my 
Linksys WPC11 card as an AP. Now I use RedHat Fedora Core 4 linux and 
linux-wlan-ng-0.2.1pre26 driver. I have sent some mails before and Pavel had 
given me some hints to use wlanctl-ng commands to set AP mode. But when I 
tried on it, the thing was not smooth. So I'd like show what I have down 
here and hope someone can help me to solve this problem.

@@@@@@
1. I modified some configuration files. 
They are ifcfg-wlan0 in /etc/sysconfig/networking( both in /devices and 
/profiles ) and /etc/sysconfig/network-scripts . Now they are:
- - - - - - - - - 
IPV6INIT=no
ONBOOT=yes
USERCTL=yes
PEERDNS=yes
GATEWAY=
TYPE=Wireless
DEVICE=wlan0
HWADDR=00:03:2f:00:2c:b5
BOOTPROTO=
NETMASK=255.255.0.0 <http://255.255.0.0>
DHCP_HOSTNAME=
IPADDR=169.254.8.88 <http://169.254.8.88>
DOMAIN=
ESSID=aptry
CHANNEL=6
MODE=Master
RATE='2 Mb/s'
- - - - - - - - - 
I changed the MODE from Auto to Master above. 



Next, is /etc/wlan/wlancfg-DEFAULT file, now the contents in it are:
- - - - - - - - - 
#=======USER MIB SETTINGS=============================
# You can add the assignments for various MIB items
# ...
# the way you want them.
USER_MIBS="p2CnfRoamingMode=1 p2CnfShortPreamble=mixed"

#=======WEP===========================================
# [Dis/En]able WEP. Settings only matter if PrivacyInvoked is true
lnxreq_hostWEPEncrypt=false # true|false
lnxreq_hostWEPDecrypt=false # true|false
dot11PrivacyInvoked=false # true|false
dot11WEPDefaultKeyID=0 # 0|1|2|3
dot11ExcludeUnencrypted=false # true|false, in AP this means WEP is 
required.

# If PRIV_GENSTR is not empty, use PRIV_GENTSTR to generate 
# keys (just a convenience)
# add-ons/ in the tarball contains other key generators.
PRIV_GENERATOR=/sbin/nwepgen # nwepgen, Neesus compatible
PRIV_KEY128=false # keylength to generate
PRIV_GENSTR=""

# or set them explicitly. Set genstr or keys, not both.
dot11WEPDefaultKey0= # format: xx:xx:xx:xx:xx or
dot11WEPDefaultKey1= # xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
dot11WEPDefaultKey2= # e.g. 01:20:03:40:05 or
dot11WEPDefaultKey3= # 01:02:03:04:05:06:07:08:09:0a:0b:0c:0d
#=======SELECT STATION MODE===================
IS_ADHOC=n # y|n, y - adhoc, n - infrastructure

#======= INFRASTRUCTURE STATION ===================
# What kind of authentication?
AuthType="opensystem" # opensystem | sharedkey (requires WEP)

#======= ADHOC STATION ============================
BCNINT=100 # Beacon interval (in Kus)
CHANNEL=6 # DS channel for BSS (1-14, depends 
# on regulatory domain)
BASICRATES="2 4" # Rates for mgmt&ctl frames (in 500Kb/s)
OPRATES="2 4 11 22" # Supported rates in BSS (in 500Kb/s)
- - - - - - - - -
I let USER_MIBS="p2CnfRoamingMode=1 p2CnfShortPreamble=mixed" come to be 
alive and set dot11ExcludeUnencrypted=false. Next is IS_ADHOC=n. But I'm not 
sure if IS_ADHOC will obstruct me. I know too little about how to use these 
files and parameters.



Then, I modified /et/pcmcia/wireless.opts file. I know this file is very 
important to set the card information. Now the file appears like:
- - - - - - - 
*,*,*,00:03:2f:*)
INFO="LinksysAPTry"
ESSID="aptry"
NWID="100"
MODE="Master"
RATE="auto"
KEY="off"
;;
- - - - - - -
I have disabled all the other lines include those examples. In fact I 
studied those examples and wrote my lines above. But I do not know if they 
are enough for setting AP mode.


@@@@@@
2. I confirmed is the tertiary firmware working normally.
I used T10003c7.hex as my tertiary firmware. After I got it, I put it into 
/linux-wlan-ng-0.2.1-pre26/src/prism2. Then I built the driver. Of course 
these works happened before I modified those files. 
Now I can try prism2dl command: 
- - - - - - 
[root@BobLinuxStation ~]# prism2dl -s wlan0
load_cardpda failed, exiting.
- - - - - - 
Failed!


Then I check my driver's state.
- - - - - -
[root@BobLinuxStation ~]# wlanctl-ng wlan0 lnxreq_ifstate ifstate
ifstate="argument_item_data_is_missing"
message=lnxreq_ifstate
ifstate=argument_item_data_is_missing
resultcode=no_value
- - - - - -
Mmm...What's mean of this? argument_item_data_is_missing? Can anybody tell 
me what's this message's mean? Do I have missed anything?

But I will go on with my experiment. I remembered someone wrote his 
experience online for loading his firmware. He mentioned it is necessary to 
adjust state to fwload. So I use the following commands:
- - - - - - 
[root@BobLinuxStation ~]# wlanctl-ng wlan0 lnxreq_ifstate ifstate=disable
message=lnxreq_ifstate
ifstate=disable
resultcode=success
[root@BobLinuxStation ~]# wlanctl-ng wlan0 lnxreq_ifstate ifstate=fwload
message=lnxreq_ifstate
ifstate=fwload
resultcode=success
- - - - - -
But, I check the state at once, the answer is still 
ifstate="argument_item_data_is_missing"!!! why?

But, now I can use prism2dl command. :) a little happy.
- - - - - - 
[root@BobLinuxStation ~]# prism2dl -s wlan0
Current PDA:
offset len code data
---------------------------------------------------
00000000 006 0x0001 5748 3342 3631 4233 2034
00000014 006 0x0006 0000 0001 0001 0001 0001
00000028 006 0x0007 0000 0002 0001 0001 0001
00000042 005 0x0008 8002 0000 0001 0000
00000054 004 0x0101 0300 002f b52c
00000064 007 0x0103 0002 0010 0000 0000 0000 0000
00000080 002 0x0104 07ff
00000086 002 0x0105 0003
00000092 002 0x0107 0001
00000098 051 0x0202 169b 0200 0448 0648 0880 0a03 0c04 0e04
1000 12a4 14b8 161b 1800 1a00 1c00 1e5c
2082 2220 24c4 2617 280a 2a0e 2c00 2e00
302d 3220 3490 3618 3876 3a0a 3c24 3ed8
4000 4200 4400 460c 4826 4a5b 4c7f 4e29
500f 5220 5420 5610 5810 5a10 5c10 5e1e
601e 6298
00000202 065 0x0203 2c00 2e0c 2c01 2e10 2c02 2e14 2c03 2e18
2c04 2e1c 2c05 2e20 2c06 2e24 2c07 2e28
2c08 2e2e 2c09 2e34 2c0a 2e38 2c0b 2e3c
2c0c 2e3f 2c0d 2e43 2c0e 2e46 2c0f 2e48
2c10 2e4b 2c11 2e50 2c12 2e55 2c13 2e5a
2c14 2e63 2c15 2e6d 2c16 2e76 2c17 2e7f
2c18 2e7f 2c19 2e7f 2c1a 2e7f 2c1b 2e7f
2c1c 2e7f 2c1d 2e7f 2c1e 2e7f 2c1f 2e7f
00000334 015 0x0300 0088 008c 008c 008e 0093 009b 00a0 00a6
00af 00b4 00b8 00c0 00c3 00cf
00000366 018 0x0301 00d8 00d4 00d4 00d4 00d4 00d3 00d3 00d3
00d1 00d1 00d1 00cf 00cf 00cf 00b7 009f
006f
00000404 031 0x0900 0088 008c 008c 008e 0093 009b 00a0 00a6
00af 00b4 00b8 00c0 00c3 00cf 0088 00c3
0088 008c 008c 008e 0093 009b 00a0 00a6
00af 00b4 00b8 00c0 00c3 00cf
00000468 034 0x0901 00d8 00d4 00d4 00d4 00d4 00d3 00d3 00d3
00d1 00d1 00d1 00cf 00cf 00cf 00d8 00cf
00d8 00d4 00d4 00d4 00d4 00d3 00d3 00d3
00d1 00d1 00d1 00cf 00cf 00cf 00b7 009f
006f
00000538 002 0x0000 f846
- - - - - - 
Here I still have a question: I have read Rose's PrismII Access Mini-Howto 
and he mentioned need output PDA file and write a command in wlan-ng file 
"=====DOWNLOAD=====". The command is /sbin/prism2dl -p 
/private/wireless/leartery.pda -r /private/wireless/t10003c7.hex wlan0 . But 
now in 0.2.1pre26, there is no DOWNLOAD section in wlan-ng file. :( I'm 
wondering is this command still necessary in this higher version driver? 
However, I haven't run this command in my console.


@@@@@@
3. I used dot11req_start commands to try.
Pavel told me can use commands to set AP mode for 0.2.1pre26. He said I need 
to run dot11req_start commands to set. 
I read wlanctl-ng commands. Oh, there are so many items there. I want to 
make clear if it is enough to run dot11req_start only! But if let me to run 
other items, I do not know how to use them appropriate yet. :( I haven't 
found handbook or tutorial for those commands. Can anybody give me some 
useful references?
I just tried:
- - - - - - 
[root@BobLinuxStation ~]# wlanctl-ng wlan0 dot11req_start ssid=aptry 
bsstype=any beaconperiod=128 dtimperiod=128\
> cfpperiod=128 cfpmaxduration=64 dschannel=6 probedelay=8 cfpollable=true 
cfpollreq=true\
> basicrate1=2 basicrate2=11 operationalrate1=2 operationalrate2=11
message=dot11req_start
ssid='aptry'
bsstype=any
beaconperiod=128
dtimperiod=128
cfpperiod=128
cfpmaxduration=64
fhdwelltime=no_value
fhhopset=no_value
fhhoppattern=no_value
dschannel=6
ibssatimwindow=no_value
probedelay=8
cfpollable=true
cfpollreq=true
basicrate1=2
basicrate2=11
basicrate3=no_value
basicrate4=no_value
basicrate5=no_value
basicrate6=no_value
basicrate7=no_value
basicrate8=no_value
operationalrate1=2
operationalrate2=11
operationalrate3=no_value
operationalrate4=no_value
operationalrate5=no_value
operationalrate6=no_value
operationalrate7=no_value
operationalrate8=no_value
resultcode=success
- - - - - - 
It looks good, but I found after these works, the AP has not appear. :( 

I checked by using iwconfig and iwlist scan:
- - - - - -
[root@BobLinuxStation ~]# iwconfig wlan0
wlan0 IEEE 802.11-DS ESSID:"aptry" Nickname:"aptry"
Mode:Auto Frequency:2.437 GHz Access Point: 00:00:00:00:00:00
Bit Rate:1 Mb/s Tx-Power:2346 dBm
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:off

[root@BobLinuxStation ~]# iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 - Address: 02:20:D9:88:9A:BA
ESSID:"linksys"
Mode:Ad-Hoc
Encryption key:off
Channel:6
Quality:13/92 Signal level:-87 dBm Noise level:-100 dBm
Cell 02 - Address: 00:00:00:00:00:00
Mode:Ad-Hoc
Encryption key:off
Channel:0
Quality:0 Signal level:0 Noise level:0
- - - - - -
The "Linksys" one is my other wireless card ( Linksys WMP11 ) on windows PC 
beside me. I saw on the windows machine's screen, there are still "Ad-Hoc" 
mode for my "aptry". 
OMG! Why? Why not "Master" or "AP"?

I checked the prism2dl :
- - - - - - 
[root@BobLinuxStation ~]# prism2dl -n wlan0
prism2dl: finished.
[root@BobLinuxStation ~]# prism2dl -v wlan0
prism2dl: finished.
[root@BobLinuxStation ~]# prism2dl -d wlan0
prism2dl: finished.
- - - - - - 
No more useful information for me....

At last, I copied those PDA contents into a pda file I created, mytry.pda. 
Then I used Rose's method to verify the PDA file:
- - - - - - 
[root@BobLinuxStation ~]# prism2dl -v -p mytry.pda wlan0
Processing PDR file: mytry.pda
Adding PDR: code=0001, len=6
Adding PDR: code=0006, len=6
Adding PDR: code=0007, len=6
Adding PDR: code=0008, len=5
Adding PDR: code=0101, len=4
Adding PDR: code=0103, len=7
Adding PDR: code=0104, len=2
Adding PDR: code=0105, len=2
Adding PDR: code=0107, len=2
Adding PDR: code=0202, len=51
Adding PDR: code=0203, len=65
Adding PDR: code=0300, len=15
Adding PDR: code=0301, len=18
Adding PDR: code=0900, len=31
Adding PDR: code=0901, len=34
Replacing PDR: code=0000, len=2
prism2dl: error, you must specifify a pda location
- - - - - -
SHOCKED! ... Now I really do not know how to go on... :( help me please!


@@@@@@
4. Oh, yes, I forgot to show messages in /var/log. 
When I plug the card in, the messages are shown as :
- - - - - -
Sep 6 14:43:32 localhost kernel: cs: memory probe 0xa0000000-0xa0ffffff: 
clean.
Sep 6 14:43:32 localhost cardmgr[3042]: socket 0: I-Gate 11M PC Card
Sep 6 14:43:32 localhost kernel: prism2_cs: index 0x01: Vcc 5.0, irq 3, io 
0x0100-0x013f
Sep 6 14:43:32 localhost wlan.agent[3108]: WLAN Hotplug bypassed for pcmcia
Sep 6 14:43:33 localhost cardmgr[3042]: executing: './wlan-ng start wlan0 
2>&1'
Sep 6 14:43:33 localhost cardmgr[3042]: + message=lnxreq_ifstate
Sep 6 14:43:33 localhost cardmgr[3042]: + ifstate=fwload
Sep 6 14:43:33 localhost cardmgr[3042]: + resultcode=success
Sep 6 14:43:33 localhost kernel: PDA Read from 0x00390000 in NV space.
Sep 6 14:43:33 localhost kernel: PDA Read from 0x00390000 in NV space.
Sep 6 14:43:33 localhost cardmgr[3042]: + prism2dl: warning: Failed to find 
PDR for plugrec 0x0204.
Sep 6 14:43:33 localhost cardmgr[3042]: + prism2dl: warning: Failed to find 
PDR for plugrec 0x0405.
Sep 6 14:43:33 localhost cardmgr[3042]: + prism2dl: warning: Failed to find 
PDR for plugrec 0x0406.
Sep 6 14:43:33 localhost cardmgr[3042]: + prism2dl: warning: Failed to find 
PDR for plugrec 0x0302.
Sep 6 14:43:33 localhost cardmgr[3042]: + prism2dl: warning: Failed to find 
PDR for plugrec 0x0303.
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1f17fe
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1f27fe
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1f37fe
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1f47fe
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1f57fe
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1f67fe
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1f77fe
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1f87fe
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1f97fe
Sep 6 14:43:33 localhost cardmgr[3042]: + Reading S-record file 
/etc/wlan//prism2_r1.hex...
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1fa7fe
Sep 6 14:43:33 localhost cardmgr[3042]: + NIC ID: 0x8002 v1.0.0
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1fb7fe
Sep 6 14:43:33 localhost cardmgr[3042]: + MFI ID: 0x1 v1 1->1
Sep 6 14:43:33 localhost kernel: Writing 4096 bytes to ram @0x1fc7fe
Sep 6 14:43:33 localhost cardmgr[3042]: + CFI ID: 0x2 v1 1->1
Sep 6 14:43:33 localhost kernel: Writing 2940 bytes to ram @0x1fd7fe
Sep 6 14:43:33 localhost cardmgr[3042]: + PRI ID: 0x3 v1 1->2
Sep 6 14:43:33 localhost kernel: Writing 3046 bytes to ram @0x1ff000
Sep 6 14:43:33 localhost cardmgr[3042]: + Version: ID 0x1f 1.7.1
Sep 6 14:43:33 localhost kernel: ident: nic h/w: id=0x8002 1.0.0
Sep 6 14:43:33 localhost cardmgr[3042]: + Compat: Role 0 Id 0x4 v1 1->12
Sep 6 14:43:33 localhost kernel: ident: pri f/w: id=0x15 0.3.0
Sep 6 14:43:33 localhost cardmgr[3042]: + Compat: Role 0x1 Id 0x1 v1 1->1
Sep 6 14:43:33 localhost kernel: ident: sta f/w: id=0x1f 1.7.1
Sep 6 14:43:33 localhost cardmgr[3042]: + Compat: Role 0x1 Id 0x2 v1 1->1
Sep 6 14:43:33 localhost kernel: MFI:SUP:role=0x00:id=0x01:var=0x01:b/t=1/1
Sep 6 14:43:33 localhost cardmgr[3042]: + Compat: Role 0x1 Id 0x3 v1 1->2
Sep 6 14:43:33 localhost kernel: CFI:SUP:role=0x00:id=0x02:var=0x01:b/t=1/1
Sep 6 14:43:33 localhost cardmgr[3042]: + Seq: 0
Sep 6 14:43:33 localhost kernel: PRI:SUP:role=0x00:id=0x03:var=0x01:b/t=1/2
Sep 6 14:43:33 localhost cardmgr[3042]: + Platform: ID 0x8002 1.0.0
Sep 6 14:43:33 localhost kernel: STA:SUP:role=0x00:id=0x04:var=0x01:b/t=1/12
Sep 6 14:43:33 localhost cardmgr[3042]: + Platform: ID 0x8002 1.0.1
Sep 6 14:43:33 localhost kernel: 
PRI-CFI:ACT:role=0x01:id=0x02:var=0x01:b/t=1/1
Sep 6 14:43:33 localhost cardmgr[3042]: + Platform: ID 0x8003 1.0.0
Sep 6 14:43:33 localhost kernel: 
STA-CFI:ACT:role=0x01:id=0x02:var=0x01:b/t=1/1
Sep 6 14:43:33 localhost cardmgr[3042]: + Platform: ID 0x8003 1.0.1
Sep 6 14:43:33 localhost kernel: 
STA-MFI:ACT:role=0x01:id=0x01:var=0x01:b/t=1/1
Sep 6 14:43:33 localhost cardmgr[3042]: + Platform: ID 0x8004 1.0.0
Sep 6 14:43:33 localhost kernel: Prism2 card SN: 99SA01000000
Sep 6 14:43:33 localhost cardmgr[3042]: + Platform: ID 0x8008 1.0.0
Sep 6 14:43:33 localhost cardmgr[3042]: + prism2dl: finished.
Sep 6 14:43:33 localhost cardmgr[3042]: + Failed to open network config file 
/etc/wlan/wlancfg-aptry, using default.
Sep 6 14:43:39 localhost kernel: p80211knetdev_hard_start_xmit: Tx attempt 
prior to association, frame dropped.
- - - - - - 
The last message puzzled me very much: the Tx attempt prior to association? 
Does it mean my card is attempting to find another AP to associate? 

When I used iwconfig and iwlist commands, the messages showed:
- - - - - -
Sep 6 14:44:59 localhost kernel: wext_translate_bss: essid size = 7
Sep 6 14:44:59 localhost kernel: wext_translate_bss: essid size OK.
Sep 6 14:44:59 localhost kernel: prism2mgmt_scan_results: reqeusted index 
(2) out of range (1)
- - - - - -


This AP is very important for me! Can anybody help me to solve this problem? 
Give me some directions, thank you!

-- 
Bob

_______________________________________________
Linux-wlan-devel mailing list
[email protected]
http://lists.linux-wlan.com/mailman/listinfo/linux-wlan-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.