guild icon
Toit
#Is there a way to have a container to tell jag to turn off / diable wifi?
Thread channel in help
addshore
addshore 06/11/2025 03:44 PM
I have mainly used -D jag.wifi=false while using the run command.
And just gave it a go while installing a container, however on container restart jag and wifi came back up.

Is there a way to either 1) get a container to tell jag to turn off the wifi?
or 2) have something like -D jag.wifi=false be more persistent accross container restarts? while keeping jaguar running?
kaxori
kaxori 06/11/2025 07:28 PM
Hi addshore, I detected that -D jag.wifi=false works only for 10s. You must also specifiy a timeout -D jag.timeout=1000h. That helps for ESPnow devices, but isn't really nice.
In my opinion the wifi mode (without timeout) should be valid permanently (of course also after resets).#
(edited)
floitsch
floitsch 06/12/2025 08:02 AM
Jaguar doesn't have any service (yet), so no other container can tell Jaguar to turn off the WiFi.
When you run or container install a container you can tell Jaguar that it should turn off the wifi (-D jag.wifi=false). As kaxory said: there is a default timeout, after which the program is killed, to allow Jaguar to be accessible. Setting it to 1000h basically makes that timeout infinite.
When the container/program with the jag.wifi=false stops, then Jaguar resumes and starts again the WiFi.

Notes:
- the Jaguar service has gotten a bit more complicated with the different endpoints, but it's still really manageable. Don't hesitate to look at the sources.
- You could, in theory, add a container that provides a network service. That service could then be in control of whether WiFi is actually running or not. When using Artemis, net open is handled by such a service. This is, why you can do just net.open there and end up with a cellular service.
We typically call this then the "network manager".
3 messages in total