English 中文(简体)
Iphone(ios 5.0) 蓝牙低能:无法从设备获取数据
原标题:Iphone(ios 5.0) Bluetooth Low Energy: can not get data from the device

我得到了蓝牙低能量心速监测仪 使用蓝牙核心图5.0的框架。但有时我遇到以下的问题。

1) 有时当我开始扫描(使用 scanForPerifferals with Services 方法)时,它无法发现任何 BLE(蓝牙低能) 设备, 直到我关掉并手动打开 Iphone Bluotos 。 如果蓝牙关闭并打开不起作用, 我不得不重新启用手机 。

2) 有时,当我试图连接我先前存储 UUID 的设备时,我能够连接到设备,即 没有ConnectPeperpheral 代表法被调用,但是它从未发现任何服务,尽管我叫[外围发现服务:nil] ,即我无法从代表法 Discover Services 中从设备获取任何数据。为此我不得不重新启用电话。

最佳回答

Try checking the archives here: http://lists.apple.com/archives/bluetooth-dev

如果你找不到,请把问题发到那里。许多苹果蓝牙工程师回答邮件列表上的问题。

问题回答

1) It has something to do with the pairing routine on bluetooth low energy and the iPhone. The iPhone changes its ID every interval, I don t know how often, but it does. Have you tried just resetting/rebooting the slave device? This often works for me. The slave device also has a limited broadcast period, e.g 20-30 seconds.

2) Again, check that you have reset the slave. I don t know if you have built the device your self or bought a heart rate belt, but this is most often the solution. Oh and by the way, I had an issue where the didDiscoverServices actually jumped over an if-sentence, where I checked for a specific service. This did not fix it self until I rebooted the phone. Really weird behaviour, but I haven t found any other solution to this yet.





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签