Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NFC can't send data Android 4.0.3

I have an NFC Device (SCL3711) and Google Nexus S phone. I have write an application which send data from the phone to NFC Device and vice versa. Everything works excellent on Android 2.3.3. Now I update my Nexus S operating System to 4.0.3 Ice Cream Sandwich and everything stops working. Now I can't send data from my phone to NFC Device and vice versa. As I can understand the main reason is that I cant connect to the device, but why I can't understand.

Please, help me, provide some links or information consider to this question. Everything can be helpful for me.

Phone Log

01-25 13:12:42.629: DEBUG/NFC JNI(23320): Discovered P2P Initiator
01-25 13:12:42.629: DEBUG/NFC JNI(23320): 46 
01-25 13:12:42.629: DEBUG/NFC JNI(23320): 66 
01-25 13:12:42.629: DEBUG/NFC JNI(23320): 6d 
01-25 13:12:42.629: DEBUG/NFC JNI(23320): 01 
01-25 13:12:42.629: DEBUG/NFC JNI(23320): 01 
01-25 13:12:42.629: DEBUG/NFC JNI(23320): 10 
01-25 13:12:42.629: DEBUG/NFC JNI(23320): 02 
01-25 13:12:42.629: DEBUG/NFC JNI(23320): 02 
01-25 13:12:42.629: DEBUG/NFC JNI(23320): 00 
01-25 13:12:42.629: DEBUG/NFC JNI(23320): 00 
01-25 13:12:42.633: DEBUG/NFC JNI(23320): 03 
01-25 13:12:42.633: DEBUG/NFC JNI(23320): 02 
01-25 13:12:42.633: DEBUG/NFC JNI(23320): 00 
01-25 13:12:42.633: DEBUG/NFC JNI(23320): 03 
01-25 13:12:42.633: DEBUG/NFC JNI(23320): 04 
01-25 13:12:42.633: DEBUG/NFC JNI(23320): 01 
01-25 13:12:42.633: DEBUG/NFC JNI(23320): 64 
01-25 13:12:42.633: DEBUG/NFC JNI(23320): 07 
01-25 13:12:42.633: DEBUG/NFC JNI(23320): 01 
01-25 13:12:42.633: DEBUG/NFC JNI(23320): 03 
01-25 13:12:42.688: DEBUG/NfcService(23320): LLCP Activation message
01-25 13:12:42.688: INFO/NFC JNI(23320): LLCP Link activated (LTO=100, MIU=128, OPTION=0x03, WKS=0x03)
01-25 13:12:42.688: INFO/NfcP2pLinkManager(23320): LLCP activated
01-25 13:12:42.692: DEBUG/NfcP2pLinkManager(23320): onP2pInRange()
01-25 13:12:42.704: DEBUG/AudioHardware(82): AudioHardware pcm playback is exiting standby.
01-25 13:12:42.704: DEBUG/AudioHardware(82): openPcmOut_l() mPcmOpenCnt: 0
01-25 13:12:42.793: DEBUG/dalvikvm(23320): GC_FOR_ALLOC freed 2291K, 27% free 12018K/16327K, paused 51ms
01-25 13:12:42.793: INFO/dalvikvm-heap(23320): Grow heap (frag case) to 13.179MB for 1463056-byte allocation
01-25 13:12:42.821: DEBUG/dalvikvm(23320): GC_CONCURRENT freed <1K, 18% free 13447K/16327K, paused 2ms+2ms
01-25 13:12:43.708: INFO/NFC JNI(23320): LLCP Link deactivated
01-25 13:12:43.708: DEBUG/NfcService(23320): LLCP Link Deactivated message. Restart polling loop.
01-25 13:12:43.708: INFO/NfcP2pLinkManager(23320): LLCP deactivated.
01-25 13:12:43.708: DEBUG/NFC JNI(23320): Failed to accept incoming socket  0x0096[NFCSTATUS_ABORTED]
01-25 13:12:43.915: DEBUG/NFC JNI(23320): Discovered P2P Initiator
01-25 13:12:43.915: DEBUG/NFC JNI(23320): 46 
01-25 13:12:43.915: DEBUG/NFC JNI(23320): 66 
01-25 13:12:43.915: DEBUG/NFC JNI(23320): 6d 
01-25 13:12:43.915: DEBUG/NFC JNI(23320): 01 
01-25 13:12:43.915: DEBUG/NFC JNI(23320): 01 
01-25 13:12:43.915: DEBUG/NFC JNI(23320): 10 
01-25 13:12:43.915: DEBUG/NFC JNI(23320): 02 
01-25 13:12:43.915: DEBUG/NFC JNI(23320): 02 
01-25 13:12:43.915: DEBUG/NFC JNI(23320): 00 
01-25 13:12:43.918: DEBUG/NFC JNI(23320): 00 
01-25 13:12:43.918: DEBUG/NFC JNI(23320): 03 
01-25 13:12:43.918: DEBUG/NFC JNI(23320): 02 
01-25 13:12:43.918: DEBUG/NFC JNI(23320): 00 
01-25 13:12:43.918: DEBUG/NFC JNI(23320): 03 
01-25 13:12:43.918: DEBUG/NFC JNI(23320): 04 
01-25 13:12:43.918: DEBUG/NFC JNI(23320): 01 
01-25 13:12:43.918: DEBUG/NFC JNI(23320): 64 
01-25 13:12:43.918: DEBUG/NFC JNI(23320): 07 
01-25 13:12:43.918: DEBUG/NFC JNI(23320): 01 
01-25 13:12:43.918: DEBUG/NFC JNI(23320): 03 
01-25 13:12:43.985: DEBUG/NfcService(23320): LLCP Activation message
01-25 13:12:43.985: INFO/NFC JNI(23320): LLCP Link activated (LTO=100, MIU=128, OPTION=0x03, WKS=0x03)
01-25 13:12:43.985: INFO/NfcP2pLinkManager(23320): LLCP activated
01-25 13:12:44.989: INFO/NFC JNI(23320): LLCP Link deactivated
01-25 13:12:44.989: DEBUG/NfcService(23320): LLCP Link Deactivated message. Restart polling loop.
01-25 13:12:44.993: INFO/NfcP2pLinkManager(23320): LLCP deactivated.
01-25 13:12:45.747: DEBUG/NfcP2pLinkManager(23320): Debounce timeout
01-25 13:12:45.747: DEBUG/NfcP2pLinkManager(23320): onP2pOutOfRange()
01-25 13:12:47.141: DEBUG/AudioHardware(82): AudioHardware pcm playback is going to standby.
01-25 13:12:47.141: DEBUG/AudioHardware(82): closePcmOut_l() mPcmOpenCnt: 1
like image 533
Viktor Apoyan Avatar asked Jan 25 '12 08:01

Viktor Apoyan


People also ask

How to use NFC on Android devices?

To do so, the first thing to do is make sure that NFC is enabled. Then hold the back of your device close to the payment terminal for a few seconds and wait until the payment is completed. There you have it — that’s how to use NFC on Android devices.

Can I read NDEF messages from NFC tags?

In addition, Android Beam is only one of the features available in the Android NFC framework, which allows you to read NDEF messages from NFC tags. To learn more about Android Beam, see the topic Beaming NDEF messages to other devices. To learn more about the NFC framework, see the Near Field Communication API guide.

What are the requirements for NFC beamed data on Android?

The NFC device that is receiving the beamed data must support the com.android.npp NDEF push protocol or NFC Forum's SNEP (Simple NDEF Exchange Protocol). The com.android.npp protocol is required for devices on API level 9 (Android 2.3) to API level 13 (Android 3.2).

How do I get permission to read NFC data?

Allows your app to send data over NFC. To specify this permission, add the following element as a child of the <manifest> element: <uses-permission android:name="android.permission.NFC" /> Allows your app to read from external storage. To specify this permission, add the following element as a child of the <manifest> element:


1 Answers

I close this question as I found solution, the main reason was that protocols changes instead of ndef now we must use snep protocol. If you have same problem change protocol type.

like image 130
Viktor Apoyan Avatar answered Oct 05 '22 12:10

Viktor Apoyan