{"id":18098487,"url":"https://github.com/danieloneill/nodeacr122u","last_synced_at":"2025-03-29T21:12:56.680Z","repository":{"id":89578104,"uuid":"48926194","full_name":"danieloneill/nodeacr122u","owner":"danieloneill","description":"Lightweight LibNFC glue for Node.js (intended for reading Mifare Classic RFIDs via ACR122U/USB)","archived":false,"fork":false,"pushed_at":"2016-01-02T23:33:09.000Z","size":13,"stargazers_count":14,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-09-19T06:48:15.834Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danieloneill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-02T22:35:50.000Z","updated_at":"2023-07-10T01:00:09.000Z","dependencies_parsed_at":"2023-03-16T20:00:36.137Z","dependency_job_id":null,"html_url":"https://github.com/danieloneill/nodeacr122u","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"b85753e15687d6ae5005f0274fb654c3b8337134"},"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieloneill%2Fnodeacr122u","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieloneill%2Fnodeacr122u/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieloneill%2Fnodeacr122u/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieloneill%2Fnodeacr122u/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danieloneill","download_url":"https://codeload.github.com/danieloneill/nodeacr122u/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246243553,"owners_count":20746311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-31T20:11:26.712Z","updated_at":"2025-03-29T21:12:56.652Z","avatar_url":"https://github.com/danieloneill.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nodeacr122u\nLightweight LibNFC glue for Node.js (intended for reading Mifare Classic RFIDs via ACR122U)\n\nIf you do intend on using this module with an ACR122U, I recommend fixing your libNFC driver with this patch:\n\n* [https://gist.github.com/danieloneill/3be43d5374c80d89ea73](https://gist.github.com/danieloneill/3be43d5374c80d89ea73)\n\nThis patch will fix the driver so it will emit NFC_ETIMEOUT events when there isn't an RFID tag within reader proximity. Without this patch libNFC will simply emit NFC_EIO (General I/O Error), causing the module to exit.\n\nIt also [checks packet sizes correctly, which for some reason the libNFC guys haven't yet fixed](http://osdir.com/ml/general/2014-08/msg50964.html).\n\n### Example\n\n```javascript\n#!/usr/bin/env node\n\nvar Acr122U = require('nodeacr122u');\n\nvar dev = Acr122U.create();\ndev.open( 'acr122_usb:', function(obj, err) {\n\tif( err ) {\n\t\tconsole.log(\"Acr122U: Failed to open device: \"+err);\n\t\treturn false;\n\t}\n\tdev['data'] = function(data) {\n\t\tconsole.log(\"Acr122U event: \"+JSON.stringify(data, null, 2));\n\t};\n});\n\n// Hack to prevent Node.js from exiting, sorry.\nvar http = require('http');\nvar httpServer = http.createServer(function(){});\nhttpServer.listen(8084);\nconsole.log(\"Listening for keyboard input...\");\n```\n\n# Methods\n\n## Factory\n\n### Acr122u::create()\n`Returns an initialised Acr122u object.`\n\n* Returns: An initialised Acr122u object.\n\n---\n\n## Acr122u object\n\n### Acr122uObject::open( path, callback( acr122uObject, error ) )\n`Open an Acr122u device, associate it to this object, and fire the provided callback upon completion.`\n\nThe parameters passed to the provided callback function are **Acr122uObject** which is a reference to the Acr122u object, and **error** which will be an error string in the case of an error, or undefined on success.\n\n* Returns: A reference to itself.\n\n### Acr122uObject::data( Acr122uEvent )\n`A virtual method of the Acr122uObject. Reimplement it to handle Acr122uEvents. It can be ignored, but if you ignore it, you might as well not use this module at all.`\n\n### Acr122uObject::closed( Acr122uObject )\n`A virtual method of the Acr122uObject. Reimplement it to react to the device being closed. Otherwise it can be ignored.`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieloneill%2Fnodeacr122u","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanieloneill%2Fnodeacr122u","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieloneill%2Fnodeacr122u/lists"}