在Windows下通过微软件的同步软件,非常容易实现通过PPC 的EDGE上网。但是Linux下稍微麻烦一点。笔者经过一番努力终于成功。以下和大家分享成功的乐趣
图1.Ubuntu 8.04 其实已经带有rndis_host的驱动,能将PPC手机当成网卡处理。只是不知道为什么内置的驱动无法与手机联机。使用以下驱动替换内置驱动即可
2.下载新的驱动。点击下载
3.解压后。设置文件权限。sudo chmod 777 -R usb
4.make 编译
make -C /lib/modules/2.6.24-18-generic/build SUBDIRS=/home/wolf/software/usb modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-18-generic'
CC [M] /home/wolf/software/usb/usbnet.o
CC [M] /home/wolf/software/usb/cdc_ether.o
CC [M] /home/wolf/software/usb/rndis_host.o
Building modules, stage 2.
MODPOST 3 modules
CC /home/wolf/software/usb/cdc_ether.mod.o
LD [M] /home/wolf/software/usb/cdc_ether.ko
CC /home/wolf/software/usb/rndis_host.mod.o
LD [M] /home/wolf/software/usb/rndis_host.ko
CC /home/wolf/software/usb/usbnet.mod.o
LD [M] /home/wolf/software/usb/usbnet.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-18-generic'
5.sudo ./clean.sh 运行目录下的该程序,它会自动删除内置驱动。(如果出现sudo: ./clean.sh: command not found )是因为权限问题。一定要先将该文件设置可执行
已删除 “/lib/modules/2.6.24-18-generic/kernel/drivers/net/usb/usbnet.ko”
已删除 “/lib/modules/2.6.24-18-generic/kernel/drivers/net/usb/cdc_ether.ko”
已删除 “/lib/modules/2.6.24-18-generic/kernel/drivers/net/usb/rndis_host.ko”
Done! :)
6.sudo make install
make -C /lib/modules/2.6.24-18-generic/build SUBDIRS=/home/wolf/software/usb modules_install
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-18-generic'
INSTALL /home/wolf/software/usb/cdc_ether.ko
INSTALL /home/wolf/software/usb/rndis_host.ko
INSTALL /home/wolf/software/usb/usbnet.ko
DEPMOD 2.6.24-18-generic
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-18-generic'
depmod -ae
7.修改/etc/network/interfaces文件,在
auto lo
iface lo inet loopback
下面加入
auto rndis0
iface rndis0 inet dhcp
8.然后连接PPC USB线,启动 internet共享程序
9.激活rndis0
sudo ifconfig rndis0 up
10.从DHCP获取IP地址
sudo dhclient rndis0
DHCPDISCOVER on rndis0 to 255.255.255.255 port 67 interval 6
DHCPOFFER of 192.168.0.103 from 192.168.0.1
DHCPREQUEST of 192.168.0.103 on rndis0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.103 from 192.168.0.1
bound to 192.168.0.103 -- renewal in 109104 seconds.
到如,已成功取得IP,如用是CMNET方式的可以直接上网。如果是CMWAP请设置代理!