多点连接框架(Multipeer Connectivity Framework)可能基于专有协议,因为我从未见过它实现PAN。它只是类似于它。正如您提到的,支持的
配置文件列表也包含PAN,并带有以下说明:
根据蓝牙配件的不同,您可能会遇到轻微的配置文件功能差异。这些差异由配件制造商而非iOS设备控制。
理论上,PAN被支持,您应该能够连接支持此配置文件的任意设备。我使用iPhone上的个人热点将我的Android手机连接到了iPhone上,并且Android可以毫无问题地使用共享的互联网连接。
我发现
树莓派蓝牙iPhone网络共享(Raspberry Pi Bluetooth iPhone Tethering) 教程似乎描述了您正在尝试做的事情。供以后参考,我在此复制步骤:
安装蓝牙软件包
sudo aptitude install bluetooth bluez-utils bluez-compat
将设备配对,这是棘手的部分
pi@raspberrypi ~ $ hcitool scan
Scanning ...
18:34:51:55:B0:D8 Fanboy ][
pi@raspberrypi ~ $
pi@raspberrypi ~ $ grep KeyboardDisplay /usr/bin/bluez-simple-agent
capability = "KeyboardDisplay"
pi@raspberrypi ~ $ sudo perl -i -pe 's/KeyboardDisplay/DisplayYesNo/' /usr/bin/bluez-simple-agent
pi@raspberrypi ~ $ grep DisplayYesNo /usr/bin/bluez-simple-agent
capability = "DisplayYesNo"
pi@raspberrypi ~ $
pi@raspberrypi ~ $ sudo bluez-simple-agent hci0 18:34:51:55:B0:D8
RequestConfirmation (/org/bluez/18868/hci0/dev_18_34_51_55_B0_D8, 160178)
Confirm passkey (yes/no): yes
Release
New device (/org/bluez/18868/hci0/dev_18_34_51_55_B0_D8)
pi@raspberrypi ~ $
pi@raspberrypi ~ $ sudo bluez-test-device trusted 18:34:51:55:B0:D8 yes
打开个人热点
pi@raspberrypi ~ $ echo "echo 'iface bnep0 inet dhcp' >> /etc/network/interfaces" | sudo sh
pi@raspberrypi ~
$ sudo pand -c 18:34:51:55:B0:D8 -role PANU --persist 30
享受
pi@raspberrypi ~ $ ifconfig bnep0
bnep0 Link encap:Ethernet HWaddr e0:91:53:61:0f:74
inet addr:172.20.10.10 Bcast:172.20.10.15 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4426 (4.3 KiB) TX bytes:802 (802.0 B)
感谢http://www.wolfteck.com/ 提供这些详细的指导。
MCNearbyServiceBrowser
似乎根本没有被树莓派注意到。我能否通过嗅探iPhone发送的BT数据包来了解更多信息? - BlackWolf