4
A
回答
3
通常,CoreBluetooth使用Bluetooth Core Spec V4.0 Vol 3 Part F Sec 3.4.1.1 Table 3.3 Error Codes中定義的標準錯誤代碼。
Error
Name Code Description
==============================================================================
Invalid Handle 0x01 The attribute handle given was not valid on
this server.
Read Not Permitted 0x02 The attribute cannot be read.
Write Not Permitted 0x03 The attribute cannot be written.
Invalid PDU 0x04 The attribute PDU was invalid.
Insufficient Authentication 0x05 The attribute requires authentication
before it can be read or written.
Request Not Supported 0x06 Attribute server does not support the
request received from the client.
Invalid Offset 0x07 Offset specified was past the end of the
attribute.
Insufficient Authorization 0x08 The attribute requires authorization before
it can be read or written.
Prepare Queue Full 0x09 Too many prepare writes have been queued.
Attribute Not Found 0x0A No attribute found within the given
attribute handle range.
Attribute Not Long 0x0B The attribute cannot be read or written
using the Read Blob Request
Insufficient Encryption Key 0x0C The Encryption Key Size used for encrypting
Size this link is insufficient.
Invalid Attribute Value 0x0D The attribute value length is invalid for
Length the operation.
Unlikely Error 0x0E The attribute request that was requested
has encountered an error that was unlikely,
and therefore could not be completed as
requested.
Insufficient Encryption 0x0F The attribute requires encryption before it
can be read or written.
Unsupported Group Type 0x10 The attribute type is not a supported
grouping attribute as defined by a higher
layer specification.
Insufficient Resources 0x11 Insufficient Resources to complete the
request
Reserved 0x012 – 0x7F Reserved for future use.
Application Error 0x80 – 0xFF Application error code defined by a higher
layer specification.
請注意,iOS有一些問題,出現任意的錯誤代碼。例如,如果您在特定時間內未能作爲外設應用程序回覆請求,則返回的錯誤代碼沒有任何意義。
真正的錯誤代碼始終僅在打印到控制檯的警告中可見。在任何情況下,NSError都沒有提供我迄今爲止遇到的CoreBluetooth的詳細信息。
2
Apple的文檔包含一個列表CoreBluetooth Constants,其中包含您將從框架收到的大多數錯誤代碼。
我也開始Wikia site for CoreBluetooth收集有關人們遇到特定errors的情況下的其他信息。
相關問題
- 1. 哪裏可以找到iOS 6的文檔核心藍牙
- 2. 核心藍牙ios 8
- 3. 我在哪裏可以找到WordPress的核心功能列表和說明?
- 4. 我在哪裏可以找到typo3 4.4的核心文檔?
- 5. 哪裏可以找到iOS8的文檔藍牙
- 6. 我在哪裏可以找到JavaScript核心庫?
- 7. 我在哪裏可以找到iOS平臺功能列表?
- 8. iOS 7中的核心藍牙故障
- 9. 核心藍牙的問題
- 10. ASP.NET錯誤在哪裏可以找到?
- 11. 我在哪裏可以找到Apple的標準源列表/側欄圖標?
- 12. 如何/在哪裏可以找到Linux內核錯誤修復?
- 13. System.IO.FileNotFoundException。我在哪裏可以找到哪條路是錯誤的?
- 14. 在哪裏可以找到ADO.NET Entity Framework錯誤列表?
- 15. iOS核心藍牙不要求配對
- 16. 核心藍牙和applicationWillTerminate:
- 17. 我在哪裏可以找到詳細的Apple App Store政策?
- 18. 我在哪裏可以找到Apple Developer程序的註冊ID?
- 19. 我在哪裏可以找到Apple TV文檔的iOS雙屏顯示?
- 20. 我在哪裏可以找到我的Angular 2 CLI TypeScript錯誤?
- 21. 在哪裏可以找到我的DB2
- 22. 核心藍牙內的可寫特性
- 23. 哪裏可以找到Linux核心命令的源代碼?
- 24. 我在哪裏可以找到Apple CrashLanding示例應用程序?
- 25. 我可以在哪裏找到BlueSnap Apple Pay集成文檔?
- 26. 我在哪裏可以找到JSHint數字錯誤代碼的列表?
- 27. 我在哪裏可以找到Actionscript錯誤編號及其描述的列表?
- 28. 我在哪裏可以找到MySQL的SQLException錯誤代碼列表?
- 29. Android藍牙我在哪裏可以獲得UUID?
- 30. 哪裏可以找到這個錯誤?
這是很棒的信息!我不知道藍牙規範中有一個預定義的錯誤列表,但是有一個是有道理的,而CB將主要使用它們。 – cbowns