简体   繁体   English

是否可以在iOS 6中获得蓝牙MAC和/或信号强度?

[英]Is it possible to get Bluetooth MAC and/or signal strength in iOS 6?

I am developing a system to locate an iPhone indoors. 我正在开发一种在室内放置iPhone的系统。 I am considering using Bluetooth triangulation based on signal strength. 我正在考虑根据信号强度使用蓝牙三角测量。

  1. Is it possible to get the signal strength of nearby bluetooth devices on iOS 6? 是否可以获取iOS 6上附近蓝牙设备的信号强度?
  2. Is it possible to get the phone's bluetooth MAC (so I can identify the phone and do signal strength measurement from the other side) 是否可以获取手机的蓝牙MAC(所以我可以识别手机并从另一侧进行信号强度测量)
  3. Any other ideas to calculate position of iPhone based on bluetooth triangulation? 还有其他基于蓝牙三角测量计算iPhone位置的想法吗?

It's for a restaurant type app. 适用于餐厅类型的应用。 The restaurant wants to know at which table the phone/app is sitting. 餐厅想知道电话/应用程序坐在哪张桌子上。

If your iOS device supports Bluetooth LE, you can easily obtain the RSSI between it and sensor stations, as well as a UUID for identifying the device. 如果您的iOS设备支持Bluetooth LE,则可以轻松获取其与传感器站之间的RSSI,以及用于识别设备的UUID。 You can also read the MAC address if you're using the right software on your sensor side, but I don't believe that this information is exposed by Core Bluetooth in the same way that RSSI and UUIDs are. 如果您在传感器端使用了正确的软件,您也可以读取MAC地址,但是我不认为Core Bluetooth会以与RSSI和UUID相同的方式公开此信息。

There are two ways to approach triangulation if using Bluetooth LE. 如果使用Bluetooth LE,则有两种方法进行三角测量。 One is to do the triangulation by monitoring the iPhone from a series of placed sensor locations, and the other is to do triangulation on the iPhone itself by reading the signal strength between it and devices that are advertising from known points. 一种是通过从一系列放置的传感器位置监视iPhone来进行三角测量,另一种是通过读取iPhone与从已知点进行广告的设备之间的信号强度来对iPhone本身进行三角测量。

The latter can be done by placing a series of LE peripherals in known locations and having them advertise at regular intervals. 后者可以通过将一系列LE外设放置在已知位置并定期进行广告来实现。 Within the advertisement information, you could stamp the location of that peripheral in the room. 在广告信息中,您可以标记该外围设备在房间中的位置。 The iPhone could read these advertisements, get the RSSI information from them using the -centralManager:didDiscoverPeripheral:advertisementData:RSSI: delegate method, and triangulate its location. iPhone可以读取这些广告,使用-centralManager:didDiscoverPeripheral:advertisementData:RSSI:委托方法从中获取RSSI信息,并对其位置进行三角测量。

The former approach would be a little more involved. 前一种方法会更复杂一些。 It would require that the iPhone itself be placed into an advertising mode using the new iOS 6.0 support for making the iPhone a Bluetooth LE peripheral. 这要求使用新的iOS 6.0支持将iPhone本身置于广告模式,以使iPhone成为Bluetooth LE外围设备。 The sensor locations could then pick up the RSSI from them to the iPhone via these advertisement packets, as well as a UUID you generate for the phone. 然后,传感器位置可以通过这些广告包以及您为手机生成的UUID,将RSSI从它们接收到iPhone。 You can also pick up the MAC address of the phone is running the right software on the sensor nodes. 您还可以选择在传感器节点上运行正确软件的电话的MAC地址。 A central server would then need to combine these readings to triangulate the iPhone's location. 然后,中央服务器将需要结合这些读数来对iPhone的位置进行三角测量。

You might need to experiment with the transmission strength to determine what kind of resolution this would provide. 您可能需要试验传输强度,以确定它将提供什么样的分辨率。 The RSSI information is noisy, and in my experience it only seems to resolve to +-30 feet at the normal transmission levels for my peripherals. RSSI信息很嘈杂,以我的经验,在我的外围设备的正常传输级别上,它似乎只能解析为+ -30英尺。 You may be able to improve upon this with multiple sensor stations and a lower transmission strength. 您可能可以通过多个传感器站和较低的传输强度来改进此功能。

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

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