注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

windfly's sky

the sky I can fly like the wind

 
 
 

日志

 
 

linux下用蓝牙通过手机拨号上网  

2009-12-12 00:02:16|  分类: linux learn |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
从网上找到的方法。
第一步:建立手机和电脑的蓝牙连接。这个fedora11有蓝牙支持的图形化程序在system-->preference-->bluetooth,在此搜索建立连接,目标,可以通过蓝牙传文件。
第二步:建立手机modem的映射
在电脑上用root用户绑定到本地,以下是摘录的步骤
  先将手机绑定到我们的本地设备上,主要用到rfcomm命令。
   如bash-3.2# rfcomm bind 0 00:1B:59:A6:A1:36 2
   0-代表将映射到设备/dev/rfcomm0
   00:1B:59:A6:A1:36-目标设备的地址,像我的手机
   2-目标设备上通道。
   不用担心,下面将说明如何获取这些参数。
1)目标设备地址的获取,可以用hcitool命令:
bash-3.2# hcitool scan
Scanning ...
    00:1B:59:A6:A1:36    K810i
2)通道号的获取,可以用sdptool命令。请选择含有Dial-up Networking的通道,像我这边对应的是Channel: 2
bash-3.2# sdptool browser 00:1B:59:A6:A1:36
Browsing 00:1B:59:A6:A1:36 ...
Service Description: Sony Ericsson K810
Service RecHandle: 0x10000
Service Class ID List:
  "PnP Information" (0x1200)
Service Name: OBEX SyncML Client
Service RecHandle: 0x10001
Service Class ID List:
  UUID 128: 00000002-0000-1000-8000-0002ee000002
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
  "OBEX" (0x0008)
Service Name: Dial-up Networking
Service RecHandle: 0x10002
Service Class ID List:
  "Dialup Networking" (0x1103)
  "Generic Networking" (0x1201)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 2
Profile Descriptor List:
  "Dialup Networking" (0x1103)
    Version: 0x0100
Service Name: Serial Port
Service RecHandle: 0x10003
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 3
Service Name: PAN Network Access Point
Service Description: NAP provides access to internet for one connecting PANu
Service RecHandle: 0x10008
Service Class ID List:
  "Network Access Point" (0x1116)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 15
  "BNEP" (0x000f)
    Version: 0x0100
    SEQ8: 0 6 dd
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Network Access Point" (0x1116)
    Version: 0x0100
Service Name: Hands-Free Gateway
Service RecHandle: 0x10009
Service Class ID List:
  "Handfree Audio Gateway" (0x111f)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 4
Profile Descriptor List:
  "Handsfree" (0x111e)
    Version: 0x0105
Service Name: Headset Gateway
Service RecHandle: 0x1000a
Service Class ID List:
  "Headset Audio Gateway" (0x1112)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 5
Profile Descriptor List:
  "Headset" (0x1108)
    Version: 0x0100
Service Name: OBEX Object Push
Service RecHandle: 0x1000b
Service Class ID List:
  "OBEX Object Push" (0x1105)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 6
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX Object Push" (0x1105)
    Version: 0x0100
Service Name: OBEX File Transfer
Service RecHandle: 0x1000c
Service Class ID List:
  "OBEX File Transfer" (0x1106)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 7
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX File Transfer" (0x1106)
    Version: 0x0100
Service Name: OBEX IrMC Sync Server
Service RecHandle: 0x1000d
Service Class ID List:
  "IrMC Sync" (0x1104)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 8
  "OBEX" (0x0008)
Profile Descriptor List:
  "IrMC Sync" (0x1104)
    Version: 0x0100
Service Name: HID Mouse & Keyboard
Service Description: Remote Control of PC applications and other devices
Service Provider: Sony Ericsson
Service RecHandle: 0x1000e
Service Class ID List:
  "Human Interface Device" (0x1124)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 17
  "HIDP" (0x0011)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Human Interface Device" (0x1124)
    Version: 0x0100
Service Name: OBEX Phonebook Server
Service RecHandle: 0x10010
Service Class ID List:
  "Phonebook Access - PSE" (0x112f)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 9
  "OBEX" (0x0008)
Profile Descriptor List:
  "Phonebook Access - PSE" (0x112f)
    Version: 0x0100
3)获取完这些参数后,用最初教的命令来绑定,基本工作就完成了。
bash-3.2# rfcomm bind 0 00:1B:59:A6:A1:36 2
第三步:拨号
系统中有kppp程序,1点configure-->modem-->new-->modem device选择刚才的/dev/rfcomm0. save
2然后点account-->new,phone number 那加上要拨的号码*99#,注意authentication 选terminal-base,否则要让你输入用户名密码,而手机拨号不用输入,还要注意dns一定要填,因为kppp不会自动配置dns,否则就会出现连接成功,就是不能上网的情况,我填的是从网上搜到的211.136.17.107,如果出现连接成功不能上网可以先ping一下这个dns地址,如果通,就可以用了。
3然后进行拨号, 在出现一串乱码后点continue,就会登录成功了。
  评论这张
 
阅读(724)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018