हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
आस-पास के उपकरणों से संपर्क (एन एफ सी)
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
इस पेज पर, Cuttlefish डिवाइस पर एनएफ़सी को कंट्रोल करने का तरीका बताया गया है. इसके लिए, Cuttlefish की एनएफ़सी सुविधा का इस्तेमाल किया जाता है. एनएफ़सी की सुविधा, Android 15 या इसके बाद के वर्शन पर काम करने वाले Cuttlefish डिवाइसों पर काम करती है.
Casimir का इस्तेमाल करना
Cuttlefish एनएफ़सी की सुविधा, Casimir का इस्तेमाल करती है. यह एक बाहरी एनएफ़सी डिवाइस सिम्युलेशन टूल है. यह होस्ट कार्ड इम्यूलेशन के लिए, एपीडीयू बाइट को इंजेक्ट करने की सुविधा देता है. Casimir को /platform/system/nfc/tools/casimir/
में लागू किया गया है.
Cuttlefish को लॉन्च करने पर, Casimir भी डिफ़ॉल्ट रूप से लॉन्च हो जाता है. Casimir को कंट्रोल करने के लिए, CasimirControlService
सेवा का इस्तेमाल करें.
CasimirControlService
CasimirControlService
सेवा का इस्तेमाल, REST API या कमांड लाइन इंटरफ़ेस के ज़रिए किया जा सकता है. ज़्यादा जानकारी के लिए, Cuttlefish: Environment Control देखें.
नीचे दी गई टेबल में, CasimirControlService
में इस्तेमाल किए गए तरीके के बारे में बताया गया है. ज़्यादा जानकारी के लिए, casimir_control.proto
देखें.
Method |
ब्यौरा |
SendApdu
|
NFC-A और ISO-DEP के साथ APDU बाइट (हेक्स स्ट्रिंग) भेजता है.
जवाब, हेक्स स्ट्रिंग के तौर पर दिया जाता है. |
यहां दो एपीडीयू बाइट, [0x00, 0x11, 0x22]
और [0x33, 0x44, 0x55]
भेजने के लिए, कमांड और जवाब का एक उदाहरण दिया गया है.
निर्देश
cvd env call CasimirControlService SendApdu '{apdu_hex_strings: ["001122", "334455"]}'
आसान जवाब
Rpc succeeded with OK status
{
"responseHexStrings": [
"9000",
"9000",
]
}
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# NFC\n\nThis page describes how to control NFC on a Cuttlefish device using the\nCuttlefish NFC feature. NFC is supported on Cuttlefish devices running\nAndroid 15 or higher.\n\nUse Casimir\n-----------\n\nThe Cuttlefish NFC feature uses Casimir, an external NFC device simulation tool,\nwhich supports injecting APDU bytes for host card emulation. Casimir is\nimplemented in\n[`/platform/system/nfc/tools/casimir/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/modules/Nfc/libnfc-nci/tools/casimir/).\n\nWhen launching Cuttlefish, Casimir is also launched by default. To\ncontrol Casimir, use the `CasimirControlService` service.\n\n### CasimirControlService\n\nYou can use the `CasimirControlService` service through the REST API or the\ncommand line interface. For details, see\n[Cuttlefish: Environment Control](/docs/setup/create/cuttlefish-control-environment).\n\nThe following table describes the method in `CasimirControlService`. For\nmore information, see\n[`casimir_control.proto`](https://cs.android.com/android/platform/superproject/+/android-latest-release:device/google/cuttlefish/host/commands/casimir_control_server/casimir_control.proto).\n\n| Method | Description |\n|------------|-------------------------------------------------------------------------------------------------|\n| `SendApdu` | Sends APDU bytes (hex strings) with NFC-A and ISO-DEP. The response is returned as hex strings. |\n\nThe following is an example command and a simplified response for sending two\nAPDU bytes, `[0x00, 0x11, 0x22]` and `[0x33, 0x44, 0x55]`.\n\n- Command\n\n cvd env call CasimirControlService SendApdu '{apdu_hex_strings: [\"001122\", \"334455\"]}'\n\n- Simplified response\n\n Rpc succeeded with OK status\n {\n \"responseHexStrings\": [\n \"9000\",\n \"9000\",\n ]\n }"]]