蓝牙,Bluez:无法通过bnepX接口回复ping

时间:2014-04-02 04:45:57

标签: bluetooth tcp-ip bluez wireless-connection

我已尝试在蓝牙上使用网络,NAP配置文件。

在主持人上,xUbuntu 13.04我跟随here

此主机或XUbuntu计算机为behind proxy&在virtual machine上运行。

它与Bluetooth版本4.101

一起安装

在嵌入式主板上,ping 173.194.112.211的响应如下:

PING 173.194.112.211 (173.194.112.211) 56(84) bytes of data.  
64 bytes from 173.194.112.211: icmp_req=1 ttl=46 time=336 ms  

在嵌入式主板上,ifconfig显示如下:

bnep0     Link encap:Ethernet  HWaddr 3E:DA:FB:6C:EE:BC  
          inet addr:10.220.129.178  Bcast:10.255.255.255  Mask:255.0.0.0  
          inet6 addr: fe80::3cda:fbff:fe6c:eebc/64 Scope:Link  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1  
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0  
          TX packets:458 errors:0 dropped:0 overruns:0 carrier:0  
          collisions:0 txqueuelen:500  
          RX bytes:1793 (1.7 KiB)  TX bytes:36870 (36.0 KiB)  

eth0      Link encap:Ethernet  HWaddr 0C:23:C0:80:C0:E8  
          inet addr:10.122.83.127  Bcast:10.255.255.255  Mask:255.0.0.0  
          inet6 addr: fe80::e23:c0ff:fe80:c0e8/64 Scope:Link  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1  
          RX packets:24555 errors:0 dropped:611 overruns:0 frame:0  
          TX packets:20647 errors:0 dropped:0 overruns:0 carrier:0  
          collisions:0 txqueuelen:1000  
          RX bytes:3374125 (3.2 MiB)  TX bytes:5878612 (5.6 MiB)  

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0  
          inet6 addr: ::1/128 Scope:Host  
          UP LOOPBACK RUNNING  MTU:65536  Metric:1  
          RX packets:25809 errors:0 dropped:0 overruns:0 frame:0  
          TX packets:25809 errors:0 dropped:0 overruns:0 carrier:0  
          collisions:0 txqueuelen:0   
          RX bytes:3824780 (3.6 MiB)  TX bytes:3824780 (3.6 MiB)  

polo0     Link encap:Ethernet  HWaddr 02:00:00:00:00:01  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0  
          inet6 addr: fe80::ff:fe00:1/64 Scope:Link  
          UP BROADCAST RUNNING MULTICAST  MTU:65536  Metric:1  
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0  
          TX packets:696 errors:0 dropped:0 overruns:0 carrier:0  
          collisions:0 txqueuelen:1000  
          RX bytes:0 (0.0 B)  TX bytes:117357 (114.6 KiB)  

在嵌入式主板上,我发出命令:ping -I bnep0 173.194.112.211
这是谷歌的IP地址顺便说一句:)

很长一段时间后,我按Ctrl + c,它给出了这个:

PING 173.194.112.211 (173.194.112.211): 56 data bytes
^C
--- 173.194.112.211 ping statistics ---
541 packets transmitted, 0 packets received, 100% packet loss

在嵌入式主板上,我还尝试将bnep0 inet addr更改为:10.122.83.128。
当然没有人拥有这个IP地址。

它不起作用......

hcidump -X在我ping时显示这些数据包,而不是其他时间。

HCI sniffer - Bluetooth packet analyzer ver 2.4
device: hci0 snap_len: 1028 filter: 0xffffffff
> ACL data: handle 38 flags 0x02 dlen 47
    L2CAP(d): cid 0x0042 len 43 [psm 0]
      0000: 00 ff ff ff ff ff ff 3e  da fb 6c ee bc 08 06 00  .......>..l.....
      0010: 01 08 00 06 04 00 01 3e  da fb 6c ee bc 0a dc 81  .......>..l.....
      0020: b2 00 00 00 00 00 00 ad  c2 70 d3                 .........p.
> ACL data: handle 38 flags 0x02 dlen 47
    L2CAP(d): cid 0x0042 len 43 [psm 0]
      0000: 00 ff ff ff ff ff ff 3e  da fb 6c ee bc 08 06 00  .......>..l.....
      0010: 01 08 00 06 04 00 01 3e  da fb 6c ee bc 0a dc 81  .......>..l.....
      0020: b2 00 00 00 00 00 00 ad  c2 70 d3                 .........p.
> ACL data: handle 38 flags 0x02 dlen 47
    L2CAP(d): cid 0x0042 len 43 [psm 0]
      0000: 00 ff ff ff ff ff ff 3e  da fb 6c ee bc 08 06 00  .......>..l.....
      0010: 01 08 00 06 04 00 01 3e  da fb 6c ee bc 0a dc 81  .......>..l.....
      0020: b2 00 00 00 00 00 00 ad  c2 70 d3                 .........p.

我希望通过xUbuntu以太网的互联网连接,通过蓝牙,通过xUbuntu以太网的互联网接入互联网。

有人请帮我解决这个问题。

1 个答案:

答案 0 :(得分:0)

我在xUbuntu 13.04上使用本地IP地址配置了bnep0网络接口并且它已经工作了:)

# ifconfig bnep0 192.168.1.3 up

我也猜测命令route也有帮助。

ping有效,但有丢包...