{"id":19535889,"url":"https://github.com/miyako/4d-plugin-scard-v3","last_synced_at":"2026-02-15T07:36:15.714Z","repository":{"id":147172453,"uuid":"424476509","full_name":"miyako/4d-plugin-scard-v3","owner":"miyako","description":"スマートカードAPI","archived":false,"fork":false,"pushed_at":"2022-11-25T01:46:47.000Z","size":11816,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T01:41:14.431Z","etag":null,"topics":["4d-plugin","nfc","usb"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miyako.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-04T04:57:50.000Z","updated_at":"2024-08-27T04:44:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b860bc9-3156-4a17-aa50-6153f00d87f6","html_url":"https://github.com/miyako/4d-plugin-scard-v3","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/miyako/4d-plugin-scard-v3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-scard-v3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-scard-v3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-scard-v3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-scard-v3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyako","download_url":"https://codeload.github.com/miyako/4d-plugin-scard-v3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-scard-v3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29472883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T06:58:05.414Z","status":"ssl_error","status_checked_at":"2026-02-15T06:58:05.085Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["4d-plugin","nfc","usb"],"created_at":"2024-11-11T02:20:12.741Z","updated_at":"2026-02-15T07:36:15.693Z","avatar_url":"https://github.com/miyako.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![version](https://img.shields.io/badge/version-17%2B-3E8B93)\n![platform](https://img.shields.io/static/v1?label=platform\u0026message=mac-intel%20|%20mac-arm%20|%20win-64\u0026color=blue)\n[![license](https://img.shields.io/github/license/miyako/4d-plugin-scard-v3)](LICENSE)\n![downloads](https://img.shields.io/github/downloads/miyako/4d-plugin-scard-v3/total)\n\n# 4d-plugin-scard-v3\nスマートカードAPI\n\nローレベルUSB通信のないバージョンは[こちら](https://github.com/miyako/4d-plugin-scard-v0)\n\n### macOSプラットフォーム使用上の注意\n\nプラグインは，内部的に[TKSmartCardSlotManager](https://developer.apple.com/documentation/cryptotokenkit/tksmartcardslotmanager?language=objc)クラスを使用しています。このAPIまたはPCSC Framworkを公証サンドボックスアプリで使用するためには，[com.apple.security.smartcard](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_smartcard?language=objc)エンタイトルメント付きでアプリがコード署名されていなければなりません。エンタイトルメントは，プラグインではなく，アプリ本体側のコード署名に含まれている必要があります。エンタイトルメント付きでアプリをコード署名する方法については[コード署名ツール](https://github.com/miyako/4d-class-build-application)を参照してください。\n\n[無料メンバーシップでコード署名](https://github.com/miyako/4d-plugin-scard-v3/blob/master/with-free-account.md)も参照\n\n* SONY PaSoRi RC-S310,RC-S320, RC-S330 (RC-S360, RC-S370): [libpafe](https://github.com/rfujita/libpafe)+libusbで対応\n* SONY PaSoRi [RC-S380](https://www.sony.co.jp/Products/felica/consumer/support/faq/detail/253.html): [libusb](https://github.com/libusb/libusb)で対応\n* SONY PaSoRi RC-S300 ~~11月11日発売予定~~\n\nSONY PaSoRi RC-S300が届きました。\n\nUSB-C Digital AV MultiportアダプタでMacにRC-S380を接続した場合，IDm/PMmは取得できますが，利用履歴 (`090f`) は通信エラーになるようです。USB-C - USBアダプタであれば問題ありません。また，RC-S300はどちらのアダプタでも大丈夫です。\n\n#### SONY PaSoRiのデバイス名について\n\n標準APIの代わりにUSBを使用するため，PaSoRiについては独自のデバイス名を返します。\n\n* USBのデバイス名: Sony RC-S380/P（個人用）, Sony RC-S380/S（業務用）\n* `SCardListReaders`のデバイス名 (Windows): Sony FeliCa Port/PaSoRi 3.0 0\n* プラグイン独自のデバイス名 (Mac): Sony FeliCa RC-S330, Sony FeliCa RC-S380\n\n---\n\n\u003cimg width=\"1104\" alt=\"スクリーンショット 2021-11-05 16 48 56\" src=\"https://user-images.githubusercontent.com/1725068/140476325-73319d2e-2af2-40f4-9012-647e1a225102.png\"\u003e\n\n### Windowsプラットフォーム使用上の注意\n\nRC-S380の独自プロトコルに対応していますが，リーダーはVID/PIDではなくデバイス名で判別しています。\n\n![1](https://user-images.githubusercontent.com/1725068/140601288-027c4fe3-d544-43a0-b248-61d61545db6e.png)\n\n---\n\n|  プラッットフォーム  |  機種  | IDm/PMm | 利用履歴 (`090f`) |\n| ---- | ---- | ---- | ---- |\n|  macOS  |  RC-S300  | OK | OK |\n|  macOS  |  RC-S380  | OK | OK |\n|  macOS  |  RC-S330  | OK | OK |\n|  Windows  |  RC-S380 | OK | OK |\n|  Windows  |  RC-S330 | ? | ? |\n\n私の環境ではRC-S330がWindowsで認識されませんでした。\n\n#### 参考記事\n\n* [プロデルで交通系ICカード履歴ビューアを作る](https://wp.utopiat.net/2017/08/305/)\n\n* [PaSoRi RC-S380特有の情報](https://tomosoft.jp/design/?p=5543)\n\n* [C#でNFC(Felica/Mifare)の読み取り](https://office-fun.com/techmemo-csharp-nfcreading-practice02/)\n\n* [PC/SCでFelica LiteにC言語でアクセスする](https://qiita.com/gpsnmeajp/items/d4810b175189609494ac)\n\n* [WebUSB APIでSuicaの履歴を読み取るメモ](https://www.kenichi-odo.com/articles/2020_10_11_read-suica-by-webusb)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-scard-v3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyako%2F4d-plugin-scard-v3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-scard-v3/lists"}