1 (edited by gaplee 2013-12-05 11:49:38)

Topic: Use libnfc+libllcp+PN532 to communicate with Android.

npp-client example of libllcp does not work with my Nexus 4. Dig it a bit more.
Add a small SNEP client and server example. i fork the libllcp to github.
More info is on :
github.com/jiapengli/libllcp 

sorry, i don't have the permission to post url here.

2 (edited by palhinhaa 2014-06-18 18:25:38)

Re: Use libnfc+libllcp+PN532 to communicate with Android.

Hello,

Thank you for the snep examples,

im trying to use the snep-client to stablish a connection between android (Samsung Galaxy S3 with Android 4.3) and a reader (PN532) but with no success.

The snep-server works well, the link is stablished and the Symmetry PDU's are changed between the phone and the reader.

With the snep-client, the reader cant send the Symmetry PDU's, so it timeout's, i have increased the timeout values but same result.

The output is here:

libllcp.llc.link        llc_link_new function
libllcp.llc.link        service 0x186b698 bound to SAP 1
libllcp.llc.link        service 0x1866940 bound to SAP 32
libllcp.llc.connection  socketpair
libllcp.mac.link        (pn532_spi:/dev/spidev0.0) Attempting to activate LLCP Link as initiator
libllcp.mac.link        (pn532_spi:/dev/spidev0.0) nfc_initiator_init() succeeded
libllcp.mac.link        (pn532_spi:/dev/spidev0.0) nfc_initiator_poll_dep_target() succeeded
libllcp.mac.link        (pn532_spi:/dev/spidev0.0) LLCP Link activated (initiator)
libllcp.llc.link        llc_link_configure (0x186b420, (nil), 0)
libllcp.llc.link        socketpair
libllcp.llc.link        LLC Link started successfully
libllcp.llc.connection  socketpair
libllcp.llc.llc (0xb6dc7470) Link activated
libllcp.llc.llc (0xb6dc7470) socket recv+
libllcp.mac.link        Sending 2 bytes
libllcp.mac.link        LTOs: 1000 ms (local), 100 ms (remote)
error   libnfc.driver.pn532_spi Unable to wait for SPI data. (RX)
libllcp.mac.link        Could not send 2 bytes
libllcp.mac.link        TX: 00 00
libllcp.mac.link        DSAP: 00, PTYPE: SYMM(00), SSAP: 00
libllcp.mac.link        Bootstrap failed.
libllcp.llc.link        Deactivating LLC Link
libllcp.llc.link        The LLC Link has an active MAC link
libllcp.mac.link        MAC Link deactivation requested (reason: 0)
libllcp.llc.link        Back to LLC Link deactivation
libllcp Try to stop thread (-1227066256)
libllcp.llc.llc (0xb6dc7470) Thread quit
libllcp Thread (-1227066256) stopped
libllcp.llc.link        Stopping Data Link Connection [-1225585764 -> 0]
libllcp.llc.connection  Stopping Data Link Connection [32 -> 4]
libllcp.llc.connection  Freeing Data Link Connection [32 -> 4]
libllcp.llc.link        Data Link Connection [-1225585764 -> 0] stopped
libllcp.llc.link        LLC Link deactivated
libllcp.llc.link        Deactivating LLC Link
libllcp.llc.link        LLC Link deactivated
libllcp.llc.link        Freeing service 32
libllcp.llc.link        Freeing service 1
error   libnfc.driver.pn532_spi Unable to wait for SPI data. (RX)

Someone could give me a hint to try understanding what is going wrong?

Thank you

Re: Use libnfc+libllcp+PN532 to communicate with Android.

I want to known that the PN532 how to connect with Android phone ,how to use llcp ?