Set / Display native USB CDC client state
Only available on boards using native USB as serial port: ESP32-S2/S3/C3/C6 built with USB_CDC_CLIENT_FEATURE and ARDUINO_USB_CDC_ON_BOOT=1. See USB.
[ESP935](state) json=(no) pwd=(admin/user password)
-
json=no the output format can be in JSON or plain text
-
pwd=(admin password)the admin password if authentication is enabled -
state
- if state is empty, it will display current state and if a host is connected
- if state is not empty, it will set the state:
ENABLE: enable the client and start it nowDISABLE: disable the client, applied at next boot (or useCLOSE)CLOSE: stop the client until next boot orENABLE, the answer is sent before the client is stopped
Output
Section titled “Output”- In json format
{ "cmd":"935", "status":"ok", "data":"ENABLED - Connected"}cmdId of requested command, should be935statusstatus of command, should beokdatacontent of response, here the current state
- plain text format
ENABLED - Connected