Skip to main content

Host-side tools that interact with the ESP-IDF firmware.

Project description

Host Python Tools

This folder contains host-side Python code that interacts with the ESP-IDF firmware (e.g., over serial, sockets, or file exchange). It is kept separate from the firmware build to avoid mixing tool dependencies with ESP-IDF.

Quick start

python -m venv .venv
source .venv/bin/activate
pip install -e .

enode-host --help
enode-host socket 127.0.0.1 3333 "hello"
enode-host gui --port 3333
enode-host map-server --port 8081

Notes

  • Add runtime dependencies to pyproject.toml under project.dependencies.
  • Keep device/transport details in small modules so they can be shared by scripts and tests.
  • The GUI uses wxPython; install it if you plan to run enode-host gui.
  • The GUI needs an active X11/Wayland display. On headless hosts, use xvfb-run enode-host gui.
  • If the GUI aborts with WebView/EGL errors on Linux, try WEBKIT_DISABLE_DMABUF_RENDERER=1 enode-host gui.
  • If WebView still fails, you can disable the map panel with ENODE_DISABLE_WEBVIEW=1 enode-host gui.
  • enode-host map-server serves fixed-size RGB viewports assembled from OpenStreetMap tiles so an ESP32 client can show a static map without embedding a full web map stack.
  • The default tile URL points at tile.openstreetmap.org. That is acceptable for light development use, but for sustained use you should switch the proxy to your own tile service or self-hosted tiles.

Protocol (TCP, length-prefixed)

Frame format: 1 byte message type, 2 bytes big-endian payload length, payload.

Message types:

  • 0x10 COMMAND (host -> device)
  • 0x20 STATUS (device -> host)
  • 0x30 ACK (either direction)
  • 0x40 DATA (device -> host, ACC batch)
  • 0x41 PPS (device -> host, immediate PPS)

Commands (payload begins with command_id):

  • 0x01 start_daq
  • 0x02 stop_daq
  • 0x03 set_mode (1 byte: 0 realtime, 1 past)
  • 0x04 start_realtime_stream
  • 0x05 stop_realtime_stream

Status payload (16 bytes):

  • node_type: uint8
  • node_number: uint8
  • level: uint8
  • parent_mac: 6 bytes
  • self_mac: 6 bytes
  • rssi: int8

DATA payload:

  • node_type: uint8
  • node_number: uint8
  • sample_count: uint8
  • repeated samples (count):
    • cc: uint64 (big-endian)
    • acc_x: float32 (big-endian)
    • acc_y: float32 (big-endian)
    • acc_z: float32 (big-endian)

PPS payload:

  • node_type: uint8
  • node_number: uint8
  • cc: uint64 (big-endian)
  • epoch: int64 (big-endian)

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

enode_host-0.1.13.tar.gz (123.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enode_host-0.1.13-py3-none-any.whl (136.8 kB view details)

Uploaded Python 3

File details

Details for the file enode_host-0.1.13.tar.gz.

File metadata

  • Download URL: enode_host-0.1.13.tar.gz
  • Upload date:
  • Size: 123.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for enode_host-0.1.13.tar.gz
Algorithm Hash digest
SHA256 d0becd5815d23cc53050b05ccdcf2c38a3874eb3260bbf7a769b3d0f80682e4e
MD5 8d1bb9589eae517bc5e3c0c480af0ca5
BLAKE2b-256 34d112d01ed8660fe2e0fdc082b32f604bcae7fec6eef6c58fe4ee39b4c6fa4e

See more details on using hashes here.

File details

Details for the file enode_host-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: enode_host-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 136.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for enode_host-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 a5b451e23f6fa8e75da9873a7083d943cd00b3fd4e99687cd3578c46d77e1057
MD5 a563fd3157531c7e7ae639a228d8c19b
BLAKE2b-256 6556f54f4d35cf0da1a5449fa50f7b1aedbd6887353fea41068c522ae5e7f56c

See more details on using hashes here.

Supported by

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