rt2x00.serialmonkey.com

Support forum for the rt2x00 project
It is currently Thu May 23, 2013 12:27 am

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Jan 04, 2009 6:13 pm 
Offline

Joined: Sun Jan 04, 2009 5:37 pm
Posts: 4
Good evening men,
after long time, I send us full report again about support of rt2500pci in Master Mode with recent kernel and recent hostpad.

IMHO block stopper fails:
a) MGMT (TX callback) fail ... no visible AP SSID on client (mode managed) machine on the other side
b) unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
c) Error for wireless request "Set ESSID" (8B1A) :
SET failed on device wlan0 ; Operation not supported.
d) Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Invalid argument.
e) wlan0 No scan results
!!! but there is 8 other APs around !!!
f) no ESSID string in iwconfig output

Steps to reproduce:
1) download GIT trees (kernel + hostapd)
rt2x00.sh

2) generate configs
config_kernel.txt
config_hostpad.txt

3) patch hostapd
patch hostapd to ignore the lack of acknowledgement: http://eznemegy.blog.hu/2008/12/14/usin ... th_hostapd

4) make and install kernel + hostapd

5) reboot PC with new kernel

6) launch hostapd
hostapd.txt

7) catch full reports for comunity
dmesg.txt
hostapd.txt
ifconfig.txt
iwconfg_errors.txt
iwconfig.txt
lshw.txt
lsmod.txt
rt2x00_regdump.txt (by rt2x00_regdump.sh)
uname.txt
WiFi.txt

Thank you for comments, Petr Novák.


Attachments:
File comment: All report files are gzipped together.
report_2009_01_04.tar.gz [32.43 KiB]
Downloaded 107 times
Top
 Profile  
 
PostPosted: Wed Feb 25, 2009 6:57 pm 
Offline

Joined: Wed Feb 25, 2009 6:50 pm
Posts: 4
I also see the "MGMT (TX callback) fail" with an rt2500pci card on the git version of 2.6.29 from today, using the git version of hostapd. Symptoms are the same, I cannot see the SSID from other machines, and simply setting the SSID on the machines never results in association with hostapd.

If any debug information is needed, I'll happily provide it.


Top
 Profile  
 
PostPosted: Wed Mar 04, 2009 2:56 pm 
Offline

Joined: Wed Mar 04, 2009 1:27 pm
Posts: 5
n_petr wrote:
a) MGMT (TX callback) fail ... no visible AP SSID on client (mode managed) machine on the other side
b) unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)

Same problem here.

n_petr wrote:
c) Error for wireless request "Set ESSID" (8B1A) :
SET failed on device wlan0 ; Operation not supported.

This happens only if the card is in "master" - mode

n_petr wrote:
d) Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Invalid argument.

I think thats right, setting the card to master is not supported by iwconfig. (hostap only)

n_petr wrote:
e) wlan0 No scan results
!!! but there is 8 other APs around !!!

i think u need to be root

n_petr wrote:
f) no ESSID string in iwconfig output

Same here, think thats the main-problem...

System:
  • Kernel: 2.6.29-rc6-wl (latest git)
  • hostapd: v0.7.0
  • Ralink RT2500 802.11g Cardbus/mini-PCI (rev 01)

If more informations is needed, please tell me...


Top
 Profile  
 
PostPosted: Thu Mar 05, 2009 11:10 pm 
Offline

Joined: Wed Mar 04, 2009 1:27 pm
Posts: 5
I tried to make a dump with the rt2x00_regdump.sh script and hostapd running, but it only shows the following lines:

Code:
kernel: 2.6.29-rc6-wl
driver:   rt2500pci
version:   2.3.0
compiled:   Mar  4 2009 21:52:24
dev_flags: 0x0000051f
rt chip:   0201
rf chip:   0003
revision:   00000004

register   base   words   wordsize
csr   0   93   4
eeprom   0   256   2
bbp   0   64   1
rf   4   4   4


where is my mistake???


Top
 Profile  
 
PostPosted: Fri Mar 06, 2009 9:38 am 
Offline
Site Admin

Joined: Sun Jun 05, 2005 1:01 pm
Posts: 5905
Location: Haarlem, The Netherlands
Ahh I hadn't updated my regdump script yet, latest rt2x00.git contains a new version for register dumping, but the script on my kernel.org space wasn't updated accordingly. As soon as I get home from work I'll update the script. :)

_________________
Regards,
Ivo van Doorn
Project Administrator
http://rt2x00.serialmonkey.com


Top
 Profile  
 
PostPosted: Fri Mar 06, 2009 6:53 pm 
Offline
Site Admin

Joined: Sun Jun 05, 2005 1:01 pm
Posts: 5905
Location: Haarlem, The Netherlands
I still have to complete & test the entire set of scripts for debugfs.
I'll attach the new dumpscript, and will upload it to the kernel.org webspace when I am done with the rest of the scripts.
In any case, this script should work better for you. :)


Attachments:
File comment: Updated regdump script
rt2x00_regdump.sh.txt [2.19 KiB]
Downloaded 126 times

_________________
Regards,
Ivo van Doorn
Project Administrator
http://rt2x00.serialmonkey.com
Top
 Profile  
 
PostPosted: Sat Mar 07, 2009 2:55 am 
Offline

Joined: Wed Mar 04, 2009 1:27 pm
Posts: 5
@IvD:

Thank you for your help, i can now run the script.
In the new script I had to change 2 lines, but I think it was a typo:
line 73, 75: ${DEBUG_DIR}/$... to ${DEBUG_DIR}register/$...

for everyone else, who gets:
Code:
awk: not an option: --posix

You need to install "gawk" (debian: apt-get install gawk), the allready installed mawk can't deal with the "--posix" option.


Top
 Profile  
 
PostPosted: Sat Mar 07, 2009 9:15 am 
Offline
Site Admin

Joined: Sun Jun 05, 2005 1:01 pm
Posts: 5905
Location: Haarlem, The Netherlands
dopaminble wrote:
Thank you for your help, i can now run the script.
In the new script I had to change 2 lines, but I think it was a typo:
line 73, 75: ${DEBUG_DIR}/$... to ${DEBUG_DIR}register/$...


Thanks, I'll fix this in the script.

dopaminble wrote:
for everyone else, who gets:
Code:
awk: not an option: --posix

You need to install "gawk" (debian: apt-get install gawk), the allready installed mawk can't deal with the "--posix" option.


Hmm, perhaps I should call gawk directly or at a check if the --posix argument is needed or not.
Thanks.

_________________
Regards,
Ivo van Doorn
Project Administrator
http://rt2x00.serialmonkey.com


Top
 Profile  
 
PostPosted: Thu Apr 16, 2009 11:32 am 
Offline

Joined: Sun Jan 13, 2008 7:20 am
Posts: 11
Location: Poland
I see the rt2500pci driver sends incorrect beacon because of misalignment... Please compare with rt73usb driver. First 24 bytes of beacon message put to rt73usb_write_beacon are as follows:
80 0 0 0 ff ff ff ff ff ff 0 e 2e cf a1 88 0 e 2e cf a1 88 10 0
Compare with the beacon on air (tcpdump output):
Quote:
00:18:04.557547 1.0 Mb/s 2422 MHz (0x00a0) -56dB signal antenna 2 [0x0000000e] Beacon (W2LQ) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 3
0x0000: 0000 1800 2e48 0000 0002 7609 a000 c802 .....H....v.....
0x0010: 0000 0000 0000 0000 8000 0000 ffff ffff ................
0x0020: ffff 000e 2ecf a188 000e 2ecf a188 1003 ................
0x0030: d853 4600 0000 0000 6400 0104 0004 5732 .SF.....d.....W2
0x0040: 4c51 0108 8284 8b96 0c12 1824 0301 0305 LQ.........$....
I have marked bold the message contents. As you see, message starts at 24-byte offset. Now, message passed to rt2500pci_write_beacon:
80 0 0 0 ff ff ff ff ff ff 0 c 43 25 60 0 0 c 43 25 60 0 10 0
Beacon on air:
Quote:
00:20:27.928783 1.0 Mb/s 2422 MHz (0x00a0) -68dB signal antenna 2 [0x0000000e] 00:ff:ff:ff:ff:ff (oui Unknown) Unknown SSAP 0xd4 > ff:00:0c:43:25:60 (oui Unknown) Unknown DSAP 0x9c Information, send seq 0, rcv seq 0, Flags [Response], length 72
0x0000: 0000 1800 2e48 0000 0002 7609 a000 bc02 .....H....v.....
0x0010: 0000 0000 0000 0000 0880 0000 00ff ffff ................
0x0020: ffff ff00 0c43 2560 0000 0c43 2560 0010 .....C%`...C%`..
0x0030: 9cd5 0000 0000 0000 0064 0001 0400 0457 .........d.....W
0x0040: 324c 5101 0882 848b 960c 1218 2403 0103 2LQ.........$...
As you see, the message starts at 25-byte offset.

My investigations: entry->skb->data is not at 4-byte boundary. The allocated skb buffer (which is page aligned) is advanced by ieee80211_tx_status_rtap_hdr size before pass to the function, which is equal to 13.
After message align in memory (memmove), the beacon looks much better:
Quote:
12:31:59.867065 1.0 Mb/s 2422 MHz (0x00a0) -58dB signal antenna 2 [0x0000000e] Beacon (W2LQ) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] ESS CH: 3
0x0000: 0000 1800 2e48 0000 0002 7609 a000 c602 .....H....v.....
0x0010: 0000 0000 0000 0000 8000 0000 ffff ffff ................
0x0020: ffff 000c 4325 6000 000c 4325 6000 1001 ....C%`...C%`...
0x0030: 3dad 0600 0000 0000 6400 0104 0004 5732 =.......d.....W2
0x0040: 4c51 0108 8284 8b96 0c12 1824 0301 0305 LQ.........$....

Anyway, even if the correct beacon is sent, connection with the AP cannot be estabilished....


Top
 Profile  
 
PostPosted: Thu Apr 16, 2009 1:27 pm 
Offline

Joined: Sun Jan 13, 2008 7:20 am
Posts: 11
Location: Poland
Success! I have managed to connect to hostap working on the rt2500pci based card. Namely, the alignment problem exists not only in beacon frame. The rt2x00mac_tx function receives a misaligned skb->data, too. After the alignment correction, the device has started to work.


Top
 Profile  
 
PostPosted: Thu Apr 16, 2009 1:32 pm 
Offline

Joined: Wed Feb 25, 2009 6:50 pm
Posts: 4
Fantastic. If you have a patch, I'll be happy to test it later today.


Top
 Profile  
 
PostPosted: Thu Apr 16, 2009 4:18 pm 
Offline

Joined: Sun Jan 13, 2008 7:20 am
Posts: 11
Location: Poland
My patch is rather a temporary solution. It uses construct that I'm not sure is fully legal - but at least it works. It is for vanilla kernel 2.6.29.

I think a correct solution should enforce to receive already aligned messages from ieee802 level.
The driver behaves something strange, beacon is sent very frequently at hostapd startup, but at least it works. I think some additional investigations are needed for the driver.


Attachments:
patch2.6.29-rt2500pci.txt [717 Bytes]
Downloaded 376 times
Top
 Profile  
 
PostPosted: Thu Apr 16, 2009 6:22 pm 
Offline

Joined: Wed Feb 25, 2009 6:50 pm
Posts: 4
I can report success with the patch also, although I understand why it really isn't ready for inclusion, but at least it shows where the problem is.

I also tested the connection by copying a file, and everything seemd ok, so thanks a lot.


Top
 Profile  
 
PostPosted: Thu Apr 16, 2009 7:01 pm 
Offline

Joined: Sun Jan 13, 2008 7:20 am
Posts: 11
Location: Poland
What about the bit rate ? On my machine connection starts at 54 Mb/s, but after a few minutes it goes down to 1 Mb/s. Although only 1m distance is between stations and reported link quality is 97/100. File transfer doesn't exceed ~170 kB/s.


Top
 Profile  
 
PostPosted: Fri Apr 17, 2009 6:20 am 
Offline

Joined: Sun Jan 13, 2008 7:20 am
Posts: 11
Location: Poland
Strange... The bit rate depends on devices pair connected together. It looks the rt2500pci does not like Intel 3945ABG. But in pair with a second Ralink it works at much higher bit rate.

I have found only one more issue to correct. The rt2500pci_interrupt function re-schedules beacon update when beacon timer expires. This is unnecessary, it only causes problems. The RT chip generates the interrupt every time the beacon is sent to air. This occurs periodically, every 100ms or whatever is set. Because the first beacon is sent immediately after set, the interrupt occurs immediately after beacon set, too. This causes that the beacon is sent very frequently, much more frequently than the specified beacon period.

I have removed the rt2x00lib_beacondone call from rt2500pci_interrupt and it seems to work much better. As I see, the rt73usb driver does not have any periodic re-scheduling of beacon update, probably the rt2500pci driver does not need any, too.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group