ios - 核心蓝牙 : what is the Service UUID FFE0 shorten for?
<p><p>我正在做一个项目,将 <strong>iOS</strong> 与配备 <strong>Bluetooth 4.0</strong> 的设备连接起来。</p>
<p>设备是从第三方购买的。 (我的 iPhone 作为中心角色)连接后,我打印它的 <strong>UUID</strong>。</p>
<pre><code> for (CBService *service in peripheral.services) {
NSLog(@"service :%@", service);
NSLog(@"service uuid %@", service.UUID);
;
}
</code></pre>
<p>输出是</p>
<pre><code>2015-01-13 10:09:03.474 TestBTCC service :<CBService: 0x17406f000, isPrimary = YES, UUID = FFE0>
2015-01-13 10:09:03.474 TestBTCC service uuid FFE0
</code></pre>
<p><strong>UUID</strong> 应为 128 位。而16bit应该是一些预定义的<strong>UUID</strong>的缩短格式。这是什么?</p>
<p>根据<a href="https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/PerformingCommonPeripheralRoleTasks/PerformingCommonPeripheralRoleTasks.html#//apple_ref/doc/uid/TP40013257-CH4-SW8" rel="noreferrer noopener nofollow">https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/PerformingCommonPeripheralRoleTasks/PerformingCommonPeripheralRoleTasks.html#//apple_ref/doc/uid/TP40013257-CH4-SW8</a> ,我可以使用预定义的缩短16bit来生成<strong>CBUUID</strong>,比如</p>
<pre><code> CBUUID *heartRateServiceUUID = ;
</code></pre>
<p>我可以直接写吗:</p>
<pre><code> CBUUID *heartRateServiceUUID = ;
</code></pre>
<p>不管是什么意思?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>FFE0 是一个温度特性,您将没有对该特性的写入权限,并且温度将以摄氏度为单位读出。您可以阅读特征或订阅其更新。</p>
<p>更多信息可以找到<a href="http://support.connectblue.com/pages/viewpage.action?pageId=23035914" rel="noreferrer noopener nofollow">here</a> .</p></p>
<p style="font-size: 20px;">关于ios - 核心蓝牙 : what is the Service UUID FFE0 shorten for?,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/27914223/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/27914223/
</a>
</p>
页:
[1]