LLCP面向连接和无连接+ P2P NFC

问题描述 投票:0回答:2

LLCP有两种运输方式:

  • 面向连接
  • 连接

有人知道哪种LLCP运输与以下组合使用:

  • NPP
  • SNEP

NPP只是单向的,因此可能因为确认而与面向连接相结合,但我不知道。 SNEP有确认收到的包裹的确认,所以也许它与无连接LLCP相结合以避免冗余,但我不确定。

我希望你能帮助我,谢谢!

android nfc osi
2个回答
0
投票

我在Google源代码的target.c文件中找到了以下内容:

/*
 * Services a LLCP conversation with a BEAM device, such as Android ICS, or
 * an NPP device, such as Android GB. First attempts to connect on well known
 * SNEP service. If that request is denied, connects to the NPP service by
 * name. Once connected, sends the NDEF record via the available protocol.
 *
 * LLCP is a connection oriented protocol. The state is managed by llcp.c.
 * The basic flow is as follows:
 * 1) Connect on SNEP service (4)
 * 2) If fails, connect on NPP service by name
 * 3) Once connected, send payload via SNEP or NPP
 * 4) If SNEP, wait for acknowledgment (NPP does not ackonwledge)
 * 5) Disconnect
 *
 * Arguments:
 *   resp - Buffer to be reused to receive LLCP commands
 *   resp_len - Size of resp in bytes
 *   ndef - Data to send to peer, e.g. a NDEF record
 *   ndef_len - Length of payload in bytes
 *
 * Returns:
 *   true if all data was passed to peer, false on error or timeout
 */

0
投票

NPP和SNEP都使用面向连接的LLCP通道

© www.soinside.com 2019 - 2024. All rights reserved.