Opening a lock with NFC, Arduino Mega and Android

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

Opening a lock with NFC, Arduino Mega and Android

975 Views
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 Kudos
2 Replies

920 Views
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 Kudos

942 Views
jimmychan
NXP TechSupport
NXP TechSupport

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

0 Kudos