PAN with Linux, iOS, Bluetooth, Bonjour, GameKit — Possible?

倖福魔咒の 提交于 2019-12-03 14:04:59

问题


So I read different takes on this matter (I think I read all the related questions on SO). Can I connect in a PAN - Can I write an app that will connect - my linux machine and my iOS device via bluetooth? Using or not using Bonjour or GameKit.

Few requisites:

  1. iOS devices are not jailbroken.
  2. iOS devices may or may not have the hotspot/tethering feature enabled (which as far as I have gathered is dictated by the Broadband provider -- i.e. if you pay you can tether your connection).
  3. iOS can run a custom made app that uses documented APIs.
  4. Bluetooth can be activated by hand by the iOS device user.

Thank you very much!


回答1:


iOS 3.0 provides support for headsets (mono/stereo), networking via the PAN/BNEP protocol and support for "Made for iPhone" devices which require a proprietary Bluetooth protocol. Still, not even basic OBEX support is included (available with any low-price mobile phone), and no API is available to connect to arbitrary Bluetooth devices. It also extents the GameKit API to allow for iOS-to-iOS communication.

iPhone Bluetooth Information

Personally, I would instead use wifi + bonjour. Here's a tutorial about implementing it, some of the code can be pretty gross, but once you get the boilerplate out of the way, it "just works", which is always a feel good moment.




回答2:


The apple API does not allow direct bluetooth data access through public APIs for security reasons.

You could use bonjour and house wifi (or wifi served from your linux box) to connect. As detailed here.



来源:https://stackoverflow.com/questions/7251023/pan-with-linux-ios-bluetooth-bonjour-gamekit-possible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!