Skip to content

saproto/JulianaNFC_C

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JulianaNFC

Reads NFC-card and sends data to WebSocket. Forked from Inter-Actief/JulianaNFC_C.

Usage

  1. Grab the latest release and unzip.
    1. Do you need SSL? - Make sure you have a juliana.crt and juliana.key file.
  2. Start JulianaNFC.exe
  3. You can connect to the service at localhost:3000 (ws:// of wss://, depending on SSL)
  4. Plug in the nfc-card reader
  5. Scan a card, the data will be send to the WebSocket

Cardreaders

JulianaNFC is developed and tested on a ACR122U from ACS. This model is generally easy to find. Make sure the drivers are installed on your device.

Protocol

During connection we need to set the WebSocket protocol to nfc.

new WebSocket("ws://localhost:3000", "nfc");

The data you will receive when connecting is in the Json format.

{
  "type": "iso-a",
  "uid": "aa:bb:cc:dd",
  "atqa": "aa:bb",      // only for iso-a
  "sak": "aa",          // only for iso-a
}

Compiling

JulianaNFC is written in pure C and uses the Windows API. The included project files are for Visual Studio 2017. Strong reccomendation to use vcpkg. JulianaNFC depends on libwebsockets.

To install the dependencies run: vcpkg install libwebsockets:x86-windows libwebsockets:x64-windows.

After this you can open and build the solution.

Structure

  • build\ - output from Visual Studio
  • code\ - sourcecode
  • misc\
    • mkcert\ - script to generate SSL certificate
    • msvc\ - Visual Studio solution
    • nsis\ - NSIS instalation script

Questions?

Contact (Cas Ebbers) or the WWW-committee of Inter-Actief.

About

C implementation of Juliana NFC

Resources

Stars

Watchers

Forks

Languages

  • C 79.3%
  • NSIS 18.0%
  • Shell 1.4%
  • Batchfile 1.3%