ZTE AC 580 for Linux 1.0
呵呵,幸好有空。
注:此脚本灵感与办法来自于http://forum.ubuntu.org.cn/viewtopic.php?f=116&t=202430&start=0,感谢作者!
驱动模块制作方法:
原来使用的usbserial是针对低速的设备设计的,使用的缓冲区很小,并没考虑现在这种高速上网设备,因此造成网速有限制。可以通过修改usbserial的源代码,使其具有大小可变的缓冲区(参考www.evdoforums.com/thread4381.html),其步骤如下:
1、下载安装当前内核源码。在http://www.kernel.org/pub/linux/kernel/v2.6 中搜索你当前使用的内核版本,然后请猛击下载
2、copy当前内核配置文件至内核源代码目录下,
cp /boot/config-$(uname -r) /usr/src/linux-2.6.28/.config
3、cd到内核源码目录,为编译模块创建配置文件。
cd /usr/src/linux-source-2.6.24/ && make menuconfig
4、创建一个usbserial.c的补丁文件/root/usbserial.c.patch,内容如下:
--- linuxold/drivers/usb/serial/usb-serial.c 2006-12-31 17:40:28.000000000 -0600
+++ linux/drivers/usb/serial/usb-serial.c 2009-05-02 23:55:08.000000000 -0600
@@ -58,4 +58,5 @@
*/
+static ushort maxRSize, maxWSize, maxISize;
static int debug;
static struct usb_serial *serial_table[SERIAL_TTY_MINORS]; /* initially all NULL */
@@ -817,4 +818,6 @@
}
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ if (buffer_size < maxRSize)
+ buffer_size = maxRSize;
port->bulk_in_size = buffer_size;
port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
@@ -841,4 +844,6 @@
}
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ if (buffer_size < maxWSize)
+ buffer_size = maxWSize;
port->bulk_out_size = buffer_size;
port->bulk_out_endpointAddress = endpoint->bEndpointAddress;
@@ -866,4 +871,6 @@
}
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
+ if (buffer_size < maxISize)
+ buffer_size = maxISize;
port->interrupt_in_endpointAddress = endpoint->bEndpointAddress;
port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
@@ -1191,2 +1198,8 @@
module_param(debug, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug enabled or not");
+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");
4、对内核源码中的usbserial.c应用补丁文件
cd /usr/src/linux-2.6.28 && patch -Np0 -i /root/usbserial.c.patch
如果未能运行成功,也可以手工对usbserial.c进行修改,只要把以上标有“+”的行加入usbserial.c中相应位置即可。
5、编译修改后的模块(这里实际上编译了所有的USB串口模块,但至少比编译整个内核快得多)
make -C /lib/modules/$(uname -r)/build M=/usr/src/linux-2.6.28/drivers/usb/serial
6、备份当前使用的usbserial.ko,然后将上步生成的usbserial.ko copy到/lib/modules/kernel/drivers/usb/serial/
安装及使用方法:
下载地址:http://210.56.192.43/xyj/Downloads/zte-1.0.tar.bz2
注:这只是拨号脚本,不包含驱动。驱动由于内核版本的不同,需要根据内核来制作。稍候会详细说明。
下载之后解压到/tmp/
tar xvfj zte-1.0.tar.bz2 -C /tmp/
进入解压后的目录
cd /tmp/zte/
安装
./zte-install.sh
好了!开始拨号!
zte-3g.sh


chenqf@IBMr60e-laptop:~/软件/zte$ suripts/3g” -> “/home/chenqf/软件/zte/chatscripts/3g”
口令:
root@IBMr60e-laptop:/home/chenqf/软件/zte# ./zte-install.sh
“/lib/udev/ztemtEVDO.sh” -> “/home/chenqf/软件/zte/ztemtEVDO.sh”
“/etc/udev/rules.d/10-ztemtEVDO.rules” -> “/home/chenqf/软件/zte/10-ztemtEVDO.rules”
“/sbin/ztemtvcdromd” -> “/home/chenqf/软件/zte/ztemtvcdromd”
“/sbin/zte-3g.sh” -> “/home/chenqf/软件/zte/zte-3g.sh”
“/sbin/3g-nat.sh” -> “/home/chenqf/软件/zte/3g-nat.sh”
“/etc/ppp/peers/3g” -> “/home/chenqf/软件/zte/peers/3g”
“/etc/chatsc
“/usr/bin/zte-pon” -> “/home/chenqf/软件/zte/zte-pon”
“/usr/bin/zte-poff” -> “/home/chenqf/软件/zte/zte-poff”
root@IBMr60e-laptop:/home/chenqf/软件/zte# ./zte-init.sh
正在驱动中,请稍候
FATAL: Error inserting usbserial (/lib/modules/2.6.27-7-generic/kernel/drivers/usb/serial/usbserial.ko): Invalid module format
FATAL: Error inserting usbserial (/lib/modules/2.6.27-7-generic/kernel/drivers/usb/serial/usbserial.ko): Invalid module format
FATAL: Error inserting usbserial (/lib/modules/2.6.27-7-generic/kernel/drivers/usb/serial/usbserial.ko): Invalid module format
驱动完成,正在拨号中
拨号完成,开始美好的网络旅程吧!
root@IBMr60e-laptop:/home/chenqf/软件/zte# ./zte-init.sh
正在驱动中,请稍候
8287 8291 8292FATAL: Error inserting usbserial (/lib/modules/2.6.27-7-generic/kernel/drivers/usb/serial/usbserial.ko): Invalid module format
FATAL: Error inserting usbserial (/lib/modules/2.6.27-7-generic/kernel/drivers/usb/serial/usbserial.ko): Invalid module format
FATAL: Error inserting usbserial (/lib/modules/2.6.27-7-generic/kernel/drivers/usb/serial/usbserial.ko): Invalid module format
驱动完成,正在拨号中
拨号完成,开始美好的网络旅程吧!
root@IBMr60e-laptop:/home/chenqf/软件/zte#
以上是我的错误信息,希望对您有帮助
内核驱动模块的问题,稍候,我整理一下,把编译模块的方法写出来。
这个所的应该是笔记本的上网卡吧,型号看着眼熟,呵呵。
呵呵,3G上网卡嘛
以前同事用联通的无线上网就用的ZET的卡,所以看着眼熟。
呵呵,我这个是电信的。用着还可以吧
天翼的无线网络据说飞快呢。
呵呵,还好。有时很慢,最近很快。今晚超快。
http://hi.baidu.com/my_ubuntu/blog/item/29031e78e59448e72e73b32c.html
呵呵,恭喜楼上兄弟,我觉得使用脚本更方便些吧。而且不用安装wvdial
呵呵,对了,最近我搞定了ZTE AC 580 for Linux的即插即用自动拨号,有空我更新一下。
我发现其实在激活了ZTE AC 580的linux驱动后,我们甚至可以使用gnome-ppp来进行拔号连接,不过我还是很敬佩muxueqz兄您的,毕竟在我解决问题的过程中,你的方法给我开启了很多思路。赞一个!
cfq兄,呵呵,驱动很好搞定,只是附加一些功能就有趣了,比如我上面说的自动拨号。
Hello!
Hello!
新氧9.04 可不可以用ac580这个卡,我这里只有1X的信号,没有3g信号
呵呵,回楼上朋友:应该都可以用的,但信号不强的话,都一样……
Hello!
root@pluto-laptop:/tmp/zte# zte-3g.sh
正在驱动中,请稍候
WARNING: All config files need .conf: /etc/modprobe.d/blacklist-vmc, it will be ignored in a future release.
FATAL: Error inserting ztemt (/lib/modules/2.6.31-15-generic/kernel/drivers/usb/serial/ztemt.ko): Invalid module format
WARNING: All config files need .conf: /etc/modprobe.d/blacklist-vmc, it will be ignored in a future release.
FATAL: Error inserting ztemt (/lib/modules/2.6.31-15-generic/kernel/drivers/usb/serial/ztemt.ko): Invalid module format
WARNING: All config files need .conf: /etc/modprobe.d/blacklist-vmc, it will be ignored in a future release.
FATAL: Error inserting ztemt (/lib/modules/2.6.31-15-generic/kernel/drivers/usb/serial/ztemt.ko): Invalid module format
Dec 2 14:33:30 pluto-laptop kernel: [11032.403841] type=1503 audit(1259735610.524:25): operation="open" pid=7046 parent=7035 profile="/usr/sbin/cupsd" requested_mask="w::" denied_mask="w::" fsuid=0 ouid=0 name="/dev/ttyUSB3"
Dec 2 14:33:30 pluto-laptop kernel: [11032.403858] type=1503 audit(1259735610.524:26): operation="open" pid=7046 parent=7035 profile="/usr/sbin/cupsd" requested_mask="w::" denied_mask="w::" fsuid=0 ouid=0 name="/dev/ttyUSB4"
驱动完成,正在拨号中
拨号完成,开始美好的网络旅程吧!
这是怎么回事?
pluto兄, 你重新编译模块了吗?
可能我某个环节搞错了,我在试试,郁闷……
呵呵,好,有问题可以加我Gtalk或MSN:zmy@Linuxzh.org
well.. it's like I thought!
我都准备在ARM上玩玩3G,到时一定要各位高手指点指点啊!
明源兄,你是不是已经移植成功了啊?教教我啊!
汗。呵呵,小弟不懂开发,没试过,但ARM上的Linux kernel应该也可以这样做的。
明源兄,你Q号是多少啊,方不方便告诉我一下啊?我的AC580到了,在下有些问题要请教请教你啊!谢谢!
楼上仁兄切勿客气,如有疑问请加我Gtalk或MSN:zmy@Linuxzh.org
hello guys
I just want to say hi