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
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(file, verify=True)
# Show startup message
ser = liter.get_serial_instance()
print(liter.get_startup_message_after(ser, "!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
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.4.tar.gz.
File metadata
- Download URL: tweliter-0.3.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d9479ffdb0417f84456cbb3207b57876278654ae5189f867608644ce3767bd7
|
|
| MD5 |
0774ed58d448b4dafad70930bd0ff808
|
|
| BLAKE2b-256 |
183b5d675c0138808cf9110136aef589746278b12a284918942805149bc767d6
|
File details
Details for the file tweliter-0.3.4-py3-none-any.whl.
File metadata
- Download URL: tweliter-0.3.4-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2943617ff8bee882a21aeafc076b5ec9c6946694802e94ca239a47a3bc67aa28
|
|
| MD5 |
88ecfd35f480575643b1c1e7dfb7bf5b
|
|
| BLAKE2b-256 |
97055c8d63e8573b238b54a49a54f15eb3ac78880c75aacda3187f43a3a41a83
|