Skip to content

[ESP935]

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 now
      • DISABLE: disable the client, applied at next boot (or use CLOSE)
      • CLOSE: stop the client until next boot or ENABLE, the answer is sent before the client is stopped
  • In json format
{
"cmd":"935",
"status":"ok",
"data":"ENABLED - Connected"
}
  • cmd Id of requested command, should be 935
  • status status of command, should be ok
  • data content of response, here the current state
  • plain text format
ENABLED - Connected