hsdpa speed solution

miha

New Member
Joined
Apr 6, 2007
Messages
4
Reaction score
0
Location
PT
Hi everybody... I am on this sometime already and I got some info, but now I can share something :)

I am using HSDPA in Portugal (Optimus) - 1.8Mbps/64Kbps on Ubuntu 6.10

I had problem with speed that was 60KB/s. And in windows it goes till 180KB/s
so.. problem is in usbserial. Actually it can't support bigger speed...

so there are 2 solutions: to patch usbserial or use airprime.
You can find explanation on this link: http://samat.org/weblog/20070127-high-speed-cellular-wireless-modems-in-ubuntu-linux-6-10.html

;)
 
Cool.. :) that explains the speed limit on my E220...
I can't get this to work on my Fedora Core 6 system though..
I managed to compile it but on trying to insert the module it crashes with:
Code:
FATAL: Error inserting airprime (/lib/modules/2.6.18-1.2798.fc6/kernel/drivers/usb/serial/airprime.ko): Invalid module format

And the the error log shows:
Code:
drivers/usb/serial/usb-serial.c: USB Serial Driver core
airprime: disagrees about version of symbol struct_module

I'll post this error on the page you linked too as well..
 
You are running kernel version 2.6.18, so u already have good airprime module, with support for bigger buffer...
quote from that blog...
The Linux airprime driver can operate these modems at full-speed, after support for larger buffers was added in 2.6.18. Unfortunately, the driver has to be patched to recognize any kind of new device.

try to put back the original :)
and then try to load module with that vendor and product arguments (like loading usbserial)
 
:o
I should've realised that .. :o *bangs head on desk* :o

Well, I've now restored my original airprime module and it can be inserted no problem..
Except that it doesn't recoignize my E220 .. and when I try with:
Code:
/sbin/modprobe airprime vendor=0x12d1 product=0x1003
It reports in the syslog:
Code:
airprime: Unknown parameter `vendor'


Any other ideas?
 
it seams that airprime is not using same syntax... and now I am too lazy now to search for right syntax so you can try to patch the file :)
but not with the patch ;)
first be sure that u have original airprime.c file (extract it again from tar archive with sources). then edit it in that way you just add data for your card:
on start of file there is a struct:
Code:
static struct usb_device_id id_table [] = {
	{ USB_DEVICE(0xf3d0, 0x0112) }, /* AirPrime 5220 */
	{ USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless Aircard 580 */
	{ USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */
	{ USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */
	{ USB_DEVICE(0x1410, 0x1110) }, /* Novatel Wireless S620 */
	{ USB_DEVICE(0x1410, 0x1130) }, /* Novatel Wireless S720 */
	{ USB_DEVICE(0x1410, 0x2110) }, /* Novatel Wireless U720 */
	{ USB_DEVICE(0x1410, 0x1430) }, /* Novatel Merlin XU870 */
	{ USB_DEVICE(0x1410, 0x1100) }, /* ExpressCard34 Qualcomm 3G CDMA */
	{ USB_DEVICE(0x413c, 0x8115) }, /* Dell Wireless 5500 */
	{ USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */
	{ USB_DEVICE(0x106c, 0x3701) }, /* Audiovox PC5740 */
	{ USB_DEVICE(0x106c, 0x3702) }, /* Pantech PX-500 */
	{ },
};
just add one line with your data:
Code:
{ USB_DEVICE(0x12d1, 0x1003) },

now recompile drivers, and try to insert it...
 
Last edited:
Thanks! :)
I've now managed to get the airprime module to detect my E220... it works fine.. :)
I'm connected right now via the airprime module.. :)

Btw.. I found a neat rundown on compiling kernel modules for anyone else who wants to give it a try: http://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html
Worked first shot for me.. :)

The only thing is I still don't seem to be able to get my speed over 62KB/s (max) ..
It could just be the network I guess.. but when I download something it goes up to 62KB/s and just sits there... I'm sure if it was the network it would fluctuate a bit?

It does seem to me that my airprime module is actually less updated than yours .. even though my kernel version is higher..

My full airprime.c source appears much shorter than the patched version?? :
Code:
/*
 * AirPrime CDMA Wireless Serial USB driver
 *
 * Copyright (C) 2005 Greg Kroah-Hartman <[email protected]>
 *
 *	This program is free software; you can redistribute it and/or
 *	modify it under the terms of the GNU General Public License version
 *	2 as published by the Free Software Foundation.
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/tty.h>
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>

static struct usb_device_id id_table [] = {
	{ USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */
	{ USB_DEVICE(0xf3d, 0x0112) },  /* AirPrime CDMA Wireless PC Card */
	{ USB_DEVICE(0x1410, 0x1110) }, /* Novatel Wireless Merlin CDMA */
	{ USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless Aircard 580 */
	{ USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */
	{ USB_DEVICE(0x12d1, 0x1003) }, /* Huawei E220 */
	{ },
};
MODULE_DEVICE_TABLE(usb, id_table);

static struct usb_driver airprime_driver = {
	.name =		"airprime",
	.probe =	usb_serial_probe,
	.disconnect =	usb_serial_disconnect,
	.id_table =	id_table,
	.no_dynamic_id = 	1,
};

static struct usb_serial_driver airprime_device = {
	.driver = {
		.owner =	THIS_MODULE,
		.name =		"airprime",
	},
	.id_table =		id_table,
	.num_interrupt_in =	NUM_DONT_CARE,
	.num_bulk_in =		NUM_DONT_CARE,
	.num_bulk_out =		NUM_DONT_CARE,
	.num_ports =		1,
};

static int __init airprime_init(void)
{
	int retval;

	retval = usb_serial_register(&airprime_device);
	if (retval)
		return retval;
	retval = usb_register(&airprime_driver);
	if (retval)
		usb_serial_deregister(&airprime_device);
	return retval;
}

static void __exit airprime_exit(void)
{
	usb_deregister(&airprime_driver);
	usb_serial_deregister(&airprime_device);
}

module_init(airprime_init);
module_exit(airprime_exit);
MODULE_LICENSE("GPL");
 
to bad that you are still limited to 60kbps (ok ok 62 :P)
I compiled airprime.c file from the blog, just added my card (Novatel U740). That's all...
I don't know what to tell you more...
Did you try with windows? Just to make sure that is (or not) the network issue...
 
I did try with Windows ... I didn't manage anything inredible, but it did get a little more than 62KB/s .... 80KB/s if I remember correctly .. I'll try again a bit later..

I also do have a Novatel U740 lying around - it's a bit buggered, but maybe I'll give it a try with the airprime module..
 
I've finally got my E220 running with no speed limit (I think) ..

I didn't use the "airprime" module as I simply cannot get it to work..
But I decided to find out about patching the "usbserial" module..

I found this link: http://www.junxion.com/opensource/linux_highspeed_usbserial.html
I did not actually use a patch file though, I just edited "usb-serial.c" myself... basically I had to add in four lines.. my usbserial module has a new command line argument "maxSize" which allows you to specifiy the size of the buffer (it used to default at 64)..
I use 2048 and it seems to work OK for me..

Here's a patch showing the changes I made:
Code:
--- usb-serial.c.old    2006-09-20 05:42:06.000000000 +0200
+++ usb-serial.c        2007-04-19 19:58:44.000000000 +0200
@@ -58,6 +58,7 @@
 */
 
 static int debug;
+static ushort maxSize = 0;
 static struct usb_serial *serial_table[SERIAL_TTY_MINORS];     /* initially all NULL */
 static LIST_HEAD(usb_serial_driver_list);
 
@@ -816,6 +817,7 @@
                        goto probe_error;
                }
                buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+               buffer_size = (endpoint->wMaxPacketSize > maxSize)?endpoint->wMaxPacketSize:maxSize;
                port->bulk_in_size = buffer_size;
                port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
                port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
@@ -1190,3 +1192,5 @@
 
 module_param(debug, bool, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Debug enabled or not");
+module_param(maxSize, ushort, 0);
+MODULE_PARM_DESC(maxSize, "User specified USB endpoint size");

I haven't yet managed to get any extreme speeds out of my E220.. but I don't have a full strength signal anyway so I shouldn't expect that..
I've seen it "bursting" up to 104KB/s already though.. so it's definetly improved..

Anyway.. hopefully this is of some use to someone.. :)
 
i don't know if its just my imagination, but i simply increased my baud rate and got the same download speeds as i was getting on windows. even though for the last couple days i haven't been able to connect so who knows.
 
Top
Sign up to the MyBroadband newsletter
X