-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
packets dropped on raspberry-pi #1
Comments
Do you know what the git commit number is for the 8188eu code that you are using? Admittedly, I have not tested with an unencrypted AP, which is what I think you mean by an "open wifi". |
You are right, I meant un-encrypted with 'open'. I used the last one of today, it should be 7446992. |
That was my fault. I created the bug that broke all B/G connections, not just unencrypted ones. It is fixed with commit commit 993b021. Thanks for reporting the problem. |
thanks for the quickness in looking into the issue. iwconfig shows almost 100% quality and I finally successfully received the ip from the AP, the connection is really very slow though. The dropped messages are still a lot, at least an order of magnitude against RX packages, rx packages are almost 1100 with 21000 dropped after a few minutes of uptime. |
That could be something in the USB stack on the Pi. On x86_64, I get about 40 Mbps throughput on an 802.11n connection with the following packet/drop stats from ifconfig:
|
Actually I've the same thought concerning the raspberry-pi as the main cause. For your experience is it still related to the wifi driver or into the rpi's kernel instead? |
I do not think it is the 8188eu driver as it performs fine on my laptop. It could be something caused by the slow CPU on the Pi, or it could be in the USB drivers. What distribution are you using on the Pi, and what kernel version? I guess it is time for me to get out my Pi and do some testing with it. |
I use rasbian, kernel 3.6.11+ (latest available) Paolo 2013/8/20 lwfinger notifications@github.com
|
Actually, iwconfig doesn't show 802.11n. How should I enable it?
|
Many AP's will not advertise 802.11n capabilities unless WPA2 (AES/CCMP) encryption is selected. Yours may be one of them, or it may not support 802.11n under any circumstances. |
The r8188eu driver was accepted into the staging kernel on August 22. After that acceptance, I added it to the raspberrypi/linux git repo and built a kernel. Initial testing looks good with version 3.6.11+. That code is available at http://github.com/lwfinger/linux. It is now being considered for addition to the standard http:/github.com/raspberrypi/linux repo. I have not yet measured the speed using my standard netperf scripts, but I ran an long-term ping to a Netgear WNDR3200 router. Out of a total of 292,000 ping attempts, only 2 were lost. The RTL8188EU was plugged into a powered USB hub and was about 1.5 m from the AP. My next step will be to build and test 3.8, 3.9, and 3.10 kernels with the new driver added. |
I now have longer-term results for the RTL8188EU on the Pi as follows: wlan0 Link encap:Ethernet HWaddr a0:f3:c1:15:41:cf That packet drop rate seems normal to me. I still have not measured the transfer rate. |
Have you used an un-encrypted AP? |
That reference is for a different source than mine. Why are you using it? Of course, I have no idea what might be wring! You should All my hubs are powered and I cannot run without one as I have the wifi device, the keyboard, and a mouse. The keyboard fails when plugged into the hub, thus it needs one of the primary ports. I finally measured the throughput with netperf and got 43 Mbps for RX and 68 Mbps for TX. |
Of course, I followed the instructions in the reference but with your driver. |
I have no idea what to say. The driver just works for me. BTW, the driver code is now available in the standard repo at http://github.com/raspberrypi/linux.git in all branches for versions 3.6+. I expect it will also be included in the standard firmware derived from that. |
I also experienced a package drop issue with rtl8188eu, ifconfig showed as below:
The commit version I used to compile is 993b021.
|
Please provide more info regarding AP in use, encryption method, distance to AP, indicated signal strength and method used to obtain it, etc. Unless I can duplicate your result, it will be exceedingly difficult to fix. What is the make/model of your device? |
Tested on an ubuntu 64bit:
Packets dropped are an order of magnitude more those received.
|
I increased the maximum RX gain. Does it help? With this change at a distance of ~3m from the AP and going through a floor, I get wlan1 Link encap:Ethernet HWaddr A0:F3:C1:15:41:CF |
Hi Larry, the AP is built via a Macbook Air and the encryption method is WPA2-PSK, my device model is Mercury MW150US, the distance to MBA is about 2 meters, and signal strength is 100/100. I will re-build the driver and run some tests more seriously since some changes was made. |
Tested in PC with Ubuntu 13.04 x86_64, kernel version 3.8.x Set rtl8188eu 0.5 meter away from AP, the AP info:
With commit verison 9e9f549:
With commit version 993b021:
Looks like everything is OK now. |
What issue with kernel version? As far as I know, the git repo should work with any relatively new kernel. At least the code has conditional compilation for old kernels. There was a report of a fatal oops on an old kernel, but the details were never reported. I develop the driver on x86_64 architecture, and I have tested on Raspberry Pi. What do you mean with the last question? |
I experiencing package drop issue on my i386 PC with relatively lower(3.2.0) kernel version while everything goes well on my x86_64 PC with 3.8.x kernel version. |
That will be something in the rest of the kernel. The only differences between the 8188eu code on the two versions is what is required to handle the API changes for other parts of the kernel. |
Today version look like solve drop packets on raspberry pi, it drop only a 0.2% of rx packets Linux raspberry pi 3.6.11+ #538 |
The code issues a warning as follows: [ 817.111258] WARNING: CPU: 5 PID: 772 at createbss_hdl+0x120/0x148 [8188eu] [ 817.111502] Modules linked in: 8188eu(O) cfg80211 lib80211 [last unloaded: 8188eu] [ 817.111520] CPU: 5 PID: 772 Comm: RTW_CMD_THREAD Tainted: G WC O 5.10.145-rt74+g1594b25154a2 #1 [ 817.111527] Hardware name: NXP S32G399A-RDB3 (DT) [ 817.111531] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--) [ 817.111537] pc : createbss_hdl+0x120/0x148 [8188eu] [ 817.111672] lr : rtw_cmd_thread+0x454/0x548 [8188eu] [ 817.111806] sp : ffffffc013db3da0 [ 817.111808] x29: ffffffc013db3da0 x28: ffffffc0089c9168 [ 817.111815] x27: ffffffc008909f74 x26: 0000000000001400 [ 817.111821] x25: ffffffc0089c90f8 x24: ffffffc011010320 [ 817.111827] x23: ffffffc011010400 x22: 000000010001f8f3 [ 817.111833] x21: ffffffc011010350 x20: ffffffc01100f000 [ 817.111839] x19: ffffffc01100f000 x18: 0000000000000000 [ 817.111845] x17: 0000000000000001 x16: 0000000000000000 [ 817.111851] x15: 001fffffffffffff x14: 00000000001d7000 [ 817.111857] x13: 0000000000000370 x12: 0000000000000000 [ 817.111863] x11: 0000000000000370 x10: 00000000000008e0 [ 817.111868] x9 : ffffffc013db3960 x8 : ffffff880230eb00 [ 817.111874] x7 : 0000000000000001 x6 : ffffff8804ea9206 [ 817.111880] x5 : 0000800020000000 x4 : 0000000000000000 [ 817.111886] x3 : 000000000000ffff x2 : 0000000000000006 [ 817.111893] x1 : ffffff8804ea9200 x0 : 0000000000000000 [ 817.111900] Call trace: [ 817.111903] createbss_hdl+0x120/0x148 [8188eu] [ 817.112037] rtw_cmd_thread+0x454/0x548 [8188eu] [ 817.112170] kthread+0x178/0x180 [ 817.112184] ret_from_fork+0x10/0x30 [ 817.112193] ---[ end trace 00f853683c01e7a3 ]--- My investigation shows that the test for an invalid length was placed after the memcpy() call that generates this warning. The fix is to move the test above the memcpy, and to increase the maximum size of the IE buffer. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
The code issues a warning as follows: [ 817.111258] WARNING: CPU: 5 PID: 772 at createbss_hdl+0x120/0x148 [8188eu] [ 817.111502] Modules linked in: 8188eu(O) cfg80211 lib80211 [last unloaded: 8188eu] [ 817.111520] CPU: 5 PID: 772 Comm: RTW_CMD_THREAD Tainted: G WC O 5.10.145-rt74+g1594b25154a2 #1 [ 817.111527] Hardware name: NXP S32G399A-RDB3 (DT) [ 817.111531] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--) [ 817.111537] pc : createbss_hdl+0x120/0x148 [8188eu] [ 817.111672] lr : rtw_cmd_thread+0x454/0x548 [8188eu] [ 817.111806] sp : ffffffc013db3da0 [ 817.111808] x29: ffffffc013db3da0 x28: ffffffc0089c9168 [ 817.111815] x27: ffffffc008909f74 x26: 0000000000001400 [ 817.111821] x25: ffffffc0089c90f8 x24: ffffffc011010320 [ 817.111827] x23: ffffffc011010400 x22: 000000010001f8f3 [ 817.111833] x21: ffffffc011010350 x20: ffffffc01100f000 [ 817.111839] x19: ffffffc01100f000 x18: 0000000000000000 [ 817.111845] x17: 0000000000000001 x16: 0000000000000000 [ 817.111851] x15: 001fffffffffffff x14: 00000000001d7000 [ 817.111857] x13: 0000000000000370 x12: 0000000000000000 [ 817.111863] x11: 0000000000000370 x10: 00000000000008e0 [ 817.111868] x9 : ffffffc013db3960 x8 : ffffff880230eb00 [ 817.111874] x7 : 0000000000000001 x6 : ffffff8804ea9206 [ 817.111880] x5 : 0000800020000000 x4 : 0000000000000000 [ 817.111886] x3 : 000000000000ffff x2 : 0000000000000006 [ 817.111893] x1 : ffffff8804ea9200 x0 : 0000000000000000 [ 817.111900] Call trace: [ 817.111903] createbss_hdl+0x120/0x148 [8188eu] [ 817.112037] rtw_cmd_thread+0x454/0x548 [8188eu] [ 817.112170] kthread+0x178/0x180 [ 817.112184] ret_from_fork+0x10/0x30 [ 817.112193] ---[ end trace 00f853683c01e7a3 ]--- Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
I've been using this driver with a raspberry pi (last firmware and kernel build #524 https://github.com/raspberrypi/firmware) and I haven't been able to use an open wifi, while iwconfig shows that I am connected, ifconfig shows all packages dropped.
What can I do to debug it more?
Hope it helps.
The text was updated successfully, but these errors were encountered: