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)
Before using the --proxy command, you need to flash the ESP with an additional argument, --uart-endpoint-rx which will tell Jaguar on the device which additional pin it can use to receive UART data from.
For me, the flash command might therefore look like this…
jag flash --chip esp32c6 --port '/dev/ttyACM0' --uart-endpoint-rx=20Code language: Shell Session (shell)
On your ESP, you then need to short the UART RX pin to this other pin that you have defined.

Once flashed, connected, and turned on, if you run jag monitor without the --proxy option, you’ll start seeing some additional output in the terminal.
This additional output will be prefixed with a magic prefix, in this case Jag15261520
~ jag monitor --port "/dev/ttyACM0"
Starting serial monitor of port '/dev/ttyACM0' ...
ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x15 (USB_UART_HPSYS),boot:0x6f (SPI_FAST_FLASH_BOOT)
Saved PC:0x40812786
SPIWP:0xee
mode:DIO, clock div:2
load:0x40875720,len:0x9c
load:0x4086c110,len:0xb6c
load:0x4086e610,len:0x23b8
entry 0x4086c110
[toit] INFO: starting <v2.0.0-alpha.184>
[toit] DEBUG: clearing RTC memory: powered on by hardware source
[toit] INFO: running on ESP32C6 - revision 0.1
Jag15261520SmDndyGVuZHBvaW80OnZW5lcmFsLHFydCAoY2NmZGExNzZmQaYy00MjI1LTljM2EtY3M2EwYjBhM2M2o=
[wifi] DEBUG: connecting
[wifi] DEBUG: connectedCode language: Shell Session (shell)
When you run with --proxy, the command will catch these lines, and do something else with them rather than show then to you!
And with the --proxy argument, you’ll also see logged output for the new UART connection for jaguar.
~ jag monitor --port "/dev/ttyACM0" --proxy
Starting serial monitor of port '/dev/ttyACM0' ...
ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x1 (POWERON),boot:0x7c (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x40875720,len:0x9c
load:0x4086c110,len:0xb6c
load:0x4086e610,len:0x23b8
entry 0x4086c110
[toit] INFO: starting <v2.0.0-alpha.184>
[toit] DEBUG: clearing RTC memory: invalid checksum
[toit] INFO: running on ESP32C6 - revision 0.0
[wifi] DEBUG: connecting
[wifi] DEBUG: connected
[jaguar.uart] INFO: running Jaguar device 'physical-setting' (id: '088eaa7c-08d2-4c90-b0f8-ad834bfa0c90'), proxied through 'http://10.255.255.254:41861'.Code language: Shell Session (shell)
You can then use this IP and Port combination for your interactions with the device.
You can use -D jag.wifi=false to disable the WiFi while an application is running during development, and -D jag.timeout can also be used to alter a timeout for this setting.
jag run --device 10.255.255.254:41861 ./src/espnow-pub.toit -D jag.wifi=false -D jag.timeout=10mCode language: Shell Session (shell)
Getting caught out by USB
Some dev boards, such as the one I first tried, actually expose 2 devices when connected, one which uses the ESP32 USB pins, and the other which uses UART0. You need to make sure your using the UART0 side of things if this is the case, otherwise things will not work!
On the custom board that we have with an ESP32 on it, although there is a USBC connection that I have been using to program the chip with for the past months, this is actually only connected to the USB data pins on the ESP32C6 (GPIO12/USB D- & GPIO13/USB D+). There is no UART0 choice.
Thus, I spent a good amount of time trying to figure out why the dev board worked, but the custom board did not! Make sure whatever you are using is actually connected to U0TXD and U0RXD.
As a result, in this case, jag monitor can not actually be used with the USB, it must be connected to a separate UART / COM reader, and the cable mod needs to include pass-through for the actual RX, as well as the loop back to the ESP board for the newly defined pin.
As a result, your cable mod might look a little different…

Depending on what you’re trying to do, you might also find it easiest to connect both the USB and UART0 to your machine for development… (Though this really does start becoming a few too many wires)
You can see the conversation from Discord at https://help.toit.io/transcripts/1377952521481355304.html which also mentions the PR that looks at making this jag connectivity also work via Bluetooth! (not yet merged).