NFC doesn't work on OnePlus 9 Pro with /e/OS 1.8.1

Hello community!

It’s just what it says: NFC module doesn’t recognize NFC cards/tokens althoug NFC in turned on in settings and NFC service is running. On stock ROM it was working just before flashing /e/OS. Cards/tokens which I test NFC with are known to work.

I’ve seend this issue, but it’s not the case: the apps at least show something to issue author…

Please advise how to gather only NFC related logs if possible and troubleshoot the issue.

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

Enabled /e/OS test update channel and updated to 1.9-beta.3-s-20230222262912-dev-lemonadep, but it didn’t help.

Managed to get some logs which look relevant, but I don’t understand what does it all mean:

OnePlus9Pro:/ $ logcat -d *:W | grep -i nfc                                                                                                                                    
01-08 00:58:26.948   239   239 E qcom,sn-nci 5-0028: error reading NFC VDDIO min and max value
01-08 00:58:26.948   239   239 E qcom,sn-nci 5-0028: error reading NFC current value
01-08 00:58:26.948   239   239 E nfc_ldo_config: regulator entry not present
03-01 17:06:59.597  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: readConfig Cannot open config file /system/vendor/libnfc-nxp_RF.conf
03-01 17:06:59.597  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: readConfig Cannot open config file /data/vendor/nfc/libnfc-nxpTransit.conf
03-01 17:06:59.619  2549  2620 E NFC     : could not retrieve NFC service
03-01 17:06:59.620  2549  2620 E NFC     : could not retrieve NFC service
03-01 17:06:59.691  3941  4193 W libnfc_nci: [WARNING:gki_ulinux.cc(98)] gki_task task_id=0 terminating
03-01 17:06:59.811  1034  1034 E NxpFwDnld: phDnldNfc_SetDlRspTimeout timeout value =9c4
03-01 17:06:59.811  1034  1034 E NxpFwDnld: phDnldNfc_SetDlRspTimeout timeout value =9c4
03-01 17:06:59.841  3941  4194 W libnfc_nci: [WARNING:nfc_ncif.cc(1660)] reset notification!!:0x2 
03-01 17:06:59.881  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-01 17:06:59.881  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-01 17:06:59.891  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-01 17:06:59.905  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-01 17:06:59.905  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-01 17:07:00.138  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-01 17:07:00.138  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-01 17:07:00.192  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-01 17:07:00.192  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: resetModified Unable to open file for writing
03-01 17:07:00.192  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-01 17:07:00.192  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-01 17:07:00.192  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: resetModified Unable to open file for writing
03-01 17:07:00.192  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: resetModified Unable to open file for writing
03-01 17:07:00.243  3941  4194 W libnfc_nci: [WARNING:nfa_ee_act.cc(2174)] nfa_ee_nci_mode_set_rsp p_rsp->status:0x03
03-01 17:07:00.251  3941  4194 W libnfc_nci: [WARNING:nfa_ee_act.cc(2174)] nfa_ee_nci_mode_set_rsp p_rsp->status:0x03
03-01 17:07:00.262  3941  4194 W libnfc_nci: [WARNING:nfa_ee_act.cc(2174)] nfa_ee_nci_mode_set_rsp p_rsp->status:0x00
03-01 17:07:00.275  3941  4186 E libnfc_nci: [ERROR:nfa_ee_api.cc(506)] Bad ee_handle
03-01 17:07:00.275  3941  4186 E libnfc_nci: [ERROR:nfa_ee_api.cc(442)] Bad ee_handle
03-01 17:07:00.275  3941  4186 E libnfc_nci: [ERROR:RoutingManager.cpp(583)] RoutingManager::updateDefaultProtocolRoute: failed to register default ISO-DEP route
03-01 17:07:00.276  3941  4194 W libnfc_nci: [WARNING:HciEventManager.cpp(152)] Incorrect Pipe Id
03-01 17:07:51.084  1364  3912 W InputManager-JNI: Input channel object 'edc1bee Splash Screen com.wakdev.wdnfc (client)' was disposed without first being removed with the input manager!
03-01 17:07:53.358  1364  1424 W InputManager-JNI: Input channel object 'af1a377 com.wakdev.wdnfc/com.wakdev.nfctools.free.views.MainActivityFree (client)' was disposed without first being removed with the input manager!
03-01 17:07:57.216  3941  4194 E libnfc_nci: [ERROR:rw_mfc.cc(697)] rw_mfc_conn_cback NULL pointer
03-01 17:07:57.236  3941  4194 E libnfc_nci: [ERROR:rw_mfc.cc(697)] rw_mfc_conn_cback NULL pointer
03-01 17:07:57.254  3941  4194 E libnfc_nci: [ERROR:rw_mfc.cc(528)] RW_MfcDetectNDef
03-01 17:07:57.257  3941  4194 E libnfc_nci: [ERROR:rw_mfc.cc(884)] rw_mfc_readBlock: RW_MFC_SUBSTATE_WAIT_ACK
03-01 17:07:57.260  3941  4194 E libnfc_nci: [ERROR:rw_mfc.cc(697)] rw_mfc_conn_cback NULL pointer

Starting from smartphone boot, NFC Tool app activated at 17:07:51.084.

Tried to report an issue as it’s suggested on the device page, but /e/ GitLab doesn’t allow me to register :man_shrugging:

1 Like

As /e/OS is based on LineageOS, I’ve decided to test if NFC works on the latter. Installed latest nightly build of LOS (20.0-20230214 to be precise), and it works! Gathered the logs exactly the same way in same circumstances (boot and run NFC Tool):

OnePlus9Pro:/ $ logcat -d *:W | grep -i nfc
01-08 18:53:27.950   239   239 E qcom,sn-nci 5-0028: error reading NFC VDDIO min and max value
01-08 18:53:27.950   239   239 E qcom,sn-nci 5-0028: error reading NFC current value
01-08 18:53:27.950   239   239 E nfc_ldo_config: regulator entry not present
03-02 11:01:39.634  1640  1640 E PackageManager: Package com.android.nfc was user id 0 but is now user SharedUserSetting{9950172 android.uid.nfc/1027} with id 1027; I am not changing its files so it will probably fail!
03-02 11:01:56.215  3531  3812 W libnfc_nci: [WARNING:gki_ulinux.cc(98)] gki_task task_id=0 terminating
03-02 11:01:56.256  3841  3841 E nfc_i2c_dev_write: failed to write -107
03-02 11:01:57.530  3841  3841 E nfc_i2c_dev_write: failed to write -107
03-02 11:01:57.558  1054  1054 E NxpFwDnld: phDnldNfc_SetDlRspTimeout timeout value =9c4
03-02 11:01:57.580  3531  3813 W libnfc_nci: [WARNING:nfc_ncif.cc(1665)] reset notification!!:0x2 
03-02 11:01:57.615  1054  1054 E android.hardware.nfc_snxxx@1.2-service: isModified Unable to open file assume modified
03-02 11:01:57.615  1054  1054 E android.hardware.nfc_snxxx@1.2-service: isModified Unable to open file assume modified
03-02 11:01:57.631  1054  1054 E android.hardware.nfc_snxxx@1.2-service: failed to get requested memory address
03-02 11:01:57.631  1054  1054 E android.hardware.nfc_snxxx@1.2-service: isModified Unable to open file assume modified
03-02 11:01:57.643  1054  1054 E android.hardware.nfc_snxxx@1.2-service: isModified Unable to open file assume modified
03-02 11:01:57.643  1054  1054 E android.hardware.nfc_snxxx@1.2-service: isModified Unable to open file assume modified
03-02 11:01:57.844  1054  1054 E android.hardware.nfc_snxxx@1.2-service: isModified Unable to open file assume modified
03-02 11:01:57.844  1054  1054 E android.hardware.nfc_snxxx@1.2-service: isModified Unable to open file assume modified
03-02 11:01:57.888  1054  1054 E android.hardware.nfc_snxxx@1.2-service: isModified Unable to open file assume modified
03-02 11:01:57.888  1054  1054 E android.hardware.nfc_snxxx@1.2-service: resetModified Unable to open file for writing
03-02 11:01:57.888  1054  1054 E android.hardware.nfc_snxxx@1.2-service: isModified Unable to open file assume modified
03-02 11:01:57.888  1054  1054 E android.hardware.nfc_snxxx@1.2-service: isModified Unable to open file assume modified
03-02 11:01:57.888  1054  1054 E android.hardware.nfc_snxxx@1.2-service: resetModified Unable to open file for writing
03-02 11:01:57.888  1054  1054 E android.hardware.nfc_snxxx@1.2-service: resetModified Unable to open file for writing
03-02 11:01:57.931  3531  3813 W libnfc_nci: [WARNING:nfa_ee_act.cc(2173)] nfa_ee_nci_mode_set_rsp p_rsp->status:0x03
03-02 11:01:57.940  3531  3813 W libnfc_nci: [WARNING:nfa_ee_act.cc(2173)] nfa_ee_nci_mode_set_rsp p_rsp->status:0x03
03-02 11:01:57.953  3531  3813 W libnfc_nci: [WARNING:nfa_ee_act.cc(2173)] nfa_ee_nci_mode_set_rsp p_rsp->status:0x00
03-02 11:01:57.966  3531  3813 W libnfc_nci: [WARNING:HciEventManager.cpp(152)] Incorrect Pipe Id
03-02 11:02:35.014  1640  2520 W InputManager-JNI: Input channel object '90105ab Splash Screen com.wakdev.wdnfc (client)' was disposed without first being removed with the input manager!

At the time of this log collection there are no error messages about missing config files, but they were there during first boot after LineageOS install. I’ve installed Magisk and checked for the files and there were none of them on filesystems. I’ve checked for any NFC-related .conf file just in case:

OnePlus9Pro:/ # find / -name *nfc*.conf 2>/dev/null                                                                                                                        
/dev/kuB6/.magisk/mirror/vendor/etc/libnfc-nxp.conf
/dev/kuB6/.magisk/mirror/vendor/etc/libnfc-nci.conf
/system/etc/libnfc-nci.conf
/vendor/etc/libnfc-nxp.conf
/vendor/etc/libnfc-nci.conf

Then I reinstalled /e/OS and did the same:

OnePlus9Pro:/ # find / -name *nfc*.conf 2>/dev/null
/vendor/etc/libnfc-mtp-SN100.conf
/vendor/etc/libnfc-nci.conf
/dev/9QXzkx/.magisk/mirror/vendor/etc/libnfc-mtp-SN100.conf
/dev/9QXzkx/.magisk/mirror/vendor/etc/libnfc-nci.conf
/system/etc/libnfc-nci.conf

Then I copied and pasted contents of all these files from both /e/OS and LineageOS (reinstalled it again) to my laptop to compare, and it appeared that they are identical, except this snippet in /system/etc/libnfc-nci.conf on LOS:

###############################################################################
# NCI_RESET_TYPE options
# Default 0x00, reset configurations everytime.
# 0x01, reset configurations only once every boot.
# 0x02, keep configurations.
NCI_RESET_TYPE=0x00

So I reinstalled /e/OS again, installed Magisk and did this in adb shell:

su
mount -o remount,rw /vendor
cp /vendor/etc/libnfc-mtp-SN100.conf /vendor/etc/libnfc-nxp.conf
mount -o remount,ro /vendor

Rebooted the device, activated NFC Tools app, put my NFC token to NFC module, and it seemed to work!
But:

  1. the app didn’t recognize all technologies supported by token, just as in mentioned issue, so actual app which I need doesn’t work. Tested with another token and another app — same thing, well, as explected;
  2. NFC module re-reads the token permanently while it’s near the module: in LOS token reading was accompanied by single “blam” and now in /e/OS it’s like “blam-blam-blam…” :slight_smile: I thought I could fix it with missing snippet in /system/etc/libnfc-nci.conf, but it couldn’t be done straightforward (got to QUALCOMM CrashDump Mode) and didn’t actually help.

Guess that’s all I can do so far. Need assistance of more qualified person.

Forgot to attach logs with “fixed” NFC in /e/OS and decided to repeat “fix” from scratch with ROM reinstall, but looks like Android gods are not so kind at this time: NFC didn’t work :frowning: However, logs with the “fix” below:

OnePlus9Pro:/ $ logcat *:W | grep -i nfc
01-09 01:59:52.940   240   240 E qcom,sn-nci 5-0028: error reading NFC VDDIO min and max value
01-09 01:59:52.940   240   240 E qcom,sn-nci 5-0028: error reading NFC current value
01-09 01:59:52.940   240   240 E nfc_ldo_config: regulator entry not present
03-02 18:08:17.060  3438  3672 W libnfc_nci: [WARNING:gki_ulinux.cc(98)] gki_task task_id=0 terminating
03-02 18:08:17.185  1034  1034 E NxpFwDnld: phDnldNfc_SetDlRspTimeout timeout value =9c4
03-02 18:08:17.185  1034  1034 E NxpFwDnld: phDnldNfc_SetDlRspTimeout timeout value =9c4
03-02 18:08:17.208  3438  3673 W libnfc_nci: [WARNING:nfc_ncif.cc(1660)] reset notification!!:0x2 
03-02 18:08:17.247  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-02 18:08:17.247  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-02 18:08:17.256  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-02 18:08:17.274  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-02 18:08:17.274  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-02 18:08:17.528  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-02 18:08:17.528  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-02 18:08:17.577  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-02 18:08:17.577  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: resetModified Unable to open file for writing
03-02 18:08:17.577  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-02 18:08:17.577  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: isModified Unable to open file assume modified
03-02 18:08:17.577  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: resetModified Unable to open file for writing
03-02 18:08:17.577  1034  1034 E vendor.nxp.hardware.nfc@2.0-service: resetModified Unable to open file for writing
03-02 18:08:17.615  3438  3673 W libnfc_nci: [WARNING:nfa_hci_utils.cc(1083)] nfa_hciu_send_to_app no callback,  event: 0x0008  app_handle: 0x0000
03-02 18:08:17.670  3438  3673 W libnfc_nci: [WARNING:nfa_ee_act.cc(2174)] nfa_ee_nci_mode_set_rsp p_rsp->status:0x03
03-02 18:08:17.679  3438  3673 W libnfc_nci: [WARNING:nfa_ee_act.cc(2174)] nfa_ee_nci_mode_set_rsp p_rsp->status:0x03
03-02 18:08:17.695  3438  3673 W libnfc_nci: [WARNING:nfa_hci_utils.cc(1083)] nfa_hciu_send_to_app no callback,  event: 0x0005  app_handle: 0x0000
03-02 18:08:17.731  3438  3673 W libnfc_nci: [WARNING:nfa_ee_act.cc(2174)] nfa_ee_nci_mode_set_rsp p_rsp->status:0x00
03-02 18:08:17.751  3438  3666 E libnfc_nci: [ERROR:nfa_ee_api.cc(506)] Bad ee_handle
03-02 18:08:17.751  3438  3666 E libnfc_nci: [ERROR:nfa_ee_api.cc(442)] Bad ee_handle
03-02 18:08:17.751  3438  3666 E libnfc_nci: [ERROR:RoutingManager.cpp(583)] RoutingManager::updateDefaultProtocolRoute: failed to register default ISO-DEP route
03-02 18:08:17.754  3438  3673 W libnfc_nci: [WARNING:HciEventManager.cpp(152)] Incorrect Pipe Id
03-02 18:08:44.015  1424  2600 W InputManager-JNI: Input channel object 'e62bc5b Splash Screen com.wakdev.wdnfc (client)' was disposed without first being removed with the input manager!
03-02 18:08:58.384  3438  3673 E libnfc_nci: [ERROR:rw_mfc.cc(697)] rw_mfc_conn_cback NULL pointer
03-02 18:08:58.405  3438  3673 E libnfc_nci: [ERROR:rw_mfc.cc(697)] rw_mfc_conn_cback NULL pointer
03-02 18:08:58.421  3438  3673 E libnfc_nci: [ERROR:rw_mfc.cc(528)] RW_MfcDetectNDef
03-02 18:08:58.422  3438  3673 E libnfc_nci: [ERROR:rw_mfc.cc(884)] rw_mfc_readBlock: RW_MFC_SUBSTATE_WAIT_ACK
03-02 18:08:58.425  3438  3673 E libnfc_nci: [ERROR:rw_mfc.cc(697)] rw_mfc_conn_cback NULL pointer

Starting from smartphone boot, NFC Tool app activated at 18:08:44.015, NFC token put to the device at 18:08:58.384.

You may find this useful: Report an issue

@smu44 I do find it useful. Keep posting here while waiting when they allow me to register in GitLab which is needed to report an issue.

1 Like

Issue reported

2 Likes