camera.switchWifi
앱은 카메라에 이 명령어를 전송하여
인터넷에 액세스할 수 있는 인프라 Wi-Fi에 액세스할 수 있습니다. 명령어에는 다음이 포함됩니다.
앱이 나중에 자신을 인증하는 데 사용할 사전 공유 보안 키 K
두 기기 모두 인프라 Wi-Fi로 전환한 후 카메라에 연결되어야 합니다.
이 명령어는 API 수준 2.1에 추가되었으며
직접 업로드.
매개변수
preSharedKey:
: 임의로 생성된 256비트 키로서
둘 다 인프라 Wi-Fi에 연결된 후 앱과 카메라에 연결할 수 있습니다.
예를 들어 OpenSSL의 RAND_bytes()를 사용하여 이를 생성할 수 있습니다.
- Wi-Fi SSID가
wifiSsid:
개 있습니다.
- Wi-Fi 비밀번호
wifiPwd:
개(있는 경우)
결과
오류
missingParameter:
일부 매개변수(예: preSharedKey
)가 누락되었습니다.
invalidParameterName:
하나 이상의 입력 매개변수 이름이
인식할 수 없습니다.
invalidParameterValue:
입력 매개변수 이름이 인식됨
하나 이상의 전달된 값이 잘못되었습니다. 예를 들면 wifiPwd
입니다.
문자열 대신 정수로 전달됩니다.
명령어 I/O |
|
명령어 입력 |
{ "parameters": { "preSharedKey": "random key", "wifiSsid": "home Wi-Fi", "wifiPwd": "wifi password" } } |
명령어 결과 |
none |
명령어 출력 (오류) |
{ "error": { "code": "missingParameter", "message": "Parameter preSharedKey is missing." } } |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-21(UTC)
[null,null,["최종 업데이트: 2024-08-21(UTC)"],[[["The command enables the app to provide the camera with infrastructure Wi-Fi credentials, including a pre-shared key for subsequent authentication."],["Introduced in API level 2.1, this command is specifically for Direct Upload functionality and facilitates camera-app communication over Wi-Fi."],["It requires parameters like preSharedKey, wifiSsid, and wifiPwd, and potential errors include missing or invalid parameters."],["The command itself doesn't return a result, but errors are indicated through specific error codes and messages."]]],["The app sends a command to the camera to grant it access to an infrastructure Wi-Fi network. This command requires three parameters: a 256-bit pre-shared key (`preSharedKey`) for later authentication, the Wi-Fi SSID (`wifiSsid`), and the Wi-Fi password (`wifiPwd`). The camera uses this information to connect to the network. No result is returned, but errors can occur if parameters are missing, unrecognized, or invalid. This was added in API level 2.1.\n"]]