Topic: SCL3711 and Android Beam

Hi,

We're a group of engineering students working on an NFC graduation project. We've been working with the SCM SCL3711 device, and trying to communicate with a Galaxy Nexus running Android 4.0. We've been using both libnfc, libnfc-llcp and tried nfcpy. So far, we haven't been able to exchange NDEF messages between the two devices.

We really want to use libnfc and libnfc-llcp to transfer short messages between two devices.
So far we have installed the AndroidBeam sample program on the phone, which pushes NDEF messages to any nearby Beam-compatible (LLCP?) devices, and tried to run the sample "nexus-get-tag" example program in the libnfc-llcp bundle.

Both devices recognize each other as LLCP devices which is encouraging, but there is no transfer of data.
The following is the LLCP log (running nexus-get-tag):

Connecting to NFC device
Found device
[stdout] TRACE    libnfc-llcp.llc.link - service 0x8396d08 bound to SAP 1
Allocated link structure
Created NPP service
Set link properties
[stdout] TRACE    libnfc-llcp.llc.link - service 0x8396ed0 bound to SAP 16
Bound link and service
Created mac link
Activated mac link as target
[stdout] INFO     libnfc-llcp.mac.link - (SCM Micro / SCL3711-NFC&RW - PN533 v2.7 (0x07)) Attempting to activate LLCP Link as target (blocking)
[stdout] INFO     libnfc-llcp.mac.link - (SCM Micro / SCL3711-NFC&RW - PN533 v2.7 (0x07)) LLCP Link activated (target)
[stdout] TRACE    libnfc-llcp.llc.link - llc_link_configure (0x839ad58, 0xbfa9a925, 10)
[stdout] DEBUG    libnfc-llcp.llc.link - Version: 1.0 (remote)
[stdout] DEBUG    libnfc-llcp.llc.link - Version: 1.0 (agreed)
[stdout] DEBUG    libnfc-llcp.llc.link - WKS: 0x0001
[stdout] DEBUG    libnfc-llcp.llc.link - LTO: 1500 ms (0x96)
[stdout] DEBUG    libnfc-llcp.llc.link - mq_open (/libnfc-llcp-28044-0x839ad58-up)
[stdout] DEBUG    libnfc-llcp.llc.link - mq_open (/libnfc-llcp-28044-0x839ad58-down)
[stdout] INFO     libnfc-llcp.llc.link - LLC Link started successfully
[stdout] INFO     libnfc-llcp.llc.llc - (0xb775db70) Link activated
[stdout] TRACE    libnfc-llcp.llc.llc - (0xb775db70) mq_receive+
[stdout] TRACE    libnfc-llcp.mac.link - Received 2 bytes
[stdout] TRACE    libnfc-llcp.mac.link - Received 2 bytes
[stdout] TRACE    libnfc-llcp.mac.link - Sending 2 bytes
[stdout] TRACE    libnfc-llcp.mac.link - Sending 2 bytes
[stdout] TRACE    libnfc-llcp.llc.llc - (0xb775db70) Received 2 bytes
[stdout] TRACE    libnfc-llcp.llc.llc - (0xb775db70) Symmetry PDU
[stdout] TRACE    libnfc-llcp.llc.llc - (0xb775db70) mq_send+
[stdout] TRACE    libnfc-llcp.llc.llc - (0xb775db70) Nothing to send
[stdout] TRACE    libnfc-llcp.llc.llc - (0xb775db70) mq_receive+
[stdout] FATAL    libnfc-llcp.mac.link - MAC Level error on PDU reception
[stdout] WARN     libnfc-llcp.mac.link - pdu_receive returned -1
[stdout] ERROR    libnfc-llcp.mac.link - NFC error: Target Released
[stdout] TRACE    libnfc-llcp.mac.link - Waiting for MAC Link PDU exchange thread to exit
[stdout] TRACE    libnfc-llcp.mac.link - MAC Link exchange PDU exchange thread terminated (returned 0)
[stdout] INFO     libnfc-llcp.llc.link - Freeing service 16
[stdout] INFO     libnfc-llcp.llc.link - Freeing service 1

Especially the following line concerns us:

[stdout] FATAL    libnfc-llcp.mac.link - MAC Level error on PDU reception

The way we know it's not working, is that it's supposed to write the NDEF message to a file, which it isn't.

I realize this seems to be more of a question to libnfc-llcp than libnfc, but this seems the best place to ask. Does anyone have any experience with this setup, or have an idea what could be wrong? This problem has been hassling us for months, and is quite critical in our project.

Thanks for your time!

Re: SCL3711 and Android Beam

Well, of course, as soon as I get around to posting on here, I found the problem. The default timeout for the LLCP link was too low, so the link was closed before the Android app could send an NDEF message.

I increased it, and while it still didn't work with the Galaxy Nexus (Android 4.0), it worked with a Nexus S running Android 2.3.

I still need it to work with Android 4.0, which apparently means I need to add SNEP support on top of LLCP. I know this isn't supported by either libnfc or libnfc-llcp, does anyone know if this is being worked on?

Re: SCL3711 and Android Beam

Hi!

I just added support for SCL 3711 in my NDEF Push / Android Beam Applet at http://www.grundid.de/nfc

SNEP it is the default protocol in ICS (Android 4), but you can reject a SNEP connection on the LLCP layer and ICS will fall back to NDEF Push.

Last edited by nitegate (2012-01-29 16:14:47)