Skip to main content

A FUSE plus MQTT plus REPL channelfor MicroPython

Project description

This is a file system plus console plus MQTT plus take-your-pick multiplexer for MicroPython.

On the embedded device, a small single-client server runs in the background. It receives file system commands, REPL input, OTA updates, MQTT messages, and/or any other commands you might want to hook up. It sends MQTT messages, REPL output, and any replies your commands generate.

The other side (Linux, for now) starts a multiplexer which connects to that mini-server and exposes a messaging socket and a bidirectional channel for raw REPL data. It also connects to MQTT.

A FUSE driver links the messaging socket to a convenient place in the file system; it’s also possible to send file system commands directly.

A terminal program (based on pyserial-miniterm) is included.

TODO

  • OTA updates.

  • File system commands from the command line / an async Python program.

  • The msgpack implementation needs improvement; it is crazy inefficient. Sending a console line should eat 50 bytes (one three-element dict to be transmitted) or zero bytes (if we hand-roll the message), not 1700.

  • There is not yet any attempt at reconnecting. (Should there be?)

  • There are occasional MicroPython crashes:

    assertion "ATB_GET_KIND(block) == AT_HEAD" failed: file "…/micropython/py/gc.c", line 591, function: gc_free

    This definitely looks like a MicroPython bug. The problem might be related to bytearray slicing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

microfuse-0.2.1.tar.gz (66.2 kB view details)

Uploaded Source

File details

Details for the file microfuse-0.2.1.tar.gz.

File metadata

  • Download URL: microfuse-0.2.1.tar.gz
  • Upload date:
  • Size: 66.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.9.2

File hashes

Hashes for microfuse-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fd6aa4744d51390ab9ff460f85f22137b82e4a933c6ba7fb5cea4732f474e5cc
MD5 653b553d495bb8399d5be83b5a5ae7da
BLAKE2b-256 dc88fa61ea4073b2df1394425bdad19598aeadc8be213bf85c8bbadff6383c71

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page