The Debuggoid must be configured with a valid WiFi connection and MQTT broker. This tutorial details how-to send a configuration via commands sent to the debuggoid via to the ESP8266’s UART.
Prepare the serial connection
To configure the Debuggoid, you need a 3.3V-TTL serial port, like a 3.3V USB-UART data cable with a FTDI converter.
Check the voltage of the USB-UART data cable before connecting the cable to the Debuggoid. Some USB-UART data cable have both 3.3V and 5V power pins. You MUST make sure both the data and Vcc (power) pins are 3.3V.
- Connect a 3.3V USB-UART data cable connected to the pins GND/TX/RX. Power can also be provided by connecting the 3.3V pin. For more details on the pinout, see the Debuggoid page.
- Identify the correponding port: typically
/dev/ttyUSB0
or/dev/ttyACM0
on GNU/Linux,COM5
on Windows systems - Power-up or Reset the Debuggoid
Configuration
General format
Commands are JSON objects in the following format:
|
|
where cmd
is a command in:
help
: print help,config
: debuggoid configuration,reboot
: reboot the module,
The JSON string can be sent in a 1-line format, without newline chars nor indentation. The JSON string can be sent:
- by connecting the 3.3V USB-UART data cable connected to the pins GND/TX/RX (and no target connected to the SWD port),
- by the target connected via the SWD cable.
Send a configuration to the debuggoid
The debuggoid is configured via the config
command. The following JSON illustrate all the parameters available:
|
|
Sending an empty payload dumps the configuration:
|
|
To change few parameters, you can limit the payload field. For example, to adjust only the wifi parameters:
|
|
If you do not have a 3.3V USB-UART data cable, the target can be used to send a new configuration to the Debuggoid. For example, the following Arduino sketch reconfigures the MQTT broker: