PN7120 integration with android

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

PN7120 integration with android

2,069 Views
venkatesansubbu
Contributor I

Trying to integrate PN7120 with android system. getting following messages

[   70.817523] pn54x_dev_open : 10,56

[   70.875924] pn54x_dev_ioctl, cmd=1074063617, arg=1

[   70.972485] pn544_enable power on

[   71.229363] pn54x_dev_ioctl, cmd=1074063617, arg=0

[   71.253630] pn544_disable power off

[   71.491964] pn54x_dev_ioctl, cmd=1074063617, arg=1

[   71.497000] pn544_enable power on

[   71.669942] pn54x_dev_write : i2c_master_send returned -121

[   71.772276] pn54x_dev_write : i2c_master_send returned -121

[   71.857472] pn54x_dev_write : i2c_master_send returned -121

[   71.965402] pn54x_dev_write : i2c_master_send returned -121

[   71.983767] pn54x_dev_write : i2c_master_send returned -121

[   72.003583] pn54x_dev_write : i2c_master_send returned -121

[   72.017645] pn54x_dev_ioctl, cmd=1074063617, arg=1

[   72.025201] pn544_enable power on

[   72.239459] pn54x_dev_ioctl, cmd=1074063617, arg=0

[   72.251812] pn544_disable power off

[   72.459436] pn54x_dev_ioctl, cmd=1074063617, arg=1

[   72.470346] pn544_enable power on

[   72.591335] pn54x_dev_ioctl, cmd=1074063617, arg=2

[   72.659337] pn544_enable power on with firmware

[   72.722492] pn544_enable Unused Firm GPIO 2

[   72.843934] pn54x_dev_ioctl, cmd=1074063617, arg=0

[   72.869792] pn544_disable power off

[   72.989573] pn54x_dev_ioctl, cmd=1074063617, arg=1

[   73.002045] pn544_enable power on

Not able to ON the NFC in android setting.

May I get any help.

regards

venkat

Baytech

0 Kudos
Reply
6 Replies

1,590 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello venkatesan,

     According to logs you sent, NFC device has been driven successfully in linux kernel, becuase NFC app could open it(see logs of No.1 line)

     Correct logs is here: NFC PN7120 on the i.MX6Q , see "6. TESTING NFC READER" in it. So now, the main issue of your system is I2C communication.

     From ERROR definitions in error.h of linux: #define EREMOTEIO 121 /* Remote I/O error */ , Host I2C can't read and write data from/to PN7120 device, so I suggest you had better take some time to check hardware, as for reference, the following items possibly cause I2C bus communication failed.

1. The value of pull-up resistor is too big.

2. devices on i2c bus are more than 4

3. lines of i2c bus are too long

  Above 2 & 3 can both cause load capacitor bigger, and affect i2c bus communication.

  So please try to check hardware issue at frist!

Best Regards,

Weidong

0 Kudos
Reply

1,590 Views
venkatesansubbu
Contributor I

The PN7120 kit is working findé in Linux. The same hardware interface is used for Android Lollipop. Still we connected the 1K resistor for pull-up in I2c bus. But the same error persist.

In the logcat, it is looking for libpn548ad_fw.so. is it correct for PN7120 setup.

We followed the same patches mentioned in the porting guide.

May I get guidance in resolving this issue.

regards

venkat

baytech

pastedImage_0.png

0 Kudos
Reply

1,590 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello venkat,

    OK, since PN7120 works fine on linux platform, it means hardware is no probelm, then please check the following info:

(1) Your android version.

Is your android verison is android 5.1.1 ? Our patches of PN7120 is for version 5.1.1

(2)libpn548ad_fw.so file

PN7120 doesn't need the firmware, because all firmwares are fixed in PN7120. so please check if android's corresponding configurations set path for PN7120.

Best Regards,

Weidong

0 Kudos
Reply

1,590 Views
venkatesansubbu
Contributor I

Yes. it is correct. The issue is in AOSP compilation. the chip is not properly selected in one of the Android.mk file.

Now it is working fine

0 Kudos
Reply

1,551 Views
sawan_roy
Contributor I

hi venkatesansubbu,
Can ypu please let me know exact path and change for same issue.
I am having i2c error as -107 and device is based on qualcom

 

0 Kudos
Reply

1,590 Views
venkatesansubbu
Contributor I

But it is working fine for 5.1.0 version

0 Kudos
Reply