简体   繁体   English

iOS App与Atmega 1284微处理器之间通过蓝牙进行的App间通信

[英]Inter App Communication between iOS App and Atmega 1284 microprocessor via bluetooth

What I am trying to accomplish: User enters a password on the iOS app. 我要完成的工作:用户在iOS应用上输入密码。 If the password is correct, then send a one bit value to the microprocessor that indicates the user got the right password. 如果密码正确,则向微处理器发送一个一位的值,指示用户输入了正确的密码。 The microprocessor can then start up the step motor to open the door latch. 然后,微处理器可以启动步进电机以打开门闩。

Has anyone tried to achieve this before? 有人尝试过实现这一目标吗? If so, can you please point me in a general direction. 如果是这样,请您指出我的大致方向。 I don't know how to approach this problem. 我不知道如何解决这个问题。 I couldn't really find a tutorial for this. 我真的找不到这个教程。 My questions are: 我的问题是:

  1. Is there a specific Bluetooth I need to purchase? 我需要购买特定的蓝牙吗? such as only BLE devices 例如仅BLE设备

  2. I see a lot of examples of Bluetooth communication between iOS and Ardunio. 我看到了很多iOS与Ardunio之间的蓝牙通信示例。 Would the execution of events be similar for my needs? 事件的执行是否可以满足我的需求?

  3. Is there another approach to my problem? 还有其他解决我的问题的方法吗? rather than using Bluetooth? 而不是使用蓝牙?

I think reading the Core Bluetooth Programming Guide is a great start. 我认为阅读《 核心蓝牙编程指南》是一个很好的开始。 However, this assumes the device you're connecting to is using Bluetooth 4.x which is widely known as Bluetooth Low Energy (BLE). 但是,这假设您要连接的设备使用的是Bluetooth 4.x,即众所周知的Bluetooth Low Energy(BLE)。 If the device you're connecting to is using Bluetooth 2.x, you'll have to use the External Accessories Framework . 如果要连接的设备使用的是Bluetooth 2.x,则必须使用“ 外部附件框架”

EA supports only devices that have been certified MFI (Made for iPhone) by Apple. EA仅支持经过Apple认证的MFI (iPhone制造)设备。

To make a long story short, if the device you're trying to connect to is Bluetooth 2.x and it's not MFI, you're basically SOL . 简而言之,如果您要连接的设备是Bluetooth 2.x,而不是MFI,则基本上是SOL

Otherwise, you can start connecting to that device pretty easily. 否则,您可以轻松地开始连接到该设备。 Check out LightBlue as a way to test if you connect to the device. 请检查LightBlue ,以测试是否连接到设备。 It will work with any BLE device. 它适用于任何BLE设备。

Here's a simple tutorial to get you going with Core Bluetooth. 这是一个简单的教程 ,可帮助您开始使用Core Bluetooth。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM