[LG Optimus 4X HD] Adam77Root:
Hello everybody!

While experimenting with NFC, I noticed that my phone doesn't recognize the two bundled Tag+. I've already tested almost everything, but couldn't find the root cause of it. I doesn't work on both stock V20A JB and CM10.1 yesterday's nightly.

If you don't want to read all the technical parts and would like to help, please jump to the end of the post.

First I checked the logcat. Every action regarding NFC returns with NFCSTATUS_SUCCESS, so I assume the problem isn't in the userland code. I checked the resistance of the antenna in the back cover. It isn't broken. Then I checked kernel logs. There are some lines there which seem to be suspicious, but I have checked some kernel logs uploaded by other users in kernel threads and they have the same. The first is logged when I turn off NFC:

<4>[13:06:25 18:04:11.250] tegra-i2c tegra-i2c.0: I2c error status 0x00000008
<4>[13:06:25 18:04:11.250] tegra-i2c tegra-i2c.0: no acknowledge from address 0x28
<4>[13:06:25 18:04:11.250] tegra-i2c tegra-i2c.0: Packet status 0x00010009
<3>[13:06:25 18:04:11.250] pn544_dev_write : i2c_master_send returned -121

Another log which isn't related to NFC, but still doesn't look good:

<4>[70:01:01 00:00:07.286] tegra-i2c tegra-i2c.4: I2c error status 0x00000008
<4>[70:01:01 00:00:07.286] tegra-i2c tegra-i2c.4: no acknowledge from address 0x4c
<4>[70:01:01 00:00:07.286] tegra-i2c tegra-i2c.4: Packet status 0x00010009
<3>[70:01:01 00:00:07.306] nct1008 4-004c: nct1008_i2c_verify_for_onoff: I2C Error!![num:2], Retry Done.

Thanks to [MENTION=3123550]tosco22[/MENTION] for the log (http://pastebin.com/Zw9PPXkz).

Then I checked NFC Test in the service menu (with the secret code 3845#*880#). Mainly all tests give success, except 'Check SWP Status' which outputs 'TEST SUCCESS: SWIO PASS, PMUVCC FAIL'. When checking through test options, some throw the same kernel log as the first I have posted above. When I try 'Continuous Tag Reading', it outputs:

<4>[13:06:29 16:48:26.565] ------------[ cut here ]------------
<4>[13:06:29 16:48:26.565] WARNING: at /home/woojin83.kim/X3_JB_EU/android/kernel/drivers/i2c/busses/i2c-tegra.c:737 tegra_i2c_xfer+0x3b4/0x514()
<4>[13:06:29 16:48:26.565] Modules linked in: raw_ip_net gator
<4>[13:06:29 16:48:26.565] [<c001503c>] (unwind_backtrace+0x0/0xec) from [<c06ca104>] (dump_stack+0x20/0x24)
<4>[13:06:29 16:48:26.565] [<c06ca104>] (dump_stack+0x20/0x24) from [<c0068824>] (warn_slowpath_common+0x5c/0x74)
<4>[13:06:29 16:48:26.565] [<c0068824>] (warn_slowpath_common+0x5c/0x74) from [<c0068868>] (warn_slowpath_null+0x2c/0x34)
<4>[13:06:29 16:48:26.565] [<c0068868>] (warn_slowpath_null+0x2c/0x34) from [<c0400520>] (tegra_i2c_xfer+0x3b4/0x514)
<4>[13:06:29 16:48:26.565] [<c0400520>] (tegra_i2c_xfer+0x3b4/0x514) from [<c03fca4c>] (i2c_transfer+0x9c/0xec)
<4>[13:06:29 16:48:26.565] [<c03fca4c>] (i2c_transfer+0x9c/0xec) from [<c03fcb48>] (i2c_master_send+0x4c/0x5c)
<4>[13:06:29 16:48:26.565] [<c03fcb48>] (i2c_master_send+0x4c/0x5c) from [<c03568cc>] (pn544_dev_write+0xac/0xe0)
<4>[13:06:29 16:48:26.565] [<c03568cc>] (pn544_dev_write+0xac/0xe0) from [<c0111aa8>] (vfs_write+0xc4/0x140)
<4>[13:06:29 16:48:26.565] [<c0111aa8>] (vfs_write+0xc4/0x140) from [<c0111d24>] (sys_write+0x4c/0x78)
<4>[13:06:29 16:48:26.565] [<c0111d24>] (sys_write+0x4c/0x78) from [<c000e080>] (ret_fast_syscall+0x0/0x30)
<4>[13:06:29 16:48:26.565] ---[ end trace ab8e02b47e44e432 ]---
<3>[13:06:29 16:48:26.565] tegra-i2c tegra-i2c.0: i2c transfer timed out, addr 0x0028, data 0x05
<3>[13:06:29 16:48:26.565] pn544_dev_write : i2c_master_send returned -110
<4>[13:06:29 16:48:27.565] ------------[ cut here ]------------
<4>[13:06:29 16:48:27.565] WARNING: at /home/woojin83.kim/X3_JB_EU/android/kernel/drivers/i2c/busses/i2c-tegra.c:737 tegra_i2c_xfer+0x3b4/0x514()
<4>[13:06:29 16:48:27.565] Modules linked in: raw_ip_net gator
<4>[13:06:29 16:48:27.565] [<c001503c>] (unwind_backtrace+0x0/0xec) from [<c06ca104>] (dump_stack+0x20/0x24)
<4>[13:06:29 16:48:27.565] [<c06ca104>] (dump_stack+0x20/0x24) from [<c0068824>] (warn_slowpath_common+0x5c/0x74)
<4>[13:06:29 16:48:27.565] [<c0068824>] (warn_slowpath_common+0x5c/0x74) from [<c0068868>] (warn_slowpath_null+0x2c/0x34)
<4>[13:06:29 16:48:27.575] [<c0068868>] (warn_slowpath_null+0x2c/0x34) from [<c0400520>] (tegra_i2c_xfer+0x3b4/0x514)
<4>[13:06:29 16:48:27.575] [<c0400520>] (tegra_i2c_xfer+0x3b4/0x514) from [<c03fca4c>] (i2c_transfer+0x9c/0xec)
<4>[13:06:29 16:48:27.575] [<c03fca4c>] (i2c_transfer+0x9c/0xec) from [<c0347620>] (inv_i2c_read+0x84/0xc4)
<4>[13:06:29 16:48:27.575] [<c0347620>] (inv_i2c_read+0x84/0xc4) from [<c03477c4>] (inv_serial_read+0x9c/0xec)
<4>[13:06:29 16:48:27.585] [<c03477c4>] (inv_serial_read+0x9c/0xec) from [<c034a454>] (mpu6050_read+0x34/0x3c)
<4>[13:06:29 16:48:27.585] [<c034a454>] (mpu6050_read+0x34/0x3c) from [<c034a078>] (inv_mpu_slave_read+0xc0/0x118)
<4>[13:06:29 16:48:27.585] [<c034a078>] (inv_mpu_slave_read+0xc0/0x118) from [<c034505c>] (inv_slave_read+0x60/0xc0)
<4>[13:06:29 16:48:27.585] [<c034505c>] (inv_slave_read+0x60/0xc0) from [<c0345940>] (mpu_dev_ioctl+0x884/0xa14)
<4>[13:06:29 16:48:27.585] [<c0345940>] (mpu_dev_ioctl+0x884/0xa14) from [<c012201c>] (do_vfs_ioctl+0x4f4/0x568)
<4>[13:06:29 16:48:27.585] [<c012201c>] (do_vfs_ioctl+0x4f4/0x568) from [<c01220d8>] (sys_ioctl+0x48/0x6c)
<4>[13:06:29 16:48:27.585] [<c01220d8>] (sys_ioctl+0x48/0x6c) from [<c000e080>] (ret_fast_syscall+0x0/0x30)
<4>[13:06:29 16:48:27.585] ---[ end trace ab8e02b47e44e433 ]---
<3>[13:06:29 16:48:27.585] tegra-i2c tegra-i2c.0: i2c transfer timed out, addr 0x0068, data 0x3b
<3>[13:06:29 16:48:27.585] /home/woojin83.kim/X3_JB_EU/android/kernel/drivers/misc/inv_mpu/mlsl-kernel.c|inv_i2c_read|85 returning -110
<3>[13:06:29 16:48:27.585] /home/woojin83.kim/X3_JB_EU/android/kernel/drivers/misc/inv_mpu/mlsl-kernel.c|inv_serial_read|272 returning -110

Another issue I can think of is that the back cover seems not to be in precise contact with the NFC antenna connectors. The plastic is a bit higher at the connectors and this might be causing the issue.

Of course it can also happen that the bundled Tag+'s are broken.

If anybody knows anything about these, please let me know. I would be very grateful if somebody could perform some simple tests:

Turn NFC on and off.

Go into the service menu by dialling 3845#*880#, going into 'NFC Test' and checking 'Check SWP Status' and 'Continuous Tag Reading' and tell what 'Check SWP Status' outputs. (You can test other things here as well, but do not choose 'Firmware upgrade', it didn't cause issues for me, but it is never good to mess with it.)

Get a logcat and dmesg and attach them here. Use this method as a reference.

Alternatively check if the plastic material is higher near the NFC connectors.

Thank you in advance!