free314 发表于 2008-5-20 21:31:07

求助:(linux下通过蓝牙手机上网)网页打不开

最近在想在一个pc机上实现-----linux+蓝牙手机---上网
内核2.6.9+MOTOv3
下面是我已所做的,大家帮我看看问题出在哪????
1 安装bluez-libs 2.25bluez-utils 2.25
没问题
2 配置bluez
   # 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 auto;

      # 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/my-bluepin;                              //这里是我自己写的一个bluepin,因为能够配对成功,所以这些应该都没问题了

      # D-Bus PIN helper
      #dbus_pin_helper;
}

# Default settings for HCI devices
device {
      # Local device name
      #   %d - device id
#   %h - host name
      name "ZCF-ATR-COMPUTER (%d)";

      # Local device class
      class 0x3e0100;

      # 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;
}
3 设置设置拨号上网
所用的工具:
pppd(用来拨号的)
rfcomm(用来连接手机拨号服务)

1. 需要建立编辑的文件有2个:                        //谁能提供这两文件的配置说明,谢谢了
第一个:/etc/ppp/peers/gprs
内容如下:

/dev/rfcomm0
230400
defaultroute
usepeerdns
user ''
password bobo
nodetach
crtscts
lock
noauth
local
debug
connect "/usr/sbin/chat -v -f /etc/ppp/chat-gprs"


第二个:/etc/ppp/chat-gprs
内容如下:

TIMEOUT 10
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'ERROR'
"" 'ATZ'
OK 'AT+CGDCONT=3,"IP","cmwap" '   //不明白什么意思
ABORT 'NO CARRIER'
SAY 'Dialing....\n'
OK 'ATD*99***1#'
CONNECT ''

4 修改/etc/bluetooth/rfcomm.conf

#
# RFCOMM configuration file.
#

rfcomm0 {
      # Automatically bind the device at startup
      bind yes;

      # Bluetooth address of the device
      device 00:17:84:**:**:**;                                 //我手机MOTOv3RMAC地址

      # RFCOMM channel for the connection
      channel 1;                                                         //我手机rfcomm的工作信道

      # Description of the connection
      comment "Example Bluetooth device";

5绑定rfcomm0到手机上
rfcomm bind 000:17:84:**:**:** 1

6. 运行命令进行拨号
pppd call gprs                                          //手机有收到"请求拨号连接网络网关"

显示如下:
Dialing....
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/rfcomm0
sent
rcvd
rcvd
sent
sent
rcvd
PAP authentication succeeded
sent
sent
rcvd
rcvd
sent
sent
rcvd
sent
rcvd
rcvd
sent
localIP address 10.90.20.89
remote IP address 192.168.100.101                                 
//我看了网上很多关于这一段的内容,都有形如primary   DNS address 0.0.0.19 secondary DNS address 0.71.35.128
//而我这里没有,我觉得很有可能是这个问题,因为手机的上网DNS不对,可能导致没法通过蓝牙手机上网
Script /etc/ppp/ip-up started (pid 4544)
Script /etc/ppp/ip-up finished (pid 4544), status = 0x0

我的问题也就在这里,pc机已经跟蓝牙手机配对成功,并且手机上也提示连接着,同时GPRS显示打开了,为什么找开firefox浏览器还是上不了

看网上说还得设置代理,我也设置了
编辑--首选项--连接---设置--->手动配置代理
HTTP 代理填上 10.0.0.172端口为 80

大侠们,帮我看看,我这问题出在哪里,搞了很多天了,也看了很多网友的介绍,可我的问题还是依旧,真是郁闷

期盼回复!!!
页: [1]
查看完整版本: 求助:(linux下通过蓝牙手机上网)网页打不开