Monday, May 20, 2013

More about the project

Brief Description
The scope i proposed is very simple. By putting the phone on the top of NFC development board then the door will open. After doing some research on the related topic, i know that this is not a easy task to achieve. At the end, i do nothing except some information from the research.

Detail
At the beginning i bought a NFC development breakout board which is using PN532 NFC chip from taobao. Then i started to learn how to link up this device with my smartphone.
Unfortunately, the communication between the breakout board and smartphone is quite complex which takes me a lot of time. NFC is only a standard work on the physical layer, then we need a NFC exchange protocol (NEP) to connect to our phone. Next, we need Logical Link Control Protocol (LLCP) which is the standard made for peer to peer communication on NFC. This is a two way channel in which both can create new message. In android, the most common format is NFC Data Exchange Format (NDEF) message. To transmit NDEF message we have to use NFC Push Protocol (NPP) to send the message. (NPP is used on android device only developed by google. Android is now supporting Simple NDEF Exchange Protocol (SNEP) which used to implement peer to peer NDEF message in any device).
Flow to obtain data:
1. Touch
2. NEP
3. LLCP
4. NPP/SNEP
5. NDEF
6. Data

On the other hand, getting the data between device(board/smartphone) is much simpler. 
Flow to obtain data:
1. Touch
2. NDEF
3. Data

Result
Smartphone and board
I can write/read the NDEF message from the Tag by smartphone and the development board respectively.
I use the HelloWorld tutorial application to write the tag.

Data read from the tag on NFC development board side.

Lock
The working principle of the lock is simple, the magnetic lock will open by shorting the control pin with the ground on the circuit inside the transformer.


Expected result
This is the expected result made at the beginning.



Difficultly
1. The communication protocol is too complicated which i spent a lot of time to study.
2. Most of the NFC and NFC board library were built and developed on Linux based Operation System, to  make it compatible with window is time consumption.
3.  Lack of learning materials on how to do communication between phone and development board.

Reference
Android developer
NFC HelloWorld example
NFC specification
About NFC on Forum
About peer to peer communication on Forum
Basic information about pn532 breakout board

Specification of LLCP, NPP, PN532

No comments:

Post a Comment