Opening a lock with NFC, Arduino Mega and Android

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Opening a lock with NFC, Arduino Mega and Android

1,899 次查看
CM13
Contributor I

Hello everybody.

I tried to read my phones NFC ID with Arduino Mega and PN532. My problem is that the ID is only 4 bytes, and the last 3 are random. Because they are random i cant compare them with a constant in my code. 

My questions are:

       1- can i emulate a card ID with my android phone? If yes, how?

       2-can i read something unique from my phone with NFC?

       3-is there any android code (for the last part of my project i try to make an app) for reading data written by me in the phone, that is send to arduino with the help of NFC?

0 项奖励
回复
2 回复数

1,844 次查看
RobBickel
Contributor I

I think you might be thinking about this the wrong way. Instead of identifying the device you are communicating with, you want to establish communication and transfer your authentication data back and forth with the device at that address. The device id is prettymuch irrelevant as that will be wrapped. If you take a look at the Android SDK, specifically the android.nfc namespace, you will see a couple objects relevant to the phone's side, specifically android.nfc.NdefMessage. You would be better off with support from an android developer forum, as this doesn't really have anything to do with the NXP ICs, and a lot more to do with communicating with a downstream microcontroller. Feel free to send me a message if you need more pointed info. -Rob Bickel

0 项奖励
回复

1,866 次查看
jimmychan
NXP TechSupport
NXP TechSupport

Sorry, we don't have this kind of examples for your reference.

0 项奖励
回复