glider-maimu
Maimu BLE stimulator support for GLIDER.
Adds a Maimu device type and a Maimu node, so a stimulator can be added from Add Device → Maimu → Scan and driven from the flow graph without knowing the wire protocol.
Alpha. The protocol is exercised entirely against a fake BLE client. Nothing here has been run against a physical stimulator.
Install
pip install glider-maimu
Or from the Tools → Plugins… window inside GLIDER. A newly installed plugin loads without a restart.
The device
A Nordic/Zephyr peripheral with one writable characteristic that accepts three UTF-8 commands:
| Command | Meaning |
|---|---|
on |
Turn on and stay on |
off |
Turn off |
<period_ms>,<duration_s> |
Toggle every period_ms ms, for duration_s seconds |
Note the first field is a period in milliseconds, not a frequency — 500,10
toggles about once a second for ten seconds.
Settings
| Setting | Notes |
|---|---|
| Address / UUID | Filled by the Scan button. MAC on Windows/Linux, per-host UUID on macOS. |
| Advertised name | Set this instead of an address and the unit is found by name at connect time, so the same .glider file opens on any machine. |
| Command characteristic | Pre-filled. Advanced. |
| Service UUID | Pre-filled. Reference only. |
Because macOS hides the real MAC and hands out a per-host UUID, a file with a hardcoded address is not portable between machines. Setting the advertised name is what makes it portable.
Actions
on, off, pulse(period_ms, duration_s), and the inherited write as an
escape hatch for anything a future firmware adds. There is no read: the
peripheral has no read characteristic, so offering one would only allow
selecting an action that fails at runtime.
pulse rejects zero, negative and fractional values rather than writing a
command the firmware would atoi into something else.
period_ms and duration_s are declared in ACTION_ARGS_SCHEMA, which is
what lets pulse render as two number fields beside its button — in the
Builder's Device Control panel and the Runner's manual controls alike —
instead of needing a Device Action node with hand-typed arguments.
The node
One exec in, one exec out, with Mode (On / Off / Pulse), Period and
Duration in its properties.
Pulse is fire-and-continue. exec out fires as soon as the write lands and
the stimulator runs the pattern itself — which is what exec out means
everywhere else in GLIDER. Put a Delay node after it to hold the flow for the
duration.
Closed-loop use
The node's exec input accepts anything that fires execution, including the
Behavior Input node, so a stimulus can be delivered because of what the
animal is doing:
Behavior Input (freezing) ──On Enter──▶ Maimu (Pulse 500 ms / 10 s)
Any behavior the loaded model recognises works — darting, grooming, whatever it
was trained on. tests/test_behavior_triggers_stimulus.py drives that whole
chain and asserts on the bytes reaching the peripheral.
Stopping
The firmware runs a pulse autonomously, so dropping the BLE link mid-pulse
would leave the device stimulating with nothing connected to stop it. The device
therefore writes off before it disconnects, bounded so it cannot eat GLIDER's
emergency-stop budget. Emergency stop, End Experiment and app quit all stop the
device through that one path.
The same reasoning covers a link that drops on its own — out of range, out of
power, claimed by another central. GLIDER reconnects it with bounded backoff
(5, 10, 20, 40 and 60 seconds, up to twelve attempts) and, the moment it is
back, writes off before anything else touches the device. A stimulator that
reconnected mid-pattern comes back in a known state instead of resuming one
nobody is watching — re-issue the pulse yourself if you still want it.
Development
PYTHONPATH="src;plugins/glider-maimu/src" QT_QPA_PLATFORM=offscreen \
pytest plugins/glider-maimu/tests/
The plugin's source must be on PYTHONPATH (or installed editable), or an
older installed copy shadows it.
Metadata
Release files for glider-maimu 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| glider_maimu-0.1.0.tar.gz | 25.1 kB | With provenance | Details for glider_maimu-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| glider_maimu-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for glider_maimu-0.1.0-py3-none-any.whl |
Total release size: 37.5 kB
Release files / glider_maimu-0.1.0.tar.gz
| Download URL | glider_maimu-0.1.0.tar.gz |
|---|---|
| Size | 25.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dabe5cc9c1215626b88ad4cbc211ae44c4c01dbaae0891419caf20319907201c
|
|
BLAKE2b-256 checksum How to use checksums |
248ca2f4b54e213c3e2960aa094386d83de099e997af748ccd7b02d26020c4c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logRelease files / glider_maimu-0.1.0-py3-none-any.whl
| Download URL | glider_maimu-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3b99fd63defa8fc40a20407b20c1dd4c5f4ddc69dbf4211671e7414fa76de84
|
|
BLAKE2b-256 checksum How to use checksums |
b08f176e58d60d5f0524e6da50fbc501b77c1b277b5dd9a08374b9ae7cd3ba4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logSecurity for glider-maimu 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for glider_maimu-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.