USB serial high speed patch
Hello everyone,
I was wondering if one of the wizards here could give me hand in compiling a patched usbserial module that supports high speed HSDPA/UMTS devices such as the Huawei E220 HSDPA dongle sold by Vodafone. The patch is very simple, it's described at http://www.junxion.com/opensource/li...usbserial.html . I've tested it on an X86 system with a Huawei E220 USB modem and the results are pretty amazing, the download speed goes up from 30K/second (240kbps) to about 120K/second (960kbps). That's 4 times the non-patched speed.
A patched module would allow you to connect HSDPA or EVDO modems and use them at full speed.
As a side note, I've tried compiling the patched module myself on the device itself (I have the toolchain installed) and it does compile but when I insert it I get the following:
----------------------
usbserial.c: USB Serial support registered for Generic
Unhandled kernel unaligned access in unaligned.c::emulate_load_store_insn, line 481:
$0 : 00000000 1000fc00 00000000 00001003 000012d1 735f6f6e c00a7508 00000003
$8 : 81878800 735f6f6e 00000000 00000000 fffffffb ffffffff 0000000a 00000000
$16: c00a74a8 c008705c c00a74ec 00000001 00000000 c00a7498 81878800 735f6f6e
$24: 81849b80 00000002 81848000 81849cc8 c00986a0 c00a538c
Hi : 00000000
Lo : 0000000a
epc : c008716c Not tainted
Status: 1000fc03
Cause : 80000010
Process insmod (pid: 347, stackpage=81848000)
Stack: 57415548 54204945 6e686365 676f6c6f 00736569 00000000 00000000
00000000 57415548 4d204945 6c69626f 00000065 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 12d11003 00000000 00000000 801d3040 802f37a0 00000000 00000000
00000000 00000000 00000000 00000006 80022514 c00d5af8 c00d51e0 c00a73a0
c00a73c0 ...
Call Trace: [<80022514>] [<c00d5af8>] [<c00d51e0>] [<c00a73a0>] [<c00a73c0>]
[<c00fcc18>] [<c00986a0>] [<c008750c>] [<80030198>] [<c008721c>] [<c0086f14>]
[<c0086f98>] [<80010e64>] [<c0086f14>] [<c0086fd4>] [<c008721c>] [<c0086f14>]
[<c0086f14>] [<c0086fd4>] [<c0086f98>] [<800111cc>] [<c00986a8>] [<c0086f14>]
[<c00986a8>] [<c0086f14>] [<c00986a8>] [<c00861a8>] [<c00a6460>] [<c00a7064>]
[<c00a68bc>] [<c00a6588>] [<c00a653c>] [<8001259c>] [<80030198>] [<c00a3060>]
[<800085a4>]
Code: 5462ffce 24c60014 30e20040 <50400006> 8d230004 90c3000c 910200e6 5462ffc7 24c60014
--------------------------------
Also, here's a dump of the (successful?) compilation process:
------------------------------
[admin@Asus linux-2.4.20]$ make SUBDIRS=drivers/usb/serial modules
make -C drivers/usb/serial CFLAGS="-D__KERNEL__ -I/opt/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I /opt/src/linux-2.4.20/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe -mips2 -Wa,--trap -DMODULE -mlong-calls" MAKING_MODULES=1 modules
make[1]: Entering directory `/opt/src/linux-2.4.20/drivers/usb/serial'
gcc -D__KERNEL__ -I/opt/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I /opt/src/linux-2.4.20/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe -mips2 -Wa,--trap -DMODULE -mlong-calls -nostdinc -iwithprefix include -DKBUILD_BASENAME=usbserial -DEXPORT_SYMTAB -c usbserial.c
In file included from /opt/src/linux-2.4.20/include/linux/interrupt.h:46,
from /opt/src/linux-2.4.20/include/linux/usb.h:139,
from usbserial.c:300:
/opt/src/linux-2.4.20/include/asm/softirq.h: In function `cpu_bh_disable':
/opt/src/linux-2.4.20/include/asm/softirq.h:18: warning: use of compound expressions as lvalues is deprecated
/opt/src/linux-2.4.20/include/asm/softirq.h: In function `__cpu_bh_enable':
/opt/src/linux-2.4.20/include/asm/softirq.h:25: warning: use of compound expressions as lvalues is deprecated
gcc -D__KERNEL__ -I/opt/src/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I /opt/src/linux-2.4.20/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe -mips2 -Wa,--trap -DMODULE -mlong-calls -nostdinc -iwithprefix include -DKBUILD_BASENAME=pl2303 -c -o pl2303.o pl2303.c
In file included from /opt/src/linux-2.4.20/include/linux/interrupt.h:46,
from /opt/src/linux-2.4.20/include/linux/usb.h:139,
from pl2303.c:45:
/opt/src/linux-2.4.20/include/asm/softirq.h: In function `cpu_bh_disable':
/opt/src/linux-2.4.20/include/asm/softirq.h:18: warning: use of compound expressions as lvalues is deprecated
/opt/src/linux-2.4.20/include/asm/softirq.h: In function `__cpu_bh_enable':
/opt/src/linux-2.4.20/include/asm/softirq.h:25: warning: use of compound expressions as lvalues is deprecated
make[1]: Leaving directory `/opt/src/linux-2.4.20/drivers/usb/serial'
------------------------------------------------
Any ideas as to what I'm doing wrong? Or could someone apply the patch and compile the module for me/us ?
Thank you,
Razvan
--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL
I got the Huawei E220 working at full speed!
I felt that I had to reply, because I couldn't find a solution anywhere on the net and there must be someone that still have this problem.
This is how I got the Huawei E220 to work at full speed (3.6 / 7.2 Mbit/s). No patches are needed, just configuration.
I flashed the wl-500gP with http://koppel.cz/cdmawifi/download/166/
* In Connection Mode (USB Connection) I choose Dial-Up and entered the vendor=0x12d1 product=0x1003 and to dial *99#.
It now works but max out at 20kb/s.
* Now change the connection mode to User Defined.
* Telnet to the wl-500gP.
* Copy the files from /tmp/ppp/dialup to /usr/local/dial.
* Alter the file /usr/local/dial/update, replace "/tmp/ppp/dialup/" with "/usr/local/dial/"
* Alter the file /usr/local/dial/dial at row 6 to
"insmod usbserial vendor=$(nvram get dialup_vid) product=$(nvram get dialup_pid) maxpacketsize=4096"
(I think this is the trick, the maxpacketsize)
* Alter the file /usr/local/dial/dialup. Replace "115200" with "921600". (dunno if this is important)
That's it.
To save it all.
flashfs save
flashfs commit
flashfs enable
and
reboot
Now in the system log:
Jan 1 00:00:44 kernel: usbserial.c: Generic converter detected
Jan 1 00:00:44 kernel: usbserial.c: Buffer size for bulk_in is 4096 modem reports 64
Jan 1 00:00:44 kernel: usbserial.c: Buffer size for bulk_out is 4096 modem reports 64
Jan 1 00:00:44 kernel: usbserial.c: Generic converter now attached to /dev/usb/tts/0
I now max out at 650kb/s. Much more pleasant :)
/David.
1 Attachment(s)
High speed HSDPA via Huawei E220 and ASUS WL-500*
Running solution:
- Download latest firmware from http://koppel.cz/cdmawifi/download/
. Flash it by web admin interface "Firmware upgrade".
- After restart of Asus choose through the web interface "USB Connection" -> * "User defined".
- Upload attached file dial.huawei.tar.gz on "USB Connection" -> "User Dial-Up Files".
- Setup your provider username/password/apn/number in "USB Connection" -> "User Dial-Up Config". Get that info from your provider or maybe down on this page