Toit: jag monitor proxy

While developing on ESP32 boards at Lightbug on some of our newer products, I have repeatedly wanted to run Toit and Jaguar without WiFi enabled during a development setting. Either to have WiFi off to keep power consumption lower, turn off the default network so that I can make use of a secondary network or set up my own hotspot, and most recently, so that I can quickly iterate while using ESP-NOW.

Many months ago @floitsch told me about the --proxy option for the jag monitor command in Discord, and I finally have gotten around to trying it out this week. Here is how it went…

Using –proxy

The --proxy argument exists on the jag monitor command, which is essentially a slightly fancy serial / COM port monitor.

Adding this argument will attempt to proxy the device to the local network via your computer, rather than via the ESPs own WiFi. As a result, you can turn the WiFi off!

~ jag monitor --help
Monitor the serial output of an ESP32

Usage:
  jag monitor [flags]

Flags:
  -a, --attach            attach to the serial output without rebooting it
      --baud uint         the baud rate for serial monitoring (default 115200)
      --envelope string   name or path of the firmware envelope
  -l, --force-plain       force output to use plain ASCII text
  -r, --force-pretty      force output to use terminal graphics
  -h, --help              help for monitor
  -p, --port string       port to monitor (default "/dev/ttyUSB0")
      --proxy             proxy the connected device to the local network
Code language: Shell Session (shell)

Read more