Write TWELITE BLUE/RED firmware (beta)
Project description
tweliter
A Python module for writing TWELITE BLUE/RED firmware. (beta)
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.
- 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"
- Reload udev rules
sudo udevadm control --reload-rules
sudo udevadm trigger
Usage
Command line
$ tweliter 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:
# Get serial interface for communication
ser = liter.get_serial_instance()
# Reset and enter program mode
liter.enter_program_mode()
# Write firmware
liter.write_firmware(ser, file)
# Reset device to check startup message
liter.reset_device()
# Show startup message
ser.read_until(b"!INF MONO WIRELESS") # wait for prefix
line = ser.readline()
print(line.decode("utf-8").strip())
except IOError as e:
print(e)
LICENSE
MW-OSSLA
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tweliter-0.3.2.tar.gz.
File metadata
- Download URL: tweliter-0.3.2.tar.gz
- Upload date:
- Size: 406.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-51-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91e10719d7ef89d4938d9057dfb73a7196a7df318db0c57a4b9115b88be8c254
|
|
| MD5 |
1cc0a9661005c49bf73882428d0e5230
|
|
| BLAKE2b-256 |
6157461ac9d26f0122054b849793d0d1302703356cb059572f941e1d570626ea
|
File details
Details for the file tweliter-0.3.2-py3-none-any.whl.
File metadata
- Download URL: tweliter-0.3.2-py3-none-any.whl
- Upload date:
- Size: 414.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-51-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe5adec5ad7a0f0acc27a94931b3586e326667f2458b2618aa404a05a39de5b6
|
|
| MD5 |
17e9ca86d7655f2c67da1a71956ebe2c
|
|
| BLAKE2b-256 |
74fa4b03813dbdb9ed02c41a169c47d89417b32806af09fdd3ce3fa34fc9753e
|