2013-01-03 66 views
0

在LLCP有2種傳輸可能性:LLCP面向連接和無連接+ P2P NFC

  • 連接

是否有人知道哪種這個LLCP的傳輸使用面向連接的結合:

  • NPP
  • SNEP

NPP只是單向的,所以也許它是與面向連接相結合的,因爲有確認,但我不知道。 SNEP對確認收到的軟件包有此確認,因此可能它與無連接LLCP結合以避免冗餘,但我不確定。

我希望你能幫助我, 謝謝!

回答

0

我發現谷歌的源代碼文件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通道