Sample applications for the @nordicid/nurapi TypeScript library, showing how to connect to Nordic ID NUR UHF RFID readers and perform common operations — inventory, tag read/write, GPIO, and more.
| Package | Description |
|---|---|
| example-web | Browser app (Chromium) — connects via Web Serial, Web Bluetooth, or WebSocket — live demo |
| example-node | Node.js console app — connects via USB serial, TCP, or WebSocket with interactive REPL |
Both samples demonstrate the same core workflow:
- Connect to a reader using a URI scheme (
ser://,ble://,tcp://,ws://) - Read device info — firmware version, capabilities, antenna configuration
- Run inventory — single-shot or continuous streaming to discover tags in the field
- Read/write tag memory — access EPC, TID, User, and Reserved memory banks
- Disconnect cleanly
- Node.js 18+
- Nordic ID NUR RFID reader (e.g. FR22, Stix, EXA51e, EXA21, HH85, or any NUR-based module)
- For the web sample: Chrome or Edge (Web Serial / Web Bluetooth require Chromium)
npm install
# Browser sample — opens at http://localhost:5173
npm run dev:web
# Node.js console demo
npm run demo:nodeThe API packages and full documentation are published at:
https://nordicid.github.io/nur_nurapi_typescript/
Local copies of the API reference are included in docs/ for offline use and AI assistant integration:
| File | Contents |
|---|---|
nurapi.api.md |
Core API — NurApi class, types, enums, events |
nurapi-web.api.md |
Browser transports — Web Serial, Web Bluetooth |
nurapi-node.api.md |
Node.js transports — serialport, TCP |
import '@nordicid/nurapi-web'; // registers browser transports (side-effect)
import { NurApi } from '@nordicid/nurapi';
const api = new NurApi();
await api.connect('ser://request'); // opens browser port picker
const result = await api.inventory(); // scan for tags
const tags = await api.fetchTags(); // retrieve found tags
for (const tag of tags) {
console.log(tag.epcHex, tag.rssi); // E200... -45
}
await api.disconnect();Use the update-nurapi prompt to upgrade @nordicid/nurapi packages and API docs to the latest version.
docs/ ← NurApi API docs (.api.md)
packages/
example-web/ ← Browser sample (Vite + vanilla TypeScript)
src/
main.ts ← Entry point — creates NurApi, wires events
state.ts ← Shared NurApi singleton (getApi/setApi)
ui/ ← UI panels (connection, inventory, tag-ops, …)
example-node/ ← Node.js sample (tsx)
src/
demo.ts ← Entry point — discovery, demo, REPL modes
utils.ts ← Console output helpers and demo logic
MIT — see LICENSE.