Skip to content

A simple node-webkit application for www.unipiazza.it for scanning NFC devices and printing the relative server-generated token on a label using a DYMO printer. Built using web technologies

Notifications You must be signed in to change notification settings

unipiazza/unipiazza-scan-print

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unipiazza Scan and Print

This application is used at unipiazza for scanning NFC devices, send the tag to the server, and print the server generated token on a label.

Hardware requirements

- an Arduino Board (http://arduino.cc/); (or any PIC) - an RFID-MFRC522 module for Arduino (http://playground.arduino.cc/Learning/MFRC522, (or any nfc reader compatible with your pic) http://www.nxp.com/documents/data_sheet/MFRC522.pdf); - a Dymo printer;

Hardware installation

There's a ready sketch in ```arduino``` folder already configured for this application. You can upload it into your Arduino Board using the Arduino IDE (http://arduino.cc/en/pmwiki.php?n=main/software). Note that you have to install the rfid.zip library (https://github.com/miguelbalboa/rfid) before using the sketch. From the arduino IDE, simply do ```Sketch > Import Library``` and choose ```rfid.zip``` from the ```arduino``` folder.

You can also use a different PIC just writing on the serial port you set in config.json the NFG tag (14, hex) as buffer each time is read, preceded by a 'w' and followed by 'z'. (e.g.: ```w125a4b8f4f8v7cz```). With these control-characters you can send fragmented packets because of baudRate and the application will care to compose them properly.

System Requirements

This application is built using standard web technologies: HTML5, CSS3, Javascript. It uses some native and third party nodejs modules for accessing serial ports. It is run by node-webkit and it should be compatible with any node-webkit supported OS (Mac, Windows, Linux).

Please note this application has been tested on Mac Os 10.9.4 only.

Software requirements

- node-webkit (https://github.com/nwjs)
The fastest way to install node-webkit is using node package manager (npm). You can install the node-webkit version that best fit your OS. Ensure to have ```nodejs``` and ```npm``` installed on your machine before running ```$ npm```.

```npm install -g [email protected]```

Check https://github.com/nwjs/nw.js/tree/master#downloads to choose the version that most fit your OS instead of 0.10.5.

- Dyno Label v.8 or later. (http://www.dymo.com/en-US/dymo-user-guides)
this is need just for printing There's a fast installer for windows and Mac.

- If something doesn't work as expected when you run the application, Ensure to have all requirements listed here: https://github.com/voodootikigod/node-serialport#installation-special-cases

Installation

If you have node-webkit installed, you are almost near to go. There is a further step for using serial port on your computer for communicating with the PIC: this application includes a C++ addon for nodejs that should be built depending on the OS and depending on your node-webkit version.
This can be done using a third party module like https://github.com/mapbox/node-pre-gyp

Install node-pre-gyp:
```$ npm install -g node-pre-gyp```

From the project route, change directory into the module that should be built:
```$ cd node_modules/serialport```

Build the module using node-pre-gyp, where target is the version of node-webkit you have installed:
```$ node-pre-gyp build --runtime=node-webkit --target=0.10.5```

Go

You are ready to go, cd with terminal into the root folder of the project (where ```package.json``` is) and simply do:

```$ nodewebkit```

Configuration

In file config.json you can set some application's settings, like if storing the password locally for token refresh, the API endpoints for authentication and communication with server and the serial port the application will try to connect to.

Known Issues and Limitations

-On linux, node-pre-gyp need nw-gyp module installed before running
-On linux, you have to set permission of serial port to 777, otherwise the application will crash reporting an error: 'Cannot Open serialpor'.

About

A simple node-webkit application for www.unipiazza.it for scanning NFC devices and printing the relative server-generated token on a label using a DYMO printer. Built using web technologies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages