ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Android11 SDP

2021-10-22 15:05:52  阅读:214  来源: 互联网

标签:服务 service Android11 client services SDP 客户端


SDP 服务介绍


以下文档来自于bt core_V5.2.pdf 蓝牙服务介绍 1.1 GENERAL DESCRIPTION The Service Discovery protocol (SDP) provides a means for applications to discover which services are available and to determine the characteristics of those available services.
1.1服务发现协议(SDP)为应用程序提供了一种方法来发现哪些是可用的服务,并确定这些可用服务的特征。
1.2 MOTIVATION Service discovery in the Bluetooth environment, where the set of services that are available changes dynamically based on the RF proximity of devices in motion, is qualitatively different from service discovery in traditional network based environments. The Service Discovery protocol defined in this Part is intended to address the unique characteristics of the Bluetooth environment. See Appendix A for further information on this topic.
1.2蓝牙环境中的服务发现,其中可用的服务集基于运动设备的射频接近度动态变化,与传统基于网络的环境中的服务发现本质上不同。本部分中定义的服务发现协议旨在解决蓝牙环境的独特特性。有关本主题的更多信息,请见附录A。
1.3 REQUIREMENTS The following capabilities have been identified as requirements for version 1.0 of the Service Discovery Protocol. 1. SDP shall provide the ability for clients to search for needed services based on specific attributes of those services. 2. SDP shall permit services to be discovered based on the class of service. 3. SDP shall enable browsing of services without a priori knowledge of the specific characteristics of those services. 4. SDP shall provide the means for the discovery of new services that become available when devices enter RF proximity with a client device as well as when a new service is made available on a device that is in RF proximity with the client device. 5. SDP shall provide a mechanism for determining when a service becomes unavailable when devices leave RF proximity with a client device as well as when a service is made unavailable on a device that is in RF proximity with the client device. 6. SDP shall provide for services, classes of services, and attributes of services to be uniquely identified. 7. SDP shall allow a client on one device to discover a service on another device without consulting a third device. 8. SDP should be suitable for use on devices of limited complexity. 9. SDP shall provide a mechanism to incrementally discover information about the services provided by a device. This is intended to minimize the quantity of data that must be exchanged in order to determine that a particular service is not needed by a client. 10.SDP should support the caching of service discovery information by intermediary agents to improve the speed or efficiency of the discovery process. 11.SDP should be transport independent. 12.SDP shall function while using L2CAP as its transport protocol. 13.SDP shall permit the discovery and use of services that provide access to other Service Discovery protocols. 14.SDP shall support the creation and definition of new services without requiring registration with a central authority
1.3要求以下功能已被确定为服务发现协议的1.0版本的要求。 1.SDP应为客户端提供根据这些服务的特定属性搜索所需服务的能力。 2.SDP应允许根据服务类别发现服务。 3.SDP应允许在不事先了解这些服务的具体特征的情况下浏览这些服务。 4.SDP应提供发现当设备与客户端设备接近射频时,以及在设备与客户端设备接近射频时提供可用的新服务的手段。 5.SDP应提供一种机制,用于确定当设备与客户端设备接近时服务何时不可用,以及在与客户端设备接近的设备上服务何时不可用。 6.SDP应提供要被唯一标识的服务、服务类别和服务属性。 7.SDP应允许一个设备上的客户端在不咨询第三个设备的情况下发现另一个设备上的服务。 8.SDP应适用于在复杂性有限的设备上使用。 9.SDP应提供一种机制,以逐步发现有关设备提供的服务的信息。这是为了尽量减少为了确定客户端不需要特定的服务而必须交换的数据量。 10.SDP应该支持通过中介代理缓存服务发现信息,以提高发现过程的速度或效率。 11.SDP应独立于运输。 12.SDP应使用L2CAP作为其传输协议。 13.SDP应允许发现和使用提供访问其他服务发现协议的服务。 14.SDP应支持创建和定义新的服务,而不需要向中心授权。
2 OVERVIEW 2.1 SDP CLIENT-SERVER ARCHITECTURE The service discovery mechanism provides the means for client applications to discover the existence of services provided by server applications as well as the attributes of those services. The attributes of a service include the type or class of service offered and the mechanism or protocol information needed to utilize the service.
服务发现机制为客户端应用程序提供了发现服务端应用程序提供的服务的存在以及这些服务的属性的方法。服务的属性包括所提供服务的类型或类别,以及利用该服务所需的机制或协议信息。
SDP involves communication between an SDP server and an SDP client. The server maintains an SDP database which consists of a list of service records that describe the characteristics of services associated with the server. Each service record contains information about a single service. A client can retrieve information from a service record maintained by the SDP server by issuing an SDP request.
SDP涉及到SDP服务器和SDP客户端之间的通信。服务器维护一个SDP数据库,该数据库由描述与服务器相关联的服务特性的服务记录列表组成。 每个服务记录都包含有关单个服务的信息。 客户端可以通过发出SDP请求来从SDP服务器维护的服务记录中检索信息。
If the client, or an application associated with the client, decides to use a service, it opens a separate connection to the service provider in order to utilize the service. SDP provides a mechanism for discovering services and their attributes (including associated service access protocols), but it does not provide a mechanism for utilizing those services (such as delivering the service access protocols).
如果客户端或与客户端关联的应用程序决定使用服务,那么它将打开与服务提供商的单独连接,以利用该服务。SDP提供了一种发现服务及其属性的机制(包括相关的服务访问协议),但它不提供利用这些服务的机制(例如提供服务访问协议)。
If multiple applications on a device provide services, an SDP server can act on behalf of those service providers to handle requests for information about the services that they provide. Similarly, multiple client applications can utilize an SDP client to query servers on behalf of the client applications. The set of SDP servers that are available to an SDP client will change dynamically based on the RF proximity of the servers to the client. When a server becomes available, a potential client must be notified by a means other than SDP so that the client can use SDP to query the server about its services. Similarly, when a server leaves proximity or becomes unavailable for any reason, there is no explicit notification via the Service Discovery protocol. However, the client can use SDP to poll the server and may infer that the server is not available if it no longer responds to requests. Additional information regarding application interaction with SDP shall be contained in the Bluetooth Service Discovery Profile document.
如果一个设备上的多个应用程序提供服务,则SDP服务器可以代表这些服务提供者来处理有关他们所提供的服务的信息的请求。类似地,多个客户端应用程序可以利用一个SDP客户端代表该客户端应用程序查询服务器。 对SDP客户端可用的SDP服务器集将根据服务器与客户端的射频接近程度进行动态更改。当服务器可用时,必须通过SDP以外的方式通知潜在客户端,以便客户端可以使用SDP查询服务器关于其服务。类似地,当服务器保持接近或由于任何原因不可用时,就不会通过服务发现协议发出显式通知。但是,客户端可以使用SDP来轮询服务器,如果服务器不再响应请求,则可能推断出服务器不可用。 关于应用程序与SDP交互的其他信息应包含在蓝牙服务发现配置文件文档中。

 

4 PROTOCOL DESCRIPTION SDP is a simple protocol with minimal requirements on the underlying transport. It can function over a reliable packet transport (or even unreliable, if the client implements timeouts and repeats requests as necessary). SDP uses a request/response model where each transaction consists of one request protocol data unit (PDU) and one response PDU. In the case where SDP is used with the Bluetooth L2CAP transport protocol, no more than one SDP request PDU per connection to a given SDP server shall be outstanding at a given instant. In other words, a client shall wait for a response to its current request before issuing another request on the same L2CAP connection. Limiting SDP to sending one unacknowledged request PDU provides a simple form of flow control. The protocol examples found in Appendix B could be helpful in understanding the protocol transactions.
        SDP是一个简单的协议,对底层传输的要求最小。         它可以通过可靠的数据包传输来运行(如果客户端在必要时实现超时和重复请求,甚至是不可靠的)。SDP使用一个请求/响应模型,其中每个事务由一个请求协议数据单元(PDU)和一个响应PDU组成。         在SDP与蓝牙L2CAP传输协议一起使用的情况下,每个连接到给定SDP服务器的SDP即时应不超过一个SDP请求PDU。换句话说,客户端应等待对其当前请求的响应,然后对同一L2CAP连接发出另一个请求。将SDP限制为发送一个未确认的请求PDU提供了一种简单的流控制形式。在附录B中找到的协议示例可能有助于理解协议事务。

标签:服务,service,Android11,client,services,SDP,客户端
来源: https://blog.csdn.net/gang542725/article/details/120904558

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有