[[["わかりやすい","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-03-26 UTC。"],[],[],null,["# Wi-Fi\n\nThis page describes how to control Wi-Fi on a Cuttlefish device.\n\nUse Wmediumd\n------------\n\nThe Cuttlefish Wi-Fi feature uses Wmediumd, a simulation tool,\nto simulate the wireless medium. Wmediumd manages the delivery of Wi-Fi packets\nbetween two Cuttlefish instances or between a Cuttlefish instance and an\nOpenWRT instance. Wmedium for Cuttlefish is implemented in\n[`/platform/external/wmediumd/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:external/wmediumd/).\n\nTo control the Wmediumd interface, use the `WmediumdService`\n(Android 14 or higher) or `wmedium_control`\n(Android 13 or lower) tool.\n\n### WmediumdService\n\nFor devices running Android 14 or higher, use\n`WmediumdService` to control the Wmedium tool. For details on how to control\nthis service using the REST API or the command line interface (CLI), see\n[Cuttlefish: Environment Control](/docs/devices/cuttlefish/control-environment).\n\nThe following table lists the methods in `WmediumdService`. For detailed\ninformation about the methods, see\n[`wmediumd.proto`](https://cs.android.com/android/platform/superproject/+/android-latest-release:external/wmediumd/wmediumd_server/wmediumd.proto).\n\n| Methods | Description |\n|----------------|-------------------------------------------------------------------------------|\n| `ListStations` | List all stations attached to Wmediumd. |\n| `LoadConfig` | Load Wmediumd configuration with a given file. |\n| `ReloadConfig` | Reload currently loaded Wmediumd configuration file. |\n| `SetCivicloc` | Set civic location (for example, postal address) of the specific station. |\n| `SetLci` | Set LCI (latitude, longitude, altitude) of the specific station. |\n| `SetPosition` | Set position of the station in two-dimensional space. |\n| `SetSnr` | Set signal-to-noise ratio (SNR) value (0-255) between two stations. |\n| `SetTxpower` | Set transmit power (TX power) of the specific station. |\n| `StartPcap` | Start capturing all frames transmitted to air and store it to a `.pcap` file. |\n| `StopPcap` | Stop and finalize current packet capture. |\n\n### wmediumd_control\n\n| **Note:** From Android 14, `WmediumdService` replaces the `wmediumd_control` tool.\n\nFor devices running Android 13 or lower, use the\n`wmediumd_control` tool to control the wireless medium in Cuttlefish devices.\nThe following table lists subcommands in `wmediumd_control`.\n\n| Subcommands | Description |\n|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `list_stations` | List all stations attached to Wmediumd. |\n| `reload_config` \u003cvar translate=\"no\"\u003e[\u003ccode translate=\"no\" dir=\"ltr\"\u003eCONFIG_FILE_PATH\u003c/code\u003e] \u003c/var\u003e | Reload Wmediumd configuration with \u003cvar translate=\"no\"\u003eCONFIG_FILE_PATH \u003c/var\u003e. If \u003cvar translate=\"no\"\u003e CONFIG_FILE_PATH\u003c/var\u003e is omitted, reload currently loaded config file. |\n| `set_civicloc `\u003cvar translate=\"no\"\u003eMAC_ADDR \u003c/var\u003e` `\u003cvar translate=\"no\"\u003eCIVICLOC\u003c/var\u003e | Set civic location (for example, postal address) of the specific station. |\n| `set_lci `\u003cvar translate=\"no\"\u003eMAC_ADDR \u003c/var\u003e` `\u003cvar translate=\"no\"\u003eLCI\u003c/var\u003e | Set LCI (latitude, longitude, altitude) of the specific station. |\n| `set_position `\u003cvar translate=\"no\"\u003eMAC_ADDR \u003c/var\u003e` `\u003cvar translate=\"no\"\u003eX_POSITION\u003c/var\u003e` `\u003cvar translate=\"no\"\u003eY_POSITION\u003c/var\u003e | Set position of the station in two-dimensional space. |\n| `set_snr `\u003cvar translate=\"no\"\u003eMAC_ADDR1 \u003c/var\u003e` `\u003cvar translate=\"no\"\u003eMAC_ADDR2\u003c/var\u003e` `\u003cvar translate=\"no\"\u003eSNR_VALUE\u003c/var\u003e | Set signal-to-noise ratio (SNR) value (0-255) between two stations. |\n| `start_pcap `\u003cvar translate=\"no\"\u003ePCAP_FILE_PATH \u003c/var\u003e | Start capturing all frames transmitted to air and store it to a `.pcap` file. |\n| `stop_pcap` | Stop and finalize current packet capture. |\n\nUse OpenWRT\n-----------\n\nThe Cuttlefish Wi-Fi feature supports using OpenWRT for virtualizing Wi-Fi\naccess points (APs). The OpenWRT implementation for Cuttlefish is at\n[`platform/external/openwrt-prebuilts/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:external/openwrt-prebuilts/).\n\nTo connect to OpenWRT, use the information in the following table. If you\ndon't append any options when launching Cuttlefish, the device ID is\n`cvd-1`, and the OpenWRT WAN IP address is `192.168.94.2` or `192.168.96.2`.\n\n| Connection type | Destination |\n|------------------|--------------------------------------------------------------------------------|\n| SSH | `root@`\u003cvar translate=\"no\"\u003eOPENWRT_WAN_IP_ADDRESS\u003c/var\u003e |\n| Webpage | `https://localhost:1443/devices/`\u003cvar translate=\"no\"\u003eDEVICE_ID\u003c/var\u003e`/openwrt` |\n| Webpage (legacy) | `https://`\u003cvar translate=\"no\"\u003eOPENWRT_WAN_IP_ADDRESS\u003c/var\u003e |\n\n### OpenwrtControlService\n\nFor devices running Android 14 or higher, to control\nand configure virtualized Wi-Fi APs, use the\n`OpenwrtControlService` service. For details on how to control this service\nusing the REST API or the CLI, see\n[Cuttlefish: Environment Control](/docs/devices/cuttlefish/control-environment).\n\nThe following table lists the methods in `OpenwrtControlService`. For detailed\ninformation about the methods, see\n[`openwrt_control.proto`](https://cs.android.com/android/platform/superproject/+/android-latest-release:device/google/cuttlefish/host/commands/openwrt_control_server/).\n\n| Methods | Description |\n|-----------------|-------------------------------------------------------------------------------------------------------------|\n| `LuciRpc` | Send RPC call to the Luci web interface in OpenWRT. |\n| `OpenwrtIpAddr` | Get OpenWRT WAN IP address. Use this address to connect an OpenWRT instance through SSH or a web interface. |"]]