AnsweredAssumed Answered

NFC not enabling in Android Pie

Question asked by Sascha Seefelder on Jan 15, 2020
Latest reply on Feb 5, 2020 by Jeremy Geslin

i am using the PN7150 in Android 9 on an i.mx8m Mini. When im trying to enable NFC in settings it turns itsself off immediately. I have been reading Application Note AN11690 but cant figure out whats wrong. Thanks in advance

 

01-01 00:58:53.923 3215 3215 D nxpnfc@1.0-service: NFC HAL Service 1.1 is starting.
01-01 00:58:53.923 3215 3215 I ServiceManagement: Removing namespace from process name android.hardware.nfc@1.1-service to nfc@1.1-service.
01-01 00:58:54.027 3037 3037 E SELinux : avc: denied { add } for interface=vendor.nxp.nxpnfc::INxpNfc pid=3215 scontext=u:r:hal_nfc_default:s 0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=1
01-01 00:58:54.035 3215 3215 D nxpnfc@1.0-service: NFC service is ready
01-01 00:58:57.476 3351 3396 W PackageParser: Ignoring duplicate uses-permissions/uses-permissions-sdk-m: android.permission.CHANGE_WIFI_STATE in package: com.android.nfc at: Binary XML file line #47
01-01 00:58:57.480 3351 3396 W PackageParser: Ignoring duplicate uses-permissions/uses-permissions-sdk-m: android.permission.ACCESS_WIFI_STATE in package: com.android.nfc at: Binary XML file line #48
01-15 10:55:42.773 3351 3368 I ActivityManager: Start proc 3982:com.android.nfc/1027 for added application com.android.nfc
01-15 10:55:42.915 3982 3982 I NfcService: Starting NFC service
01-15 10:55:42.986 3982 3982 I : [0115/105542.986315:INFO:NfcJniUtil.cpp(47)] NFC Service: loading nci JNI
01-15 10:55:42.991 3982 3982 I com.android.nf: ConfigFile - Parsing file '/vendor/etc/libnfc-nci.conf'
01-15 10:55:42.991 3982 3982 I com.android.nf: ConfigFile - [NFC_DEBUG_ENABLED] = 0x01
01-15 10:55:42.991 3982 3982 I com.android.nf: ConfigFile - [NFA_STORAGE] = "/data/vendor/nfc"
01-15 10:55:42.991 3982 3982 I com.android.nf: ConfigFile - [NCI_HAL_MODULE] = "nfc_nci.pn54x"
01-15 10:55:42.992 3982 3982 I : [0115/105542.992095:INFO:NfcAdaptation.cc(460)] NfcAdaptation::InitializeHalDeviceContext: INfc::getSe rvice()
01-15 10:55:43.002 3982 3982 I : [0115/105543.002520:INFO:NfcAdaptation.cc(466)] NfcAdaptation::InitializeHalDeviceContext: INfc::getSe rvice() returned 0xeef0632e4600 (remote)
01-15 10:55:43.006 3982 3982 I : [0115/105543.006484:INFO:NativeNfcManager.cpp(190)] initializeGlobalDebugEnabledFlag: level=1
01-15 10:55:43.006 3982 3982 I : [0115/105543.006603:INFO:NativeNfcManager.cpp(622)] nfcManager_initNativeStruc: enter
01-15 10:55:43.006 3982 3982 I : [0115/105543.006873:INFO:NativeNfcManager.cpp(683)] nfcManager_initNativeStruc: exit
01-15 10:55:43.129 3982 3982 D RegisteredNfcFServicesCache: Dynamic System Code, NFCID2 file does not exist.
01-15 10:55:43.130 3982 3982 D RegisteredNfcFServicesCache: Service unchanged, not updating
01-15 10:55:43.133 3982 4074 D NfcService: checking on firmware download
01-15 10:55:43.133 3982 4074 D NfcService: NFC is on. Doing normal stuff
01-15 10:55:43.133 3982 4074 I NfcService: Enabling NFC
01-15 10:55:43.137 3982 4074 I : [0115/105543.137836:INFO:NativeNfcManager.cpp(190)] initializeGlobalDebugEnabledFlag: level=1
01-15 10:55:43.138 3982 4074 I libnfc_nci: [INFO:NfcAdaptation.cc(93)] initializeGlobalDebugEnabledFlag: level=1
01-15 10:55:43.138 3982 4074 I libnfc_nci: [INFO:libmain.cc(196)] verify_stack_non_volatile_store
01-15 10:55:43.138 3982 4074 I libnfc_nci: [INFO:CrcChecksum.cc(94)] crcChecksumVerifyIntegrity: filename=/data/vendor/nfc/nfaStorage.bin1
01-15 10:55:43.138 3982 4074 I libnfc_nci: [INFO:CrcChecksum.cc(94)] crcChecksumVerifyIntegrity: filename=/data/vendor/nfc/nfaStorage.bin4
01-15 10:55:43.138 3982 4074 I libnfc_nci: [INFO:CrcChecksum.cc(94)] crcChecksumVerifyIntegrity: filename=/data/vendor/nfc/nfaStorage.bin2
01-15 10:55:43.138 3982 4074 I libnfc_nci: [INFO:CrcChecksum.cc(94)] crcChecksumVerifyIntegrity: filename=/data/vendor/nfc/nfaStorage.bin3
01-15 10:55:43.138 3982 4074 I libnfc_nci: [INFO:CrcChecksum.cc(94)] crcChecksumVerifyIntegrity: filename=/data/vendor/nfc/nfaStorage.bin5
01-15 10:55:43.138 3982 4074 I libnfc_nci: [INFO:NfcAdaptation.cc(305)] Initialize: preserve stack NV store
01-15 10:55:43.140 3982 4074 I libnfc_nci: [INFO:gki_ulinux.cc(194)] GKI_create_task func=0x0xeef04ac02ca8 id=4 name=NFCA_TASK stack=0x0x0 stackSize=0
01-15 10:55:43.140 3982 4074 I libnfc_nci: [INFO:gki_ulinux.cc(220)] GKI creating task 4, pCond/pMutex=0x0/0x0
01-15 10:55:43.140 3982 4074 I libnfc_nci: [INFO:gki_ulinux.cc(262)] Leaving GKI_create_task 0xeef04ac02ca8 4 eef04a5354f0 NFCA_TASK 0x0 0
01-15 10:55:43.140 3982 4074 I libnfc_nci: [INFO:gki_ulinux.cc(194)] GKI_create_task func=0x0xeef04ac02e28 id=0 name=NFCA_THREAD stack=0x0x0 stackSize=0
01-15 10:55:43.140 3982 4078 I libnfc_nci: [INFO:gki_ulinux.cc(89)] gki_task_entry task_id=4, thread_id=eef04a5354f0/eef04a5354f0, pCond/pMutex =0x0/0x0
01-15 10:55:43.140 3982 4074 I libnfc_nci: [INFO:gki_ulinux.cc(220)] GKI creating task 0, pCond/pMutex=0x0/0x0
01-15 10:55:43.140 3982 4078 I libnfc_nci: [INFO:NfcAdaptation.cc(393)] NfcAdaptation::NFCA_TASK: enter
01-15 10:55:43.140 3982 4078 I libnfc_nci: [INFO:gki_ulinux.cc(450)] GKI_run enter
01-15 10:55:43.140 3982 4078 I libnfc_nci: [INFO:gki_ulinux.cc(460)] Start/Stop GKI_timer_update_registered!
01-15 10:55:43.140 3982 4078 I libnfc_nci: [INFO:gki_ulinux.cc(479)] GKI_run, run_cond(0xeef04ac45b70)=1
01-15 10:55:43.140 3982 4074 I libnfc_nci: [INFO:gki_ulinux.cc(262)] Leaving GKI_create_task 0xeef04ac02e28 0 eef04a4374f0 NFCA_THREAD 0x0 0
01-15 10:55:43.140 3982 4079 I libnfc_nci: [INFO:gki_ulinux.cc(89)] gki_task_entry task_id=0, thread_id=eef04a4374f0/eef04a4374f0, pCond/pMutex =0x0/0x0
01-15 10:55:43.140 3982 4079 I libnfc_nci: [INFO:NfcAdaptation.cc(410)] NfcAdaptation::Thread: enter
01-15 10:55:43.140 3982 4079 I libnfc_nci: [INFO:gki_ulinux.cc(194)] GKI_create_task func=0x0xeef04abdddb8 id=3 name=NFC_TASK stack=0x0x0 s tackSize=0
01-15 10:55:43.140 3982 4079 I libnfc_nci: [INFO:gki_ulinux.cc(220)] GKI creating task 3, pCond/pMutex=0xeef04a4371c0/0xeef04a437198
01-15 10:55:43.140 3982 4079 I libnfc_nci: [INFO:gki_ulinux.cc(262)] Leaving GKI_create_task 0xeef04abdddb8 3 eef04a3394f0 NFC_TASK 0x0 0
01-15 10:55:43.140 3982 4080 I libnfc_nci: [INFO:gki_ulinux.cc(89)] gki_task_entry task_id=3, thread_id=eef04a3394f0/eef04a3394f0, pCond/pMutex =0xeef04a4371c0/0xeef04a437198
01-15 10:55:43.141 3982 4080 I libnfc_nci: [INFO:nfc_task.cc(348)] NFC_TASK started.
01-15 10:55:43.141 3982 4080 I libnfc_nci: [INFO:gki_ulinux.cc(585)] GKI_wait task=3, pCond/pMutex = 0xeef04a4371c0/0xeef04a437198
01-15 10:55:43.141 3982 4079 I libnfc_nci: [INFO:gki_ulinux.cc(1117)] GKI_exit_task 0 done
01-15 10:55:43.141 3982 4079 I libnfc_nci: [INFO:NfcAdaptation.cc(423)] NfcAdaptation::Thread: exit
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:NfcAdaptation.cc(323)] NfcAdaptation::Initialize: exit
01-15 10:55:43.141 3982 4079 E libnfc_nci: [ERROR:gki_ulinux.cc(98)] gki_task task_id=0 terminating
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_dm_api.cc(59)] NFA_Init
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_dm_main.cc(97)] nfa_dm_init
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_sys_main.cc(133)] id=1, enable_cplt_mask=0x0
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_p2p_main.cc(477)] nfa_p2p_init
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_sys_main.cc(133)] id=3, enable_cplt_mask=0x8
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_rw_main.cc(70)] nfa_rw_init
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_sys_main.cc(133)] id=5, enable_cplt_mask=0x28
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_ce_main.cc(76)] nfa_ce_init
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_sys_main.cc(133)] id=6, enable_cplt_mask=0x68
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_ee_main.cc(97)] nfa_ee_init
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_sys_main.cc(133)] id=2, enable_cplt_mask=0x6c
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_hci_main.cc(192)] nfa_hci_init
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_sys_main.cc(133)] id=7, enable_cplt_mask=0xec
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:llcp_main.cc(57)] llcp_init
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:llcp_main.cc(89)] num_rx_buff = 9, rx_congest_start = 6, rx_congest_end = 4, max_num_ll_rx_buf f = 2
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:llcp_main.cc(102)] max_num_tx_buff = 21, max_num_ll_tx_buff = 6
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:llcp_api.cc(369)] SAP:0x1, link_type:0x2, ServiceName:<urn:nfc:sn:sdp>
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:llcp_api.cc(453)] Registered SAP = 0x01
01-15 10:55:43.141 3982 4074 I libnfc_nci: [INFO:nfa_dm_api.cc(101)] NFA_Enable
01-15 10:55:43.141 3982 4080 I libnfc_nci: [INFO:nfa_sys_main.cc(77)] NFA got event 0x0100
01-15 10:55:43.141 3982 4080 I libnfc_nci: [INFO:nfa_dm_main.cc(121)] event: NFA_DM_API_ENABLE_EVT (0x00)
01-15 10:55:43.141 3982 4080 I libnfc_nci: [INFO:nfa_dm_act.cc(433)] nfa_dm_enable
01-15 10:55:43.141 3982 4080 I libnfc_nci: [INFO:nfc_main.cc(664)] NFC_Enable
01-15 10:55:43.141 3982 4080 I libnfc_nci: [INFO:nfc_main.cc(326)] nfc_set_state 0 (NONE)->1 (W4_HAL_OPEN)
01-15 10:55:43.141 3982 4080 I libnfc_nci: [INFO:NfcAdaptation.cc(513)] NfcAdaptation::HalOpen
01-15 10:55:43.143 3215 3215 D android.hardware.nfc@1.1-impl: Nfc::open Enter
01-15 10:55:43.143 3215 3215 D NxpHal : nfc_debug_enabled : 1
01-15 10:55:43.144 3215 3215 D NxpNfcHal: phNxpLog_InitializeLogLevel: global =1, Fwdnld =3, extns =3, hal =3, tml =3, ncir =3, ncix =3
01-15 10:55:43.145 3037 3037 E SELinux : avc: denied { find } for interface=vendor.nxp.nxpese::INxpEse pid=3215 scontext=u:r:hal_nfc_default: s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=1
01-15 10:55:43.145 3215 3215 D NxpExtns: find found NXP_NFC_DEV_NODE=/dev/pn544
01-15 10:55:43.145 3215 3215 E NxpHal : phTmlNfc_Init Failed
01-15 10:55:43.145 3982 4080 I libnfc_nci: [INFO:nfc_main.cc(568)] nfc_main_hal_cback event: HAL_NFC_OPEN_CPLT_EVT(0x0), status=1
01-15 10:55:43.145 3215 3215 D android.hardware.nfc@1.1-impl: Nfc::open Exit
01-15 10:55:43.146 3982 4080 I libnfc_nci: [INFO:nfc_main.cc(379)] HAL event=0x0
01-15 10:55:43.146 3982 4080 I libnfc_nci: [INFO:nfc_main.cc(326)] nfc_set_state 1 (W4_HAL_OPEN)->0 (NONE)
01-15 10:55:43.146 3982 4080 I libnfc_nci: [INFO:nfa_dm_act.cc(268)] NFC_ENABLE_REVT(0x5000)
01-15 10:55:43.146 3982 4080 I libnfc_nci: [INFO:NativeNfcManager.cpp(700)] nfaDeviceManagementCallback: enter; event=0x0
01-15 10:55:43.146 3982 4080 I libnfc_nci: [INFO:NativeNfcManager.cpp(707)] nfaDeviceManagementCallback: NFA_DM_ENABLE_EVT; status=0x3
01-15 10:55:43.150 3982 4074 I libnfc_nci: [INFO:phNxpConfig.cpp(520)] find found NXPLOG_TML_LOGLEVEL=(0x3)
01-15 10:55:43.150 3982 4074 I libnfc_nci:
01-15 10:55:43.150 3982 4074 I libnfc_nci: [INFO:phNxpConfig.cpp(520)] find found NXPLOG_FWDNLD_LOGLEVEL=(0x3)
01-15 10:55:43.150 3982 4074 I libnfc_nci:
01-15 10:55:43.150 3982 4074 I libnfc_nci: [INFO:phNxpConfig.cpp(520)] find found NXPLOG_NCIX_LOGLEVEL=(0x3)
01-15 10:55:43.150 3982 4074 I libnfc_nci:
01-15 10:55:43.150 3982 4074 I libnfc_nci: [INFO:phNxpConfig.cpp(520)] find found NXPLOG_NCIR_LOGLEVEL=(0x3)
01-15 10:55:43.150 3982 4074 I libnfc_nci:
01-15 10:55:43.150 3982 4074 I libnfc_nci: [INFO:phNxpLog.cpp(256)] phNxpLog_InitializeLogLevel: global =1, Fwdnld =3, extns =3, hal =3, tml =3, ncir =3, ncix =3
01-15 10:55:43.150 3982 4074 E libnfc_nci: [ERROR:NativeNfcManager.cpp(1108)] nfcManager_doInitialize: fail nfa enable; error=0x0
01-15 10:55:43.150 3982 4074 I libnfc_nci: [INFO:NfcAdaptation.cc(339)] NfcAdaptation::Finalize: enter
01-15 12:07:56.729 3982 4074 I libnfc_nci: [INFO:gki_ulinux.cc(322)] task (null) dead
01-15 12:07:56.729 3982 4074 I libnfc_nci: [INFO:gki_ulinux.cc(1117)] GKI_exit_task 4 done
01-15 12:07:56.729 3982 4080 E libnfc_nci: [ERROR:gki_ulinux.cc(666)] GKI TASK_DEAD received. exit thread 3...
01-15 12:07:56.729 3982 4080 I libnfc_nci: [INFO:nfc_task.cc(426)] nfc_task terminated
01-15 12:07:56.729 3982 4080 E libnfc_nci: [ERROR:gki_ulinux.cc(98)] gki_task task_id=3 terminating
01-15 12:07:56.829 3982 4074 I libnfc_nci: [INFO:gki_ulinux.cc(322)] task NFCA_TASK dead
01-15 12:07:56.829 3982 4074 I libnfc_nci: [INFO:gki_ulinux.cc(1117)] GKI_exit_task 3 done
01-15 12:07:56.829 3982 4074 I libnfc_nci: [INFO:NfcAdaptation.cc(344)] NfcAdaptation::Finalize: exit
01-15 12:07:56.829 3982 4074 I libnfc_nci: [INFO:NativeNfcManager.cpp(1122)] nfcManager_doInitialize: exit
01-15 12:07:56.830 3982 4074 I com.android.nf: ConfigFile - Parsing file '/vendor/etc/libnfc-nci.conf'
01-15 12:07:56.830 3982 4074 I com.android.nf: ConfigFile - [NFC_DEBUG_ENABLED] = 0x01
01-15 12:07:56.830 3982 4074 I com.android.nf: ConfigFile - [NFA_STORAGE] = "/data/vendor/nfc"
01-15 12:07:56.830 3982 4074 I com.android.nf: ConfigFile - [NCI_HAL_MODULE] = "nfc_nci.pn54x"
01-15 12:07:56.830 3982 4074 I libnfc_nci: [INFO:NfcAdaptation.cc(460)] NfcAdaptation::InitializeHalDeviceContext: INfc::getService()
01-15 12:07:56.831 3982 4074 I libnfc_nci: [INFO:NfcAdaptation.cc(466)] NfcAdaptation::InitializeHalDeviceContext: INfc::getService() returned 0xeef0632e4980 (remote)
01-15 12:07:56.832 3982 4074 W NfcService: Error enabling NFC
01-15 12:07:56.836 3982 4078 I libnfc_nci: [INFO:gki_ulinux.cc(522)] GKI_run exit
01-15 12:07:56.836 3982 4078 I libnfc_nci: [INFO:NfcAdaptation.cc(395)] NfcAdaptation::NFCA_TASK: exit
01-15 12:07:56.836 3982 4078 E libnfc_nci: [ERROR:gki_ulinux.cc(98)] gki_task task_id=4 terminating

Outcomes