guild icon
Toit
#Is there a way to install a container with -D jag.disabled , but make it disable forever
Thread channel in help
addshore
addshore 04/23/2025 07:15 AM
I have a flash ESP, but I would like to disable jag forever, without needing to reflash it without jag
Is this possible? or should I just set a very large timeout?
addshoreOPaddshore
I have a flash ESP, but I would like to disable jag forever, without needing to reflash it without jag Is this possible? or should I just set a very large timeout?
floitsch
floitsch 04/23/2025 07:22 AM
If you don't need Jaguar, you can take the envelope and install the containers into it.
That's typically the way we expect users to deploy their devices.
floitsch
floitsch 04/23/2025 07:25 AM
I shortly wondered if you could just uninstall the Jaguar container, but since Jaguar is the one starting the containers, you would end up without any container starting at boot.
Maybe there is a way to add an "uninstall" functionality that flips the run-on-boot bits of all other containers and then removes its own container. Not really sure how easy that would be (or whether you can even remove your own container).
bitphlipphar
bitphlipphar 04/23/2025 07:43 AM
OTA to an envelope without jaguar seems like the easiest.
bitphlipphar
bitphlipphar 04/23/2025 07:49 AM
(you'll still need to install the containers in the envelope like Florian mentioned)
floitsch
floitsch 04/23/2025 07:49 AM
(untested)
Basically, you need to:
- Get the envelope you want to use as a base.
- Install your containers:
toit compile --snapshot -o my-prog.snapshot my-prog.main toit tools firmware -e my-envelope.envelope container install container-name my-prog.snapshot
- Ota update your device:
jag firmware update -d my-device-name --exclude-jaguar PATH-TO/my-envelope.envelope
bitphlipphar
bitphlipphar 04/23/2025 07:51 AM
Remember to bring your own OTA support if that's relevant.
addshore
addshore 04/23/2025 12:35 PM
Cool, all good to know.
The use case is basically just running demo code on devices (which wants control of the WiFi), and just wanting it to reset when I re flash i t later.
But also, not wanting to go through the "pain" or downloading the envelope, compiling the container snapshot, installing etc
floitsch
floitsch 04/23/2025 02:22 PM
Huge timeout works then.
If you want to install a container with that, then I often add a pin check (something like if pin32.get == 0: return ) in the beginning of my main, so I can easily get to Jaguar. Then I just pull pin32 to GND and reset the device.
addshore
addshore 04/24/2025 09:53 AM
So, other than a sneaky pin check, is there any other way of determining from another container, if jaguar is running?
addshoreOPaddshore
So, other than a sneaky pin check, is there any other way of determining from another container, if jaguar is running?
bitphlipphar
bitphlipphar 04/24/2025 09:53 AM
You mean actually running - or just installed?
addshore
addshore 04/24/2025 09:55 AM
actually running, TLDR I wa thinking of changing the behaviour of my code to setup its own wifi access point if jag isnt running, and use the existing one if it is
but perhaps just doing some network related check / wifi check might be easier that knowing about jag specifically?
floitsch
floitsch 04/24/2025 09:55 AM
The pin-check is more to actually get Jaguar running. It's basically: install my container with Jaguar disabled (with a huge timeout). That means that Jaguar will never start anymore, unless that container stops. Having the pin-check means that the container can decide that the user wants to run Jaguar and abort early, so that Jaguar starts up.
addshoreOPaddshore
actually running, TLDR I wa thinking of changing the behaviour of my code to setup its own wifi access point if jag isnt running, and use the existing one if it is but perhaps just...
floitsch
floitsch 04/24/2025 09:57 AM
This feels a bit heavy just for development. As a reminder: I would not ship anything with Jaguar installed.
addshore
addshore 04/24/2025 10:00 AM
yeah, your probably right and perhaps the timeout with a -D flag to switch behaviour is fine for now
16 messages in total