2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
여러 기기 연결 테스트
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
배경
다음 명령어를 실행하여 여러 Cuttlefish 가상 기기를 실행할 수 있습니다.
launch_cvd --num_instances=n
--num_instances
플래그를 사용하여 두 개 이상의 인스턴스를 실행하는 경우 인스턴스는 Wi-Fi 및 블루투스에서 연결 매체를 공유합니다. 이 설정을 사용하면 Cuttlefish 인스턴스에서 추가 작업 없이 블루투스와 Wi-Fi를 통해 서로 찾고 연결할 수 있습니다.
하지만, --base_instance_num
플래그와 여러 launch_cvd
호출을 사용하여 여러 개의 인스턴스를 실행하고 있다면 wmediumd
의 vhost 서버 경로를 지정하여 Wi-Fi 매체를 공유하고 AP의 여러 VM 인스턴스 실행도 방지해야 합니다.
멀티 디바이스 실행 예
다음 명령어는 launch_cvd
직렬 실행을 사용하여 Wi-Fi 매체를 공유하는 두 개의 Cuttlefish 인스턴스를 실행하는 방법을 보여줍니다.
launch_cvd
launch_cvd --base_instance_num=2 \
--vhost_user_mac80211_hwsim=$HOME/cuttlefish_runtime.1/internal/vhost_user_mac80211 \
--ap_kernel_image="" --ap_rootfs_image="" #Prevent launching multiple VM instances for AP
블루투스
Cuttlefish 블루투스 구현은 rootcanal에서 지원하며 웹 UI 명령줄 콘솔로 제어할 수 있습니다.
콘솔에는 게스트 기기의 블루투스를 제어할 수 있는 몇 가지 명령어가 있습니다.
명령어 |
설명 |
list |
현재 기기 및 phy 목록 |
add DEVICE_TYPE [ARGS] |
DEVICE_TYPE 유형의 새 기기 만들기 |
del DEVICE_INDEX |
기기 삭제 |
add_phy PHY_TYPE |
PHY_TYPE의 새 phy 추가 |
del_phy PHY_INDEX |
phy 삭제 |
add_device_to_phy DEVICE_INDEX PHY_INDEX |
phy에 기기 추가 |
del_device_from_phy DEVICE_INDEX PHY_INDEX |
phy에서 `기기 삭제 |
add_remote HOSTNAME PORT PHY_TYPE |
원격 Rootcanal을 기기로 추가하고 phy에 등록 |
기기 유형 및 인수 |
beacon [MAC_ADDRESS] [ADVERTISE_INTERVAL] |
scripted_beacon [MAC_ADDRESS] [CONFIG_PATH] [EVENTS_PATH] |
keyboard [MAC_ADDRESS] [ADVERTISE_INTERVAL] |
loopback [MAC_ADDRESS] [ADVERTISE_INTERVAL] |
sniffer |
Wi-Fi
wmediumd_control
wmediumd_control
은 Wi-Fi 연결 매체를 제어하는 명령줄 도구로, Wi-Fi를 조작하기 위해 다음과 같은 명령어를 사용합니다.
명령어 |
설명 |
set_snr MAC_ADDR1
MAC_ADDR2
SNR_VALUE |
두 스테이션 간 SNR 값(0~255) 설정
|
start_pcap PCAP_FILE_PATH
|
전송되는 모든 프레임의 캡처 시작 및 .pcap 파일에 저장 |
stop_pcap
|
현재 패킷 캡처 중지 및 마무리 |
list_stations
|
wmediumd에 연결된 모든 스테이션 나열 |
reload_config
[CONFIG_FILE_PATH]
|
CONFIG_FILE_PATH의 wmediumd 구성 새로고침(CONFIG_FILE_PATH가 생략된 경우에는 현재 로드된 구성 파일을 새로고침) |
set_position MAC_ADDR
X_POSITION
Y_POSITION |
2차원 공간에서 스테이션 위치 설정
|
OpenWRT
OpenWRT(액세스 포인트)에 연결하려면 ssh
나 관리자 웹페이지 중 하나를 사용하면 됩니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 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,["# Test connectivity of multiple devices\n\nBackground\n----------\n\nRunning multiple Cuttlefish virtual devices can be done by executing the\nfollowing command: \n\n```\nlaunch_cvd --num_instances=n\n```\n\nWhen you are running two or more instances using `--num_instances` flag,\ninstances share the connectivity medium for Wi-Fi and Bluetooth. This setting\nallows the Cuttlefish instances to discover and connect to each other via\nBluetooth and Wi-Fi without additional action.\n\nHowever, if you are executing multiple instances by using the\n`--base_instance_num` flag and multiple `launch_cvd` invocations, you need\nto specify `wmediumd`'s vhost server path to share Wi-Fi medium, and also\nprevent launching multiple VM instances for AP.\n\nMulti-device launch example\n---------------------------\n\nThe following commands show how to launch two Cuttlefish instances that share\nthe Wi-Fi medium using serial execution of `launch_cvd`. \n\n```\nlaunch_cvd\n``` \n\n```\nlaunch_cvd --base_instance_num=2 \\\n --vhost_user_mac80211_hwsim=$HOME/cuttlefish_runtime.1/internal/vhost_user_mac80211 \\\n --ap_kernel_image=\"\" --ap_rootfs_image=\"\" #Prevent launching multiple VM instances for AP\n```\n\nBluetooth\n---------\n\nThe Cuttlefish bluetooth implementation is supported by rootcanal and can be\ncontrolled with the Web UI command line console.\n\nIn the console, there are several commands that allow for the control of\nbluetooth on the guest device:\n\n| Command | Description |\n|--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|\n| `list` | List current devices and phys |\n| `add` \u003cvar translate=\"no\"\u003eDEVICE_TYPE\u003c/var\u003e \u003cvar translate=\"no\"\u003e[ARGS]\u003c/var\u003e | Create new device of type \u003cvar translate=\"no\"\u003eDEVICE_TYPE\u003c/var\u003e |\n| `del` \u003cvar translate=\"no\"\u003eDEVICE_INDEX\u003c/var\u003e | Delete a device |\n| `add_phy` \u003cvar translate=\"no\"\u003ePHY_TYPE\u003c/var\u003e | Add new phy with \u003cvar translate=\"no\"\u003ePHY_TYPE\u003c/var\u003e |\n| `del_phy` \u003cvar translate=\"no\"\u003ePHY_INDEX\u003c/var\u003e | Delete a phy |\n| `add_device_to_phy` \u003cvar translate=\"no\"\u003eDEVICE_INDEX\u003c/var\u003e \u003cvar translate=\"no\"\u003ePHY_INDEX\u003c/var\u003e | Add a device to phy |\n| `del_device_from_phy` \u003cvar translate=\"no\"\u003eDEVICE_INDEX\u003c/var\u003e \u003cvar translate=\"no\"\u003ePHY_INDEX\u003c/var\u003e | Delete a \\`device from phy |\n| `add_remote` \u003cvar translate=\"no\"\u003eHOSTNAME\u003c/var\u003e \u003cvar translate=\"no\"\u003ePORT PHY_TYPE\u003c/var\u003e | Add a remote Rootcanal as device and register it to phy |\n\n| Device type and args |\n|-------------------------------------------------------------------------------------------------------------------------------------------|\n| `beacon` \u003cvar translate=\"no\"\u003e[MAC_ADDRESS]\u003c/var\u003e \u003cvar translate=\"no\"\u003e[ADVERTISE_INTERVAL]\u003c/var\u003e |\n| `scripted_beacon` \u003cvar translate=\"no\"\u003e[MAC_ADDRESS]\u003c/var\u003e \u003cvar translate=\"no\"\u003e[CONFIG_PATH]\u003c/var\u003e \u003cvar translate=\"no\"\u003e[EVENTS_PATH]\u003c/var\u003e |\n| `keyboard` \u003cvar translate=\"no\"\u003e[MAC_ADDRESS]\u003c/var\u003e \u003cvar translate=\"no\"\u003e[ADVERTISE_INTERVAL]\u003c/var\u003e |\n| `loopback` \u003cvar translate=\"no\"\u003e[MAC_ADDRESS]\u003c/var\u003e \u003cvar translate=\"no\"\u003e[ADVERTISE_INTERVAL]\u003c/var\u003e |\n| `sniffer` |\n\nWi-Fi\n-----\n\n### wmediumd_control\n\n`wmediumd_control` is a command-line tool that controls Wi-Fi connectivity\nmedium. The tool has the following commands to manipulate Wi-Fi:\n\n| Command | Description |\n|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\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 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 stores it to .pcap file |\n| `stop_pcap` | Stop and finalize current packet capture |\n| `list_stations` | List all stations attached to wmediumd |\n| `reload_config` \u003cvar translate=\"no\"\u003e[CONFIG_FILE_PATH]\u003c/var\u003e | Reload wmediumd configuration with \u003cvar translate=\"no\"\u003eCONFIG_FILE_PATH\u003c/var\u003e, if \u003cvar translate=\"no\"\u003eCONFIG_FILE_PATH\u003c/var\u003e is omitted, reload currently loaded config file |\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\n### OpenWRT\n\nIf you want to connect to OpenWRT (Access Point), you can use either `ssh` or\nthe admin webpage.\n\n| Connection Type | Method |\n|-----------------|-------------------------------|\n| ssh | ``` ssh root@192.168.96.2 ``` |\n| Admin webpage | \u003chttps://192.168.96.2\u003e |"]]