Skip to main content

Write TWELITE BLUE/RED firmware (beta)

Project description

mono wireless logo

tweliter

A Python module for writing TWELITE BLUE/RED firmware. (beta)

MW-OSSLA

Overview

Write firmware over TWELITE R series via USB.

This module is executable in standalone and importable for your scripts.

Installation

The module is available in PyPI.

Use pip

pip install tweliter

or poetry

poetry add tweliter

Linux

Sometimes you need to set permission with udev.

  1. Create /etc/udev/rules.d/99-ftdi.rules
# TWELITE R / MONOSTICK (FT232R / 0403:6001)
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0666"

# TWELITE R2 / R3 (FT230X / 0403:6015)
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE="0666"
  1. Reload udev rules
sudo udevadm control --reload-rules
sudo udevadm trigger

Usage

Command line

Simply

$ tweliter dir/SomeApp_BLUE.bin

or with verifying

$ tweliter --verify dir/SomeApp_BLUE.bin

FTDI chip can be filtered

$ tweliter --url ftdi://:ft-x:/1 dir/SomeApp_BLUE.bin

In script

from pathlib import Path
from tweliter import Tweliter

file = Path('dir/SomeApp_BLUE.bin')

try:
    with Tweliter(url="ftdi://:ft-x:/1") as liter:
        # Write firmware
        liter.write(args.file, verify=True)
        # Show startup message
        print(liter.get_startup_message_after("!INF MONO WIRELESS"))
except IOError as e:
    print(f"Cannot connect {e}")
except RuntimeError as e:
    print(f"Failed to write {e}")

LICENSE

MW-OSSLA

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

tweliter-0.3.3.tar.gz (406.2 kB view details)

Uploaded Source

Built Distribution

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

tweliter-0.3.3-py3-none-any.whl (414.9 kB view details)

Uploaded Python 3

File details

Details for the file tweliter-0.3.3.tar.gz.

File metadata

  • Download URL: tweliter-0.3.3.tar.gz
  • Upload date:
  • Size: 406.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.9 Darwin/23.6.0

File hashes

Hashes for tweliter-0.3.3.tar.gz
Algorithm Hash digest
SHA256 7f98da89faca681e04631692386b57085cce624cb2a446345c9d60be9df16c53
MD5 383eb1705e5bc79d7bdfcbe00a92b8da
BLAKE2b-256 d736c00a7a5103d7336b220c71f63b03870f6062cfb4a6e4bce31ea30315161b

See more details on using hashes here.

File details

Details for the file tweliter-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: tweliter-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 414.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.9 Darwin/23.6.0

File hashes

Hashes for tweliter-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e318fb9dd9d0711905708d29d6148aa71d503d5a55db83feda0585624d744865
MD5 78a10b191458ed4be26cafdd1731ac93
BLAKE2b-256 f559cb4b66ce47d03f5461d3a22c33d89160771a18d25ec6467c0966b3ebb744

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