September8
Was fairly satisfied with 60kbps speed on average with the Reliance Broadband+ connection using Zte AC2726 modem, when I stumbled upon an article saying the usbserial kernel module isnt designed for high speed access and has a bottleneck which caps the speed to over 60 kpbs on an average.
(You can check how to set it up here at the link below)
http://navindutta.com/wordpress/2009/09/installing-reliance-broadband-on-fedora-linux-part-one/
Hmm… Not quiet what we want when we pay for 3.1MBpS.. This should be dealt with; but how.
After hours of toil I figured out how to do this. Lets setup the kernel compiling environment. We update our kernel; install kernel source packages and kernel header files for compiling the hacked usbserial kernel module.
(My kernel version was 2.6.27.30-170.2.82.fc10.i686)
Lets do this.
#yum update kernel
#yum install kernel-devel
#yum install kernel-headers
After this I tried to build a custom kernel but it kept failing. This was taken care of after I installed the ncurses dependency package for kernel compiling.
#yum install ncurses-devel
Okay..after installing ncurses-devel package lets see if we can build the kernel.
#cd /usr/src/kernels/`uname -r`/ && make menuconfig
Yes we can
GEE …YUHOO … it gives a pretty menu like interface .. so we are ready to build our patched usbserial.ko
Lets locate the source file
#locate usb-serial.c
Output
#########################
/usr/local/bin/ztemtApp/zteusbserial/2.6.27/usb-serial.c
#########################
End Output
Lets copy this file the kernel module compiler directory for usbserial
#cp /usr/local/bin/ztemtApp/zteusbserial/2.6.27/usb-serial.c /usr/src/kernels/`uname -r`/drivers/usb/serial/
Make a backup if something goes.
#cp /usr/src/kernels/`unname -r`/drivers/usb/serial/ /home/nick/Desktop/usbserial_emergency_backup
Copy the files from the running usbserial module to build directory
#cp /usr/local/bin/ztemtApp/zteusbserial/2.6.27/* /usr/src/kernels/`uname -r`/drivers/usb/serial/
Patch the current usbserial.c with added layer to accomodate highspeed access argumentss
The patch file should be like this
************************************
61a62
> static ushort maxRSize, maxWSize, maxISize;
841a843,844
> if (buffer_size < maxRSize)
> buffer_size = maxRSize;
865a869,870
> if (buffer_size < maxWSize)
> buffer_size = maxWSize;
891a897,898
> if (buffer_size < maxISize)
> buffer_size = maxISize;
1260a1268,1273
> module_param(maxRSize, ushort, 0);
> MODULE_PARM_DESC(maxRSize, “User specified USB input buffer size”);
> module_param(maxWSize, ushort, 0);
> MODULE_PARM_DESC(maxWSize, “User specified USB output buffer size”);
> module_param(maxISize, ushort, 0);
> MODULE_PARM_DESC(maxISize, “User specified USB interrupt buffer size”);
************************************
Or you can download this patched file
Instead of building the whole kernel, lets just build the usbserial.ko kernel module
#make -C /lib/modules/`uname -r`/build M=/usr/src/kernels/`uname -r`/drivers/usb/serial/
Create a backup for the current usbserial.ko
#cp /lib/modules/`uname -r`/kernel/drivers/usb/serial/usbserial.ko /lib/modules/`uname -r`/kernel/drivers/usb/serial/usbserial.ko.backup
You will find a ztemt.ko in the /usr/src/kernels/`uname -r`/drivers/usb/serial/
copy this file to /lib/modules/`uname -r`/kernel/drivers/usb/serial/ and rename it to usbserial.ko
#cp /usr/src/kernels/`uname -r`/drivers/usb/serial/ztemt.ko /lib/modules/`uname -r`/kernel/drivers/usb/serial/usbserial.ko
Install the new usbserial kernel module like this
#depmod -a
Reboot to save changes.
#reboot
Now lets modprobe with added parameters
#modprobe usbserial vendor=0×19d2 product=0xfff1 maxRSize=12288 maxWSize=8192;sudo wvdial
Enjoy the highspeed access over 250 kbps
Depending on the signal strength this goes upto 400kbps. Welcome hack!!
Have fun