Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zgbjgg/arygon_nfc

arygon_nfc - NFC reader erlang application
https://github.com/zgbjgg/arygon_nfc

arygon-nfc erlang nfc reader

Last synced: about 2 months ago
JSON representation

arygon_nfc - NFC reader erlang application

Awesome Lists containing this project

README

        

arygon_nfc - NFC reader erlang application
======

Compile the application

$ make all

arygon_nfc have a dependence "gnuart", is necessary start it before. start applications with the correct path
$ erl -pa ebin/ deps/gnuart/ebin

1> application:start(gnuart).
ok

Start arygon_nfc

2> application:start(arygon_nfc).
ok

Open the device

3> arygon_nfc:open().
arygon nfc got: <<"device_open">>
ok

Subscribe the process to the application

4> arygon_nfc:subscribe().
{ok, #Ref<0.0.0.39>}

All messages sent to the subscribed process are in the form:

{nfc, Ref, Response}

Where Ref is the reference for the subscribed process and Response is the decoded
packet.


Send a TAMA command to the reader

5> arygon_nfc:send("0av").
arygon nfc got value: 'V6.6'
ok

Unsubscribe the process

6> arygon_nfc:unsusbribe().
ok

Close the device

7> arygon_nfc:close().
arygon nfc got: <<"device_close">>
ok