草庐IT

ios - 在哪里可以找到 Core Bluetooth 的 Apple iOS 错误列表?

coder 2023-09-25 原文

我现在正在测试生命周期/稳健性问题,需要调试偶尔出现的核心蓝牙错误,例如 #242。

Apple 是否列出了每个核心蓝牙错误的含义?

最佳答案

通常,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 存在某些会显示任意错误代码的问题。比如你作为外设app在一定时间内没有响应请求,那么返回的错误码没有任何意义。

真正的错误代码总是只在打印到控制台的警告中可见。 NSError 没有提供我目前遇到的任何 CoreBluetooth 情况下的任何详细信息。

关于ios - 在哪里可以找到 Core Bluetooth 的 Apple iOS 错误列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19117512/

有关ios - 在哪里可以找到 Core Bluetooth 的 Apple iOS 错误列表?的更多相关文章

  1. ruby - 为什么我可以在 Ruby 中使用 Object#send 访问私有(private)/ protected 方法? - 2

    类classAprivatedeffooputs:fooendpublicdefbarputs:barendprivatedefzimputs:zimendprotecteddefdibputs:dibendendA的实例a=A.new测试a.foorescueputs:faila.barrescueputs:faila.zimrescueputs:faila.dibrescueputs:faila.gazrescueputs:fail测试输出failbarfailfailfail.发送测试[:foo,:bar,:zim,:dib,:gaz].each{|m|a.send(m)resc

  2. ruby-on-rails - Rails 常用字符串(用于通知和错误信息等) - 2

    大约一年前,我决定确保每个包含非唯一文本的Flash通知都将从模块中的方法中获取文本。我这样做的最初原因是为了避免一遍又一遍地输入相同的字符串。如果我想更改措辞,我可以在一个地方轻松完成,而且一遍又一遍地重复同一件事而出现拼写错误的可能性也会降低。我最终得到的是这样的:moduleMessagesdefformat_error_messages(errors)errors.map{|attribute,message|"Error:#{attribute.to_s.titleize}#{message}."}enddeferror_message_could_not_find(obje

  3. ruby - 使用 Vim Rails,您可以创建一个新的迁移文件并一次性打开它吗? - 2

    使用带有Rails插件的vim,您可以创建一个迁移文件,然后一次性打开该文件吗?textmate也可以这样吗? 最佳答案 你可以使用rails.vim然后做类似的事情::Rgeneratemigratonadd_foo_to_bar插件将打开迁移生成的文件,这正是您想要的。我不能代表textmate。 关于ruby-使用VimRails,您可以创建一个新的迁移文件并一次性打开它吗?,我们在StackOverflow上找到一个类似的问题: https://sta

  4. ruby - 我可以使用 Ruby 从 CSV 中删除列吗? - 2

    查看Ruby的CSV库的文档,我非常确定这是可能且简单的。我只需要使用Ruby删除CSV文件的前三列,但我没有成功运行它。 最佳答案 csv_table=CSV.read(file_path_in,:headers=>true)csv_table.delete("header_name")csv_table.to_csv#=>ThenewCSVinstringformat检查CSV::Table文档:http://ruby-doc.org/stdlib-1.9.2/libdoc/csv/rdoc/CSV/Table.html

  5. ruby - RVM 使用列表[0] - 2

    是否有类似“RVMuse1”或“RVMuselist[0]”之类的内容而不是键入整个版本号。在任何时候,我们都会看到一个可能包含5个或更多ruby的列表,我们可以轻松地键入一个数字而不是X.X.X。这也有助于rvmgemset。 最佳答案 这在RVM2.0中是可能的=>https://docs.google.com/document/d/1xW9GeEpLOWPcddDg_hOPvK4oeLxJmU3Q5FiCNT7nTAc/edit?usp=sharing-知道链接的任何人都可以发表评论

  6. ruby - 我可以使用 aws-sdk-ruby 在 AWS S3 上使用事务性文件删除/上传吗? - 2

    我发现ActiveRecord::Base.transaction在复杂方法中非常有效。我想知道是否可以在如下事务中从AWSS3上传/删除文件:S3Object.transactiondo#writeintofiles#raiseanexceptionend引发异常后,每个操作都应在S3上回滚。S3Object这可能吗?? 最佳答案 虽然S3API具有批量删除功能,但它不支持事务,因为每个删除操作都可以独立于其他操作成功/失败。该API不提供任何批量上传功能(通过PUT或POST),因此每个上传操作都是通过一个独立的API调用完成的

  7. ruby-on-rails - 迷你测试错误 : "NameError: uninitialized constant" - 2

    我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test

  8. ruby-on-rails - 如何在 Rails View 上显示错误消息? - 2

    我是rails的新手,想在form字段上应用验证。myviewsnew.html.erb.....模拟.rbclassSimulation{:in=>1..25,:message=>'Therowmustbebetween1and25'}end模拟Controller.rbclassSimulationsController我想检查模型类中row字段的整数范围,如果不在范围内则返回错误信息。我可以检查上面代码的范围,但无法返回错误消息提前致谢 最佳答案 关键是您使用的是模型表单,一种显示ActiveRecord模型实例属性的表单。c

  9. 使用 ACL 调用 upload_file 时出现 Ruby S3 "Access Denied"错误 - 2

    我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file

  10. ruby-on-rails - 错误 : Error installing pg: ERROR: Failed to build gem native extension - 2

    我克隆了一个rails仓库,我现在正尝试捆绑安装背景:OSXElCapitanruby2.2.3p173(2015-08-18修订版51636)[x86_64-darwin15]rails-v在您的Gemfile中列出的或native可用的任何gem源中找不到gem'pg(>=0)ruby​​'。运行bundleinstall以安装缺少的gem。bundleinstallFetchinggemmetadatafromhttps://rubygems.org/............Fetchingversionmetadatafromhttps://rubygems.org/...Fe

随机推荐