从应用程序将设备连接到 iPad 的最简单方法是什么?

发布于 2025-01-02 00:11:00 字数 917 浏览 7 评论 0原文

我正在为我的公司开发一个主要产品版本。我们正在设计一款新设备,希望将其集成到 iOS 应用程序中。 (仅供参考,我们最近已被 Apple MFi 计划接受,因此我们已经过了这一步。)

我们希望创建一个硬件/软件生态系统,让我们的用户可以启动我们的 iPad 应用程序(是的,它特定于iPad(而非 iPhone 或 iPod Touch 设备)和应用程序将自动发现并连接我们开发的任何近距离硬件。

这意味着我需要在 iPad 上和硬件内实现某种形式的设备连接过程。

有没有什么方法可以在 iOS 应用程序中编码自动连接到蓝牙设备?

我知道核心蓝牙框架具有此功能,但是它仅适用于新的 iPhone 4S。那不是一个选择。

我还研究了外部配件框架,它可用于连接外部设备,无论它们是通过 iPod 端口还是蓝牙连接。这是一个选项,但是,如果我的理解是正确的,我们的硬件必须已经与 iPad 配对,然后 iOS 软件才能连接到它。这不太可取,因为尽管我们的许多设备在某个时间点可能不在附近,但我们的客户可能拥有 100 台他们可能希望使用我们的软件连接的设备。

我的合理选择或替代方案是什么?最终目标是为我们的用户提供一种非常简单的方法,使其能够在 iPad 上从我们的软件连接到我们的设备。

注意:我不得越狱 iPad 或违反任何 Apple TOS 协议。

更新(2012 年 7 月 3 日) 我今天看到“New iPad”(正式名称)将支持蓝牙 4.0。我认为这意味着这款 iPad 设备将能够使用核心蓝牙框架。这并不能立即解决我的问题,因为我们确实希望至少与“上一代”iPad 设备保持兼容,但对于其他可能正在寻找此类答案的人来说,这一点值得指出。

I am working on a major product release for my company. We are designing a new device that we would like to integrate into an iOS app. (FYI, we have recently been accepted into the Apple MFi program so we are past that step.)

What we desire is to create a hardware/software eco-system where our users can start our iPad app (yes, it is specific to the iPad and the not iPhone or iPod Touch devices) and the application will automatically discover and link up with any close-proximity hardware that we've developed.

This means that I will need to implement some form of device connection process on both the iPad and within the hardware.

Is there any way to code automatic connectivity to a Bluetooth device from within an iOS application?

I am aware of the Core Bluetooth Framework which has this capability, however, it only works with the new iPhone 4S. That's not an option.

I've also researched about the External Accessory Framework, which can be used to connect to external devices whether they are connected via the iPod port or Bluetooth. This is an option but, if my understanding is correct, our hardware must already be paired with iPad before the iOS software can connect to it. This is less than preferable because although many of our devices may not be in immediate vicinity at one point in time, our customers could potentially own 100's devices that they may desire to connect to with our software.

What are my reasonable options or alternatives? The end goal is to provide a very easy means for our users to be able to connect to our devices, from within our software, on an iPad.

NOTE: I MUST NOT jailbreak the iPad or break any Apple TOS agreements.

UPDATE (3-7-2012) I saw today that the 'New iPad' (as it is being officially called) will be Bluetooth 4.0 capable. I assume this means that this iPad device will be able to use the Core Bluetooth Framework. This doesn't immediately solve my problem because we do want remain compatible with at least the "last generation" iPad device, but this is worth pointing out for others who may be looking for such an answer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拍不死你 2025-01-09 00:11:00

如果不先配对,则无法将 iOS 设备连接到蓝牙设备。 Apple 特意以这种方式构建,以减少有人在用户不知情的情况下连接蓝牙设备的可能性。如果将每个设备配对是不可接受的(听起来确实如此),并且您不想开发加密狗,那么我能看到的唯一剩下的路径就是使您的设备能够像网状网络一样在它们之间中继数据。这样,用户只需与单个设备配对,并且该配对设备将中继其他设备和 iPad 之间的通信。

You cannot connect an iOS device to a bluetooth device without pairing first. It is purposely built that way by Apple to reduce the likelihood that someone could connect a bluetooth device without the user knowing about it. If pairing each device is unacceptable (and it sounds like it is), and you don't want to develop a dongle, the only remaining path I can see is to make your devices capable of relaying data between them like a mesh network. That way the user would only have to pair with a single device, and that paired unit would relay communications between the other devices and the iPad.

酒几许 2025-01-09 00:11:00

您的替代方案之一是使用 Bonjour 进行 WiFi(AdHoc 或基础设施)。例如,您将能够检测附近的设备(如果它正在维护自己的 AdHoc,则通过 SSID;如果它在基础设施网络中,则通过宣布的服务)。一大缺点是您无法直接(从应用程序)连接到设备的网络 - 用户必须手动执行此操作。

至于 BT:最大的缺点是缺乏串行协议(iPhone/iPod/iPad 中未实现)。

One of your alternatives would be going WiFi (AdHoc or Infrastructure) with Bonjour. For example you would be able to detect the device nearby (if it is maintaining it's own AdHoc then by SSID; if it's in infrastructure network then by service being announced). One big drawback would be that you couldn't connect directly (from app) to the device's network - user would have to do it manually.

As for BT: big drawback is lack of a serial protocol (not implemented in iPhone/iPod/iPad).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文