guild icon
Toit
#Esp-now during development
Thread channel in help
addshore
addshore 05/30/2025 10:11 AM
I was skimming the docs sites, pkg and previous discord chats around usage of esp-now, and as far as I can see it won't be able to be used while a device is simultaneously connected to WiFi?
Does this ultimately lead to a bit of an annoying dev cycle again? / Is there a recognized pattern to make this easier (and or any examples).
Or is it just the case of turning of Jag while running such dev code trying to make use of esp now?
floitsch
floitsch 05/30/2025 12:57 PM
Correct. At the moment you have to turn off WiFi while running code that uses espnow.
In the latest Jaguar, the flag is called -D jag.wifi=false, and it is exactly for these kind of use cases. It allows to run espnow code, as well as wifi hotspots.
๐Ÿ‘1
addshoreOPaddshore
makes me want to try out https://github.com/toitlang/jaguar/pull/553 again :๐Ÿ˜„:
floitsch
floitsch 06/09/2025 10:48 AM
The UART endpoint is already committed. You just need to connect a free pin to the RX pin and configure it accordingly
floitschfloitsch
The UART endpoint is already committed. You just need to connect a free pin to the RX pin and configure it accordingly
addshore
addshore 06/09/2025 11:15 AM
Yeah, let me try and remember about that one too
addshore
addshore 06/09/2025 01:39 PM
I got the proxying working well on a devkit board, however dont appear to be able to get it to work on our hardware.
Tried a bunhc of GPIO pins and I never see the [jaguar.uart] INFO: running Jaguar device log line :๐Ÿ˜ฆ:
floitsch
floitsch 06/09/2025 02:15 PM
Given that the uart-proxy uses the normal TX, you should still see that line, even if the pins aren't set up correctly.
floitsch
floitsch 06/09/2025 02:17 PM
Let's start with some easy tests:
if the device has the UART endpoint running, it will send a message over the normal console. That message is prefixed with "Jag15261520" (a magic value), to identify it as an out-of-band message.
If you run jag monitor without the --proxy flag, you should see this message pass by. If you never see something like this, then the uart-endpoint isn't enabled on the device.
floitsch
floitsch 06/09/2025 02:22 PM
I think the UART endpoint needs --uart-endpoint-rx, and--uart-endpoint-baud flags. If they are set, it should start the uart-endpoint. Even if the RX isn't correct, it should still print the Jag15... from above (or the monitor should log the "INFO..." line if started with --proxy).
addshore
addshore 06/09/2025 02:42 PM
Right, figured it all out
I was actually using the D+ D- USB lines, which the proxy wont work with!
After some more hacking, and re rememebring of things from earlier in the development cycle I think I have managed to get the proxy working!
๐Ÿ‘1
floitsch
floitsch 06/09/2025 02:43 PM
If you really use this approach often you could create a custom envelope with a higher baudrate for the console. Would make sending the data faster.
addshore
addshore 06/10/2025 09:14 AM
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 ofโ€ฆ
๐Ÿ™1
๐Ÿคฉ1
12 messages in total