All Projects → skjolber → External Nfc Api

skjolber / External Nfc Api

Licence: apache-2.0
Interaction with external NFC readers in Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to External Nfc Api

Chameleonmini
The ChameleonMini is a versatile contactless smartcard emulator compliant to NFC. The ChameleonMini was developed by https://kasper-oswald.de. The device is available at https://shop.kasper.it. For further information see the Getting Started Page https://rawgit.com/emsec/ChameleonMini/master/Doc/Doxygen/html/_page__getting_started.html or the Wiki tab above.
Stars: ✭ 1,133 (+821.14%)
Mutual labels:  reader, nfc
Acr122u Reader Writer
A simple tool to read/write Mifare RFID tags with an ACR122U device
Stars: ✭ 169 (+37.4%)
Mutual labels:  reader, nfc
Minikbd
Stars: ✭ 97 (-21.14%)
Mutual labels:  usb
Qrandbarcodescanner
An Android app for scanning QR codes and barcodes
Stars: ✭ 114 (-7.32%)
Mutual labels:  reader
Ndef Tools For Android
NDEF Tools for Android
Stars: ✭ 113 (-8.13%)
Mutual labels:  nfc
Glasgow
Scots Army Knife for electronics
Stars: ✭ 1,374 (+1017.07%)
Mutual labels:  usb
Ketai
Ketai sensor library for Processing (Android mode)
Stars: ✭ 114 (-7.32%)
Mutual labels:  nfc
Novelreader
仿照"任阅"的追书、看书的小说阅读器。重写"任阅"的代码,优化代码逻辑和代码结构,降低内存使用率。重写小说阅读器,支持网络阅读、本地阅读(支持分章,虚拟分章)。支持仿真翻页、上下滚动翻页等翻页效果。支持小说断点续传功能。优化用户使用体验。
Stars: ✭ 1,325 (+977.24%)
Mutual labels:  reader
Android Usb Gadget
Convert your Android phone to any USB device you like! USB Gadget Tool allows you to create and activate USB device roles, like a mouse or a keyboard. 🛠🛡📱
Stars: ✭ 118 (-4.07%)
Mutual labels:  usb
Dualsense Windows
Windows API for the PS5 DualSense controller
Stars: ✭ 111 (-9.76%)
Mutual labels:  usb
Blink1control2
Blink1Control in Electron, React, and Node. Control blink(1) USB RGB LED devices.
Stars: ✭ 116 (-5.69%)
Mutual labels:  usb
Ns Usbloader Mobile
Android Tinfoil/Awoo/GoldLeaf files uploader
Stars: ✭ 109 (-11.38%)
Mutual labels:  usb
Pyusb
USB access for Python
Stars: ✭ 1,377 (+1019.51%)
Mutual labels:  usb
Laravel Log Reader
A log reader and management tool for Laravel
Stars: ✭ 115 (-6.5%)
Mutual labels:  reader
Album Bankakyou
Most simple UI, gallery before your eyes.
Stars: ✭ 102 (-17.07%)
Mutual labels:  reader
Kreader
Android阅读器
Stars: ✭ 117 (-4.88%)
Mutual labels:  reader
Peertalk Simple
Communicate between iOS and Mac devices via USB
Stars: ✭ 96 (-21.95%)
Mutual labels:  usb
Vinylemulator
Emulate the tactile experience of a vinyl collection through your Sonos system, but with a back end run by Spotify
Stars: ✭ 106 (-13.82%)
Mutual labels:  nfc
Go Excel
A simple and light excel file reader to read a standard excel as a table faster | 一个轻量级的Excel数据读取库,用一种更`关系数据库`的方式解析Excel。
Stars: ✭ 114 (-7.32%)
Mutual labels:  reader
Deepreader
a highly modular, Vue.js-based framework designed for building online reading environments for deep reading of texts with rich annotations and integrated learning tools
Stars: ✭ 119 (-3.25%)
Mutual labels:  reader

External NFC Service (native style) for Android

Library for interaction with ACS NFC readers over USB; external NFC support Android devices.

Features:

  • External NFC reader management and interaction
  • Parallell use of external and/or internal NFC (i.e. in the same activity, both enabled at the same time)
  • Support for both tags and Android devices (Host Card Emulation), simultaneously
  • Use of forked android.nfc classes (Ndef, MifareUltralight, IsoDep, etc) for Android 10+ support.

As this project very much simplifies implementation for use-cases requiring external NFC readers, it saves a lot of development time (2-8 weeks depending on use-case and previous knowledge).

Bugs, feature suggestions and help requests can be filed with the issue-tracker. DO NOT send me emails unless you're prepared to pay for my time.

License

Apache 2.0

Usage

This repository contains source code for

There is also a Host Card Emulation client app for use with the Basic client app as well as Android-to-Android communication.

External NFC reader API

The API defines

  • broadcast actions
    • service start / stop and status
    • reader open / close and status
    • tag connect / disconnect
  • extras objects for interaction with readers
    • disable beeps
    • display text
    • configure NFC tech types (PICC)
    • enable/disable LEDs
    • run custom commands
    • and more..
  • abstract activities for interaction with built-in and external NFC (simultaneously)
  • these currently depend on the NDEF Tools for Android project.
  • Programmatically start and stop the service (see methods startService() and stopService() in the NfcExternalDetectorActivity class in for an example).

Supported readers

Currently the ACS readers

are supported and must be connected to your Android device via an On-The-Go (OTG) USB cable.

Additional ACR readers might work depending on their command set, however custom reader commands will (like LED, beep etc) will not be available.

Supported tag technology

The following tags are supported by the service

  • Mifare Ultralight familiy
    • Mifare Ultralight
    • NTAG 21x with FAST READ
  • Mifare Classic and friends
    • Not recommended due to security and compatibility issues
  • Desfire EV1 tags
  • Host Card Emulation - interaction with Android devices.

The readers can for the most part can be enabled for all tag types at the same time, including Host Card Emulation.

Please note:

  • Some readers only support a subset of the above tags
  • For ACR 122U the Mifare Classic does not work well.
  • No built-in NDEF support for Desfire EV1 cards

Configuration options

  • assume all NTAG21x Mifare Ultralight targets. This improves read speed, particullary for the tags which have legacy equivalents, like NTAG 210 and 213
  • read only tag UIDs, ignore other tag data. This improves read speed.
  • read NDEF data automatically
  • read UID for Desfire EV1 targets automatically

Reader connection

Note that not all Android devices actually have an USB hub, in which case no USB devices work.

Does the ACR reader not light up when connected to your device, even after the service asks for USB permissions? The ACR reader shuts down if there is not enough battery, so try charging your battery more, or connect external power.

If you are using external power, be aware that the connection order (device, reader, power) might be important. Known symptom:

  • Seeing an USB permissions window that disappears rather quickly.

Tag detection

There is quite a few types of tags out there, and if your tag type is not recognized, please let me know. If the tag does not register at all, make sure that auto polling is configured, and that the right protocols are enabled. Use the below utility apps for tweaking your reader settings.

Reader setting utility apps

You might be interested in

for configuration of your reader. Approximately the same configuration options are available using this API.

See also

This project contains adapted code from

  • NFC Tools for Java
  • SMARTRAC SDK for Android NFC NTAG

History

  • 2.1.0: Improve bluetooth handling, various bug fixes and a few improvements.
  • 2.0.0: Moved to wrapped android.nfc NFC android classes + various refactorings.
  • 1.0.0: Library using native NFC android classes
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].