PN7150 - Android 6 support - can not make it work

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN7150 - Android 6 support - can not make it work

573 Views
Tomas555
Contributor I

I am trying to add PN7150 NFC into an IMX6 SOM. Running Android 6. I followed AN11690, but I am now stuck. The device node /dev/pn544 will not be created. I have double checked the connection, when I connect to the i2c bus from the outside with soldered wires, I can get the PN7150 working with an mcu. However, currently I am stuck at this:

12-13 14:18:24.921 3639 3639 W NfceeAccess: could not find /etc/nfcee_access.xml, no NFCEE access allowed
12-13 14:18:24.921 3639 3639 I NfceeAccess: read 0 signature(s) for NFCEE access
12-13 14:18:24.923 3639 3639 W NfcSccAccess: could not find /etc/nfcscc_access.xml, no NFCSCC access allowed
12-13 14:18:24.923 3639 3639 I NfcSccAccess: read 0 signature(s) for NFCSCC access
12-13 14:18:24.924 3639 3639 W NfcSeAccess: could not find /etc/nfcse_access.xml, no NFCSE access allowed
12-13 14:18:24.924 3639 3639 I NfcSeAccess: read 0 signature(s) for NFCSE access
12-13 14:18:24.944 3639 3639 D NfcService: Enforcing a policy change on user: UserHandle{0}, isActiveForUser = true
12-13 14:18:24.957 3639 3639 W Settings: Setting airplane_mode_radios has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
12-13 14:18:24.959 3639 3639 W Settings: Setting airplane_mode_toggleable_radios has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
12-13 14:18:24.980 3625 3761 I LatinIME:LogUtils: Dictionary info: dictionary = contacts.en_US ; version = 1702477104 ; date = ?
12-13 14:18:24.992 1062 1253 I ActivityManager: Start proc 3762:com.android.music/u0a35 for broadcast com.android.music/.MediaButtonIntentReceiver
12-13 14:18:25.068 3639 3639 D AidRoutingManager: mDefaultRoute=0x0
12-13 14:18:25.069 3639 3639 D AidRoutingManager: mDefaultOffHostRoute=0x2
12-13 14:18:25.069 3639 3639 D AidRoutingManager: mAidMatchingSupport=0x0
12-13 14:18:25.069 3639 3639 D AidRoutingManager: mAidTableSize=0x0
12-13 14:18:25.075 3639 3639 D RegisteredT3tIdentifiersCache: RegisteredT3tIdentifiersCache
12-13 14:18:25.131 3330 3330 I Choreographer: Skipped 78 frames! The application may be doing too much work on its main thread.
12-13 14:18:25.135 3639 3639 D RegisteredServicesCache: Dynamic AIDs file does not exist.
12-13 14:18:25.135 3639 3639 D RegisteredNxpServicesCache: Dynamic APDU Service file does not exist.
12-13 14:18:25.139 3639 3639 D RegisteredServicesCache: Reading service state data always from file
12-13 14:18:25.140 3639 3639 D RegisteredServicesCache: mServiceStateFile does not exist
12-13 14:18:25.141 3639 3639 E RegisteredServicesCache: 1invalidateCache:WriteServiceStateToFile
12-13 14:18:25.141 3639 3639 E RegisteredServicesCache: Writing service state Data Always
12-13 14:18:25.166 3639 3639 D CardEmulationManager: Current default: null
12-13 14:18:25.166 3639 3639 D CardEmulationManager: No default set, last payment service removed.
12-13 14:18:25.166 3639 3639 D RegisteredAidCache: onServicesUpdated
12-13 14:18:25.172 3639 3639 D RegisteredAidCache: Not updating routing table because NFC is off.
12-13 14:18:25.173 3639 3639 D RegisteredNfcid2Cache: onServicesUpdated
12-13 14:18:25.177 3639 3639 D RegisteredNfcid2Cache: generateAidCacheLocked: mNfcid2Cache size 0
12-13 14:18:25.177 3639 3639 D RegisteredNfcid2Cache: Not updating routing table because NFC is off.
12-13 14:18:25.177 3639 3639 D RegisteredNfcFServicesCache: Dynamic System Code, NFCID2 file does not exist.
12-13 14:18:25.190 3639 3639 D RegisteredNfcFServicesCache: Service unchanged, not updating
12-13 14:18:25.190 3639 3639 D NfcService: Before mIsHceCapable
12-13 14:18:25.196 3639 3787 D NfcService: checking on firmware download
12-13 14:18:25.197 3639 3787 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
12-13 14:18:25.201 3639 3787 D NfcService: NFC is on. Doing normal stuff
12-13 14:18:25.201 3639 3787 I NfcService: Enabling NFC
12-13 14:18:25.201 3639 3787 D BrcmNfcJni: nfcManager_getChipVer: enter
12-13 14:18:25.201 3639 3787 D BrcmNfcJni: 0: nfcManager_getChipVer
12-13 14:18:25.204 3639 3787 D BrcmNfcJni: nfcManager_getNfcInitTimeout: enter
12-13 14:18:25.204 3639 3787 D BrcmNfcJni: NAME_NXP_DEFAULT_NFCEE_DISC_TIMEOUT not found
12-13 14:18:25.204 3639 3787 D BrcmNfcJni: NAME_NXP_DEFAULT_NFCEE_TIMEOUT not found
12-13 14:18:25.204 3639 3787 D BrcmNfcJni: gNfcInitTimeout = 0: gdisc_timeout = 0 nfcManager_getNfcInitTimeout
12-13 14:18:25.204 3639 3787 I NfcService: Enabling NFC timeout90000
12-13 14:18:25.213 3639 3787 D BrcmNfcJni: nfcManager_doInitialize: enter; ver=NFCDROID-AOSP_M_00.01 nfa=NFA_PI_1.03.66+ NCI_VERSION=0x10
12-13 14:18:25.213 3639 3787 D BrcmNfcJni: nfcManager_doInitialize: MW Version: NFC_NCIHALx_AR3C.4.5.0
12-13 14:18:25.213 3639 3787 D BrcmNfcJni: PowerSwitch::initialize: level=PS-FULL (1)
12-13 14:18:25.213 3639 3787 D NfcAdaptation: const CNfcParam* CNfcConfig::find(const char*) const found SCREEN_OFF_POWER_STATE=(0x1)
12-13 14:18:25.213 3639 3787 D BrcmNfcJni: PowerSwitch::initialize: desired screen-off state=1
12-13 14:18:25.213 3639 3787 D NfcAdaptation: NfcAdaptation::Initialize: enter
12-13 14:18:25.213 3639 3787 E NfcAdaptation: NfcAdaptation::Initialize: ver=NFCDROID-AOSP_M_00.01 nfa=NFA_PI_1.03.66+
12-13 14:18:25.213 3639 3787 D NfcAdaptation: const CNfcParam* CNfcConfig::find(const char*) const found PROTOCOL_TRACE_LEVEL=(0x0)
12-13 14:18:25.213 3639 3787 D NfcAdaptation: const CNfcParam* CNfcConfig::find(const char*) const found NFA_MAX_EE_SUPPORTED=(0x1)
12-13 14:18:25.213 3639 3787 D NfcAdaptation: NfcAdaptation::Initialize: Overriding NFA_EE_MAX_EE_SUPPORTED to use 1
12-13 14:18:25.213 3639 3787 D NfcAdaptation: const CNfcParam* CNfcConfig::find(const char*) const found APPL_TRACE_LEVEL=(0x0)
12-13 14:18:25.215 3639 3791 I BrcmNfcNfa: NFC_TASK started.
12-13 14:18:25.230 3762 3762 W System : ClassLoader referenced unknown path: /system/app/Music/lib/arm
12-13 14:18:25.252 3639 3787 D NxpNfcNciHal: nfc_open: enter; name=nci
12-13 14:18:25.252 3639 3787 D NxpNfcNciHal: nfc_open: exit 0
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: nfa_dm_init ()
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: nfa_sys_register () id=1, enable_cplt_mask=0x0
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: nfa_sys_register () id=3, enable_cplt_mask=0x8
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: nfa_rw_init ()
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: nfa_sys_register () id=6, enable_cplt_mask=0x48
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: nfa_ce_init ()
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: nfa_sys_register () id=7, enable_cplt_mask=0xc8
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: nfa_ee_init ()
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: nfa_sys_register () id=2, enable_cplt_mask=0xcc
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: nfa_hci_init ()
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: nfa_sys_register () id=8, enable_cplt_mask=0x1cc
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: LLCP - llcp_init ()
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: num_rx_buff = 21, rx_congest_start = 14, rx_congest_end = 10, max_num_ll_rx_buff = 6
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: max_num_tx_buff = 49, max_num_ll_tx_buff = 14
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: LLCP_RegisterServer (): SAP:0x1, link_type:0x2, ServiceName:<urn:nfc:sn:sdp>
12-13 14:18:25.252 3639 3787 I BrcmNfcNfa: LLCP_RegisterServer (): Registered SAP = 0x01
12-13 14:18:25.253 3639 3787 I BrcmNfcNfa: NFA_Enable ()
12-13 14:18:25.253 3639 3791 I BrcmNfcNfa: NFA got event 0x0100
12-13 14:18:25.253 3639 3791 I BrcmNfcNfa: nfa_dm_evt_hdlr event: NFA_DM_API_ENABLE_EVT (0x00)
12-13 14:18:25.253 3639 3791 I BrcmNfcNfa: nfa_dm_enable ()
12-13 14:18:25.253 3639 3791 I BrcmNfcNfa: NFC_Enable ()
12-13 14:18:25.253 3639 3791 I BrcmNfcNfa: nfc_set_state 0 (NONE)->1 (W4_HAL_OPEN)
12-13 14:18:25.259 3639 3787 I BrcmNfcNfa: NFC_SetTraceLevel () new_level = 0
12-13 14:18:25.259 3639 3791 D NxpExtns: const nxp::CNfcParam* nxp::CNfcConfig::find(const char*) const found NXPLOG_TML_LOGLEVEL=(0x3)
12-13 14:18:25.259 3639 3791 D NxpExtns: const nxp::CNfcParam* nxp::CNfcConfig::find(const char*) const found NXPLOG_FWDNLD_LOGLEVEL=(0x3)
12-13 14:18:25.259 3639 3791 D NxpExtns: const nxp::CNfcParam* nxp::CNfcConfig::find(const char*) const found NXPLOG_NCIX_LOGLEVEL=(0x3)
12-13 14:18:25.259 3639 3791 D NxpExtns: const nxp::CNfcParam* nxp::CNfcConfig::find(const char*) const found NXPLOG_NCIR_LOGLEVEL=(0x3)
12-13 14:18:25.259 3639 3791 D : phNxpLog_InitializeLogLevel: global =1, Fwdnld =3, extns =3, hal =3, tml =3, ncir =3, ncix =3
12-13 14:18:25.262 3639 3791 D NxpHal : Entering phNxpNciHal_init_monitor
12-13 14:18:25.262 3639 3791 D NxpHal : Returning with SUCCESS
12-13 14:18:25.262 3639 3791 E NxpHal : Invalid nfc device node name keeping the default device node /dev/pn544
12-13 14:18:25.263 3639 3791 D NxpTml : Opening port=/dev/pn544
12-13 14:18:25.263 3639 3791 E NxpTml : _i2c_open() Failed: retval ffffffff
12-13 14:18:25.263 3639 3791 E NxpHal : phTmlNfc_Init Failed
12-13 14:18:25.263 3639 3791 D NxpHal : Failed to deallocate (list empty)
12-13 14:18:25.263 3639 3791 D NxpHal : Node dump:
12-13 14:18:25.263 3639 3791 D NxpHal : Failed to deallocate (list empty)
12-13 14:18:25.263 3639 3791 D NxpHal : Node dump:
12-13 14:18:25.266 3639 3787 D NxpExtns: const CNxpNfcParam* CNxpNfcConfig::find(const char*) const found NXPLOG_TML_LOGLEVEL=(0x3)
12-13 14:18:25.266 3639 3787 D NxpExtns: const CNxpNfcParam* CNxpNfcConfig::find(const char*) const found NXPLOG_FWDNLD_LOGLEVEL=(0x3)
12-13 14:18:25.266 3639 3787 D NxpExtns: const CNxpNfcParam* CNxpNfcConfig::find(const char*) const found NXPLOG_NCIX_LOGLEVEL=(0x3)
12-13 14:18:25.266 3639 3787 D NxpExtns: const CNxpNfcParam* CNxpNfcConfig::find(const char*) const found NXPLOG_NCIR_LOGLEVEL=(0x3)
12-13 14:18:25.266 3639 3787 D : phNxpLog_InitializeLogLevel: global =1, Fwdnld =3, extns =3, hal =3, tml =3, ncir =3, ncix =3
12-13 14:18:25.267 3639 3787 E BrcmNfcJni: nfcManager_doInitialize: fail nfa enable; error=0x0
12-13 14:18:25.270 3625 3761 I LatinIME:LogUtils: Dictionary info: dictionary = userunigram.en_US ; version = 1702477105 ; date = ?
12-13 14:18:25.276 3639 3791 I BrcmNfcNfa: GKI TASK_DEAD received. exit thread 3...
12-13 14:18:25.278 3639 3787 D : int CNxpNfcConfig::checkTimestamp() file /data/nfc/libnfc-nxpConfigState.bin not exist, create it.
12-13 14:18:25.278 3639 3787 D : int CNxpNfcConfig::updateTimestamp() file /data/nfc/libnfc-nxpConfigState.bin not exist, creat it.
12-13 14:18:25.278 3639 3787 W NfcService: Error enabling NFC
12-13 14:18:25.279 3639 3789 I BrcmNfcNfa: GKI TASK_DEAD received. exit thread 4...
12-13 14:18:25.284 3639 3787 I NfcService: First Boot

 

In AN11690, there is shown how to solve the _i2c_open() Failed: retval ffffffff issue, but it does not work for me. I have tried to add the # NFC
setprop ro.nfc.port "I2C"
chmod 0660 /dev/pn544
chown nfc nfc /dev/pn544

part in various .rc files, without success. I found out that simply the /dev/pn544 node will not appear.

There is only one thing I have done differently - I have connected pin 10 (VEN) directly to +3v3. I am not controlling it with GPIO. Could this be the problem? Thanks in advance.

0 Kudos
Reply
3 Replies

559 Views
KellyLi
NXP TechSupport
NXP TechSupport

Hello @Tomas555 

The Android version is too low. Could I try a higher version, such as Android 8 or above and try again?

BR

kelly

0 Kudos
Reply

551 Views
Tomas555
Contributor I

Hello, unfortunately I need to get it working on Android 6. I have spent a lot of time with this, I just need the device to create the node /dev/pn544. However, I have noticed also a strange behavior - when I try scanning the i2c bus, doesnt matter if it is with i2cdetect or if I connect an ESP32 based external scanner, first time scan returns nothing on address 0x28, but when I try scanning within 500ms time, then it shows up.

0 Kudos
Reply

512 Views
KellyLi
NXP TechSupport
NXP TechSupport

Hello @Tomas555 

Have to say sorry to you, too lower version of Android, it is difficult to provide you with further support. Please understand.

Best Regards,

kelly

0 Kudos
Reply