README.md 1.97 KB
Newer Older
1
# nfcUID
qwelp's avatar
qwelp committed
2
Console application for reading NFC tag UID by NFC reader and write it as keyboard output.
3

qwelp's avatar
qwelp committed
4
5
6
7
8
9
10

## Overview
Application read NFC tag UID using PC/SC API.
PC/SC is a standard to interface computers with smartcards, available on most operating systems, including Windows, MacOS, Linux.
UID writed in active text input field by generating keystrokes on the keyboard.
So cursor should be in some text input field.
UID output format options are available.
11
12

## Supported readers
qwelp's avatar
qwelp committed
13
Application should work with any PC/SC compatible reader. It is tested with ACS readers:
14
15
16
  - ACR122U
  - ACR1281U-C1
  - ACR1252U-M1
qwelp's avatar
qwelp committed
17

18
## Supported NFC tags
qwelp's avatar
qwelp committed
19
Application should work with any NFC tag with UID. It is tested with NXP tags:
20
21
22
23
24
25
  - Mifare Classic
  - Mifare Ultralight
  - NTAG203
  - NTAG213
  - NTAG216

qwelp's avatar
qwelp committed
26
## Install
27

qwelp's avatar
qwelp committed
28
29
```golang
go get github.com/taglme/nfcuid
30
```
qwelp's avatar
qwelp committed
31
32
33
34

## Build

```golang
35
36
go build
```
qwelp's avatar
qwelp committed
37

qwelp's avatar
qwelp committed
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
## Flags

There are options for application that should be specified as flags.

 - '-device' (integer) - device number to use. Set to 0 if your want to select it manually or set to the desired device number to auto-select.
 - '-caps-lock' (boolean) -  UID output with caps lock
 - '-decimal' (boolean) - UID output in decimal format
 - '-reverse' (boolean) - UID output in reverse order
 - '-end-char' (string) - character at the end of UID. Options: 'hyphen', 'enter', 'semicolon', 'colon', 'comma', 'none', 'space', 'tab',  (default "none")
 - '-int-char' (string) - character between bytes of UID. Options: 'hyphen', 'enter', 'semicolon', 'colon', 'comma', 'none', 'space', 'tab',  (default "none")

Run with '-h' flag to check usage
```
nfcUID -h
```

## Examples

```golang
//This will auto-select first available PC/SC device in system
//Output will be in direct order 
//Bytes of UID will be in hex format
//Between bytes of UID will be hyphen ("-") printed
//At end of UID newline will be printed
nfcUID -end-char=enter -in-char=hyphen -caps-lock=false -reverse=false -decimal=false -device=1

//Output 
04-ae-65-ca-82-49-80

```