Commit Graph

11 Commits

Author SHA1 Message Date
Tobias Mueller
0fa4d89602 switch: do not run the lock contention check in the background
It actually prevents out main script from running because the flock
process is still running in the background.
2023-10-17 15:49:25 +02:00
Tobias Mueller
ed6856c490 switch: split the switch action into separate stages
When toggling the switch, a lock is held for a relatively long time,
preventing another toggling of the switch to be noticed. With this
change, I hope we can first shutdown the modem, wait for a toggle, and
then continue.
We're losing the abort function but I currently don't know how we would
be able to keep that functionality given that the toggle is queued and
we don't get the notification.
2023-10-17 15:15:28 +02:00
Tobias Mueller
eab0633ad9 switch: Asynchronously execute blue merle when toggled
I hope that this allows us to use the toggle again to advance the Blue
Merle logic.
If all goes well, the script finishes execution and the switch lock in
/var/lock/gl-switch.lock is released so that the button can be used
again.
2023-10-17 13:51:51 +02:00
Tobias Mueller
db1c0c4c69 switch: limit execution time to 90 seconds
We don't want to let it run forever because it blocks the toggle from
working. But even if it's not, we wouldn't want to have the script run
eternally.
2023-10-17 13:02:40 +02:00
Tobias Mueller
6b7e11137b switch: send SIM swap script to background
I think we can only toggle while the handler is not active.
I toggled to ON and got the script running. But then I couldn't toggle
OFF, presumingly because the script was still running.
By sending it to the background I hope it will allow me to toggle OFF.
2023-10-17 09:57:47 +02:00
Tobias Mueller
881e9792c7 switch: call blue-merle-switch when toggling the button to on 2023-10-17 09:23:58 +02:00
Tobias Mueller
259bffc515 switch: show a message on toggling the button
To see more easily whether we have control.
2023-10-16 16:10:17 +02:00
Tobias Mueller
ce77151081 switch: log action on the toggle
It's a bit easier to follow than looking at the generated files.
2023-10-16 16:03:11 +02:00
Tobias Mueller
843ddf9e7d switch: attempt to react to the hardware button
I don't know whether this works. On the v4 firmware, we can see files in
/etc/gl-switch.d but I don't know yet how the system determines which
file to choose. I assume it's dependend on the "page" of the display.
But I haven't figured out yet how or rather where those pages are
organised.
2023-10-16 12:14:00 +02:00
Tobias Mueller
1a17e06a12 MAC address removal for v4 firmware
I have rsynced the whole device before associating with a new device and
after. The only file that got modified was /etc/oui-tertf/client.db.
We intend to have it stored in memory rather than on flash. This should
be okay since the kernel also holds the MAC addresses in memory.
2023-10-16 12:09:00 +02:00
kantorkel
cb4d73731f Initial commit 2022-10-21 10:14:38 +02:00