|
发表于 2006-1-6 23:03:35| 字数 3,478| - Reserved
|
显示全部楼层
|阅读模式
FC4蓝牙连接手机WAP代理上网
**************原创 转载请注明出处 http://www.ibmnb.com******************
TP570E笔记本+SDA575手机+杂牌USB蓝牙+FC4
一、准备
安装时选中GNOME-BLUETOOTH包,在GNOME的详细中。
去除SELINUX保护:
桌面----系统设置----安全级别----SElinux----SELinux服务保护 选中“禁用bluetooth守护进程的SELinux保护”,确定。
二、启动bluetooth服务:
[root@chinaboy]#/etc/rc.d/init.d/bluetooth start
启动后蓝牙上的指示灯开始闪烁。
三、搜索设备:
[root@chinaboy]# hcitool scan
Scanning ...
00:09:2D:04:8B:BB HTC Smartphone <------设备地址
找到手机,显示地址,拿笔记下。
四、搜索设备的DUN服务,即网络拨号服务:
[root@chinaboy]# sdptool search DUN
Inquiring ...
Searching for DUN on 00:09:2D:04:8B:BB ...
Service Name: Dial-up Networking
Service RecHandle: 0x10002
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 7 <--------FRCOMM的工作信道
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
#########################################################################
记下工作信道。
五、编辑/etc/bluetooth/rfcomm.conf
############/etc/bluetooth/rfcomm.conf#####################
#
# RFCOMM configuration file.
#
# $Id: rfcomm.conf,v 1.1 2002/10/07 05:58:18 maxk Exp $
#
rfcomm0 {
# Automatically bind the device at startup
bind yes;
# Bluetooth address of the device
device 00:09:2D:04:8B:BB; <--------设备地址
# RFCOMM channel for the connection <-------工作信道,跟上面获得的信息相对应.
channel 7;
# Description of the connection
comment "Example Bluetooth device";
}
#
# HCI daemon configuration file.
#
# $Id: hcid.conf,v 1.7 2004/12/13 14:16:03 holtmann Exp $
#
#########################################################################
六、编辑/etc/bluetooth/hcid.conf
#####################/etc/bluetooth/hcid.conf#############################
# HCId options
options {
# Automatically initialize new devices
autoinit yes;
# Security Manager mode
# none - Security manager disabled
# auto - Use local PIN for incoming connections
# user - Always ask user for a PIN
#
security user; <--------安全模式
# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi; <--------配对模式
# PIN helper
#pin_helper /usr/bin/bluepin;
pin_helper /etc/bluetooth/feed-pin.sh; <--------自动回复PIN码
# D-Bus PIN helper
#dbus_pin_helper; <----------这条必须注释掉,否则连不上!
}
# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "FC4linux"; <---------设备名称
# Local device class
class 0x120104;
# Default packet type
#pkt_type DH1,DM1,HV1;
# Inquiry and Page scan
iscan enable; pscan enable;
# Default link mode
# none - no specific policy
# accept - always accept incoming connections
# master - become master on incoming connections,
# deny role switch on outgoing connections
lm accept;
# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
lp rswitch,hold,sniff,park;
# Authentication and Encryption (Security Mode 3)
auth enable; <-------这两条去掉注释
encrypt enable;
}
#########################################################################
编辑/etc/bluetooth/feed-pin.sh,用于自动回复PIN码。
######################/etc/bluetooth/feed-pin.sh###########################
#!/bin/sh
echo "PIN:12345"
别忘了 chmod 700 /etc/bluetooth/feed-pin.sh
然后重启系统
七、创建连接
应用程序----系统工具----互联网配制向导----调制解调器连接
调制解调器设备 /dev/rfcomm0
电话号码 *99#
提供商名称 gprs
登录名 wap
密码 wap
高级--调制解调器初始字串 AT+CGDCONT=1,"IP","cmwap"
八、拨号连接
ifup gprs
手机弹出PIN码提示,输入12345,确定以后开始拨号。
关闭 ifdown gprs
九、gprs加速
下载desproxy-0.1.0-0.pre2.1.fc3.rf.i386.rpm
安装 rpm -ivh desproxy-0.1.0-0.pre2.1.fc3.rf.i386
编辑映射脚本mapper
#!/bin/bash
desproxy 211.138.198.8 10917 10.0.0.172 80 8080
chmod 700 mapper
运行 ./mapper
关闭 CTRL+C
十、浏览器设置
代理 HTTP 127.0.0.1 80
由于使用了加速代理,网页下载速度明显加快,特别是图片多的页面。 |
|