EvoDownloadManager#
- class EvoDownloadManager(name='Evo', debug=False)#
BLE file download, console and sensor streaming service used by the Evo MicroPython firmware.
- start_advertising(interval_us=None)#
Begin BLE advertising for the download service.
- Returns:
None.
- stop_advertising()#
Stop BLE advertising.
- Returns:
None.
- set_name(name)#
Update the advertised BLE name.
- Returns:
None.
- console_write(text, stream='stdout')#
Send console text through the notify characteristic when connected.
- Returns:
Trueif the message was queued/sent, otherwiseFalse.
Configuration Helpers#
- config_get()#
Load the persistent download manager configuration.
- Returns:
Configuration dictionary.
- config_set(**kwargs)#
Update known configuration keys and write the config file.
- Returns:
Updated configuration dictionary.
Runtime Helpers#
- start(name=None, adv_interval_us=None, debug=None, ack_every=None, sensor_streaming=None, sensor_tick_ms=None)#
Create or reuse the shared service instance and start advertising.
- Returns:
The active
EvoDownloadManagerinstance.
- stop()#
Stop sensor streaming and advertising on the shared service instance.
- Returns:
None.
- auto_start()#
Start the service when persistent configuration has
enabledset.- Returns:
The active service instance, or
Nonewhen disabled.
- console_write(text, stream='stdout')#
Write text to the BLE console through the shared service.
- Returns:
Truewhen a service is running and accepts the write, otherwiseFalse.
- console_print(*args, sep=' ', end='\\n', stream='stdout')#
Format values like
print()and forward them toconsole_write.- Returns:
Truewhen sent, otherwiseFalse.
- status()#
Read current service and configuration status.
- Returns:
Dictionary.
- cli(cmd=None)#
Small command parser for status, enable/disable, naming, ACK and sensor streaming settings.
- Returns:
Status dictionary for known commands, or an error dictionary for unknown commands.