iPhone 中的蓝牙编程
我计划开发一个 iPhone 应用程序,使用蓝牙将文件/数据传输到 Windows 桌面或从 Windows 桌面传输文件/数据。
请告诉我 iPhone SDK 中是否提供用于此目的的编程接口 (SDK)。
在 Windows Mobile 中,我可以使用 FTP 配置文件或在串行端口配置文件 (RFComm) 之上编写应用程序来传输文件。
谁能告诉我,通过编写适当的应用程序,这是否可以在 iPhone 上实现。如果没有,请告诉我通过蓝牙将文件/数据从 iPhone 传输到 Windows 台式电脑的替代方法。
I am planning to develop an iPhone application to transfer files/data to/from my Windows Desktop using Bluetooth.
Please let me know whether the programming interface(SDK)is available in iPhone SDK for this purpose.
In Windows Mobile, I can transfer the file either using a FTP profile or writing application on top of Serial Port Profile(RFComm).
Can anybody tell me, whether this can be possible with an iPhone by writing appropriate application. If not, please let me know alternative way to transfer files/data over bluetooth from iPhone to a Windows Desktop PC.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不,FTP 或 SPP 蓝牙配置文件未在 iPhone 中打开...
No, FTP or SPP bluetooth profile are not open in iPhone...
如果您进入为 ipod 制作的程序,您可能会为计算机开发一个蓝牙适配器(它不能使用计算机内置的普通适配器,因为它需要定制的苹果芯片进行编码)。这是唯一可以通过蓝牙执行您想要的操作并将您的应用程序放入应用程序商店的方法。您可以通过 wifi 更轻松地实现类似的功能。
If you get into the made for ipod program, you might develop a bluetooth dongle for a computer (it can't use the normal one built into the computer as it needs a custom apple chip for encoding). This is the only method that could do something like what you want over bluetooth and get your app into the app store. You can implement a similar functionality more readily over wifi.
是的,你可以。使用人机接口设备配置文件,让您的 USB 设备假装成键盘。然后,您可以让您的应用程序接收来自“键盘”的文本输入。只需将您的数据编码为 ASCII 编码的十六进制或 Base 64 并传输即可。您的应用程序是否被允许进入应用程序商店是另一回事。
Yes you can. Use the Human Interface Device profile, and have your USB device pretend to be a keyboard. You can then have your app receive text input from the "keyboard". simply encode your data as ASCII encoded hex or base 64 and transmit. Whether or not your app would be allowed in the app store is a different matter.
使用 iOS BT Classic 通过 RFCOMM 进行数据传输有 2 个要求。
1) 您需要注册Apple MFi 计划。
2) 连接到iPhone的BT配件需要有一个特殊的硬件芯片,称为“MFi Coprocessor”。
如果您正在为 BT 配件开发固件,则需要满足这两个要求。
当你编写 iOS 应用程序时,需要后一个。
顺便说一句,除非您有内置 MFi 芯片的 BT 适配器,否则您将无法与 Windows 计算机通信 - 请参阅第二个要求。
There are 2 requirements to use iOS BT Classic for data transmission over RFCOMM.
1) You need to be enrolled in Apple MFi program.
2) The BT accessory which will be connected to iPhone needs to have a special HW chip called "MFi Coprocessor".
Both requirements need to be satisfied if you are developing FW for the BT accessory.
The latter one is required when you are coding iOS app.
BTW, you will not be able to communicate with Windows machine unless you have a BT dongle with MFi chip inside - see the second requirement.