{"id":36211910,"url":"https://github.com/justinribeiro/chrome-nfc","last_synced_at":"2026-01-11T04:02:11.571Z","repository":{"id":23205760,"uuid":"26562549","full_name":"justinribeiro/chrome-nfc","owner":"justinribeiro","description":"Chrome App NFC Library. JDR: Implemented NFC Forum Type 4 Tag Operation.","archived":false,"fork":true,"pushed_at":"2014-11-20T03:27:29.000Z","size":377,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-02T05:38:37.416Z","etag":null,"topics":["chrome-app","nfc","nfc-forum","web"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"googlearchive/chrome-nfc","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justinribeiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-13T00:13:45.000Z","updated_at":"2021-08-07T02:15:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/justinribeiro/chrome-nfc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justinribeiro/chrome-nfc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinribeiro%2Fchrome-nfc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinribeiro%2Fchrome-nfc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinribeiro%2Fchrome-nfc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinribeiro%2Fchrome-nfc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinribeiro","download_url":"https://codeload.github.com/justinribeiro/chrome-nfc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinribeiro%2Fchrome-nfc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28280303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T03:48:11.750Z","status":"ssl_error","status_checked_at":"2026-01-11T03:48:02.765Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["chrome-app","nfc","nfc-forum","web"],"created_at":"2026-01-11T04:02:10.742Z","updated_at":"2026-01-11T04:02:11.566Z","avatar_url":"https://github.com/justinribeiro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chrome App NFC Library\n\nWith this simple library, you can build a [Chrome App](https://developer.chrome.com/apps) that communicates over USB with NFC Readers.\n\n## Supported NFC Readers\n\n[ACR122U](http://www.acs.com.hk/en/products/3/acr122u-usb-nfc-reader) | [SCL3711](http://www.identive-group.com/products-and-solutions/identification-products/mobility-solutions/mobile-readers/scl3711-contactless-usb-smart-card-reader)\n--- | --- \n\u003cimg src=\"https://raw.github.com/GoogleChrome/chrome-nfc/master/sample/images/acr122u.png\"/\u003e | \u003cimg src=\"https://raw.github.com/GoogleChrome/chrome-nfc/master/sample/images/scl3711.png\"/\u003e\n\n## Play with the Chrome App sample\n\n* Check `Developer Mode` in `chrome://extensions`\n* Click \"Load unpacked extension...\" in `chrome://extensions` and select the [sample](/sample) folder.\n* Launch it.\n\n\u003cimg src=\"https://raw.github.com/GoogleChrome/chrome-nfc/master/sample/screenshots/1040x811.png\"/\u003e\n\n## Caveats\n\nLearn more about USB Devices Caveats at https://developer.chrome.com/apps/app_usb#caveats\n\n## Usage\n\nOnce you've imported the [chrome-nfc.js](https:///raw.github.com/GoogleChrome/chrome-nfc/master/sample/chrome-nfc.js) javascript library into your Chrome App, you need to add the permissions below to your manifest file:\n\n```javascript\n\"permissions\": [\n  \"usb\",\n  {\n    \"usbDevices\": [\n      { \"vendorId\": 1254, \"productId\": 21905 }, // SCL3711\n      { \"vendorId\": 1839, \"productId\": 8704 }   // ACR122U\n    ]\n  }\n]\n```\n\n### Enumerate NFC readers\n\n``` javascript\nchrome.nfc.findDevices(function(devices) {\n  console.log(\"Found \" + devices.length + \" NFC device(s)\");\n  for (var i = 0; i \u003c devices.length; i++) {\n    var device = devices[i];\n    console.log(device.vendorId, device.productId);\n  }\n});\n```\n\n### Read NFC tag\n\n``` javascript\nchrome.nfc.findDevices(function(devices) {\n  var device = devices[0];\n  chrome.nfc.read(device, {}, function(type, ndef) {\n    console.lof(ndef);\n    var uri = ndef.ndef[0][\"uri\"];\n    console.log(uri);\n    var text = ndef.ndef[1][\"text\"];\n    console.log(text);\n  });\n});\n```\n\n### Write NFC tag\n\n``` javascript\nchrome.nfc.findDevices(function(devices) {\n  var device = devices[0];\n  var ndef = [\n    {\"text\": \"Chromium.org website\" },\n    {\"uri\": \"http://chromium.org\" },\n    {\"aar\": \"com.google.samples.apps.iosched\" },\n  ];\n  chrome.nfc.write(device, {\"ndef\": ndef}, function(rc) {\n    if (!rc) {\n      console.log(\"WRITE() success!\");\n    } else {\n      console.log(\"WRITE() FAILED, rc = \" + rc);\n    }\n  });\n});\n```\n\n### Emulate NFC tag\n\n``` javascript\nchrome.nfc.findDevices(function(devices) {\n  var device = devices[0];\n  var ndef = [\n    {\"type\": \"URI\", \"uri\": \"http://chromium.org\"}\n  ];\n  chrome.nfc.emulate_tag(device, {\"ndef\": ndef}, function(rc) {\n    if (!rc) {\n      console.log(\"EMULATE() success!\");\n    } else {\n      console.log(\"EMULATE() FAILED, rc = \" + rc);\n    }\n  });\n});\n```\n\n### Read Mifare Classic tag (Logic Mode)\n\n``` javascript\nchrome.nfc.findDevices(function(devices) {\n  var device = devices[0];\n  chrome.nfc.read_logic(device, 0, 2, function(rc, data) {\n    console.log(UTIL_BytesToHex(data));\n  });\n});\n```\n\n### Write Mifare Classic tag (Logic Mode)\n\n``` javascript\nchrome.nfc.findDevices(function(devices) {\n  var device = devices[0];\n  var data = new Uint8Array([ // NDEF(http://google.com)\n    0xdb, 0x00, 0x03, 0xe1, 0x00, 0x00, 0x00, 0x00, // block 0 (MAD1)\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // block 1 (MAD1)\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x03, 0x0f, 0xd1, 0x01, 0x0b, 0x55, 0x03, 0x67, // block 2 (NDEF)\n    0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f,\n    0x6d, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // block 3 (NDEF)\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n  ]);\n  chrome.nfc.write_logic(device, 0, data, function(rc) {\n    console.log(\"WRITE_LOGIC() SUCCESS\");\n  });\n});\n```\n\n## Compiling the library\n\nCompiling script requires [Python 3.0](http://www.python.org/download/releases/3.0/) and will use online [Closure Compiler](https://developers.google.com/closure/). Just run\n\n    python3 compile.py\n\nand the library will be written to `chrome-nfc.js`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinribeiro%2Fchrome-nfc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinribeiro%2Fchrome-nfc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinribeiro%2Fchrome-nfc/lists"}