Docs and code: translate Polish comments, messages and documentation to English
check / check-without-hardware (push) Successful in 6m45s

- README, CHANGELOG, RELEASE_NOTES, THIRD_PARTY_NOTICES and docs/*.md
  translated to English; cross-markdown anchors updated
- C/C++/Python/shell comments and user-facing messages translated
- identifiers, protocol names, commands and literals unchanged
- native tests re-verified: 24/24 PASS; tpms_frame.py self-test PASS
This commit is contained in:
czcionka committed 2026-10-30 18:01:32 +00:00
1 parent 1563e34d05
commit e183d23950
42 files changed
+1106 -1019

No files matched your search

+115 -106
View File
@@ -1,85 +1,89 @@
# Symulator TPMS Schrader EG53MA4 — ESP32-S2-MINI + CC1101
# Schrader EG53MA4 TPMS Simulator — ESP32-S2-MINI + CC1101
**Wersja 2.0.0-rc.1 — release candidate bez walidacji sprzętowej.**
**Version 2.0.0-rc.1 — release candidate without hardware validation.**
Urządzenie warsztatowe nadaje cztery niezależne identyfikatory TPMS profilem
OOK/Manchester Schrader EG53MA4 na 433,92 MHz. Domyślnie każde koło raportuje
**260 kPa (2,6 bar; bajt protokołu `0x68`)**. Docelowy scenariusz to diagnostyka
Opla Astry J Sedan 1.4 LPG (2016, EU), ale **zgodność trzeba potwierdzić dla
konkretnego auta**: przez VIN/wykaz serwisowy, oznaczenia fabrycznych czujników,
odczyt diagnostyczny albo test odbioru. Numer OE 13506028, numery powiązane ani
ogłoszenie sprzedażowe same w sobie nie potwierdzają profilu radiowego.
A workshop device that transmits four independent TPMS identifiers with the
OOK/Manchester Schrader EG53MA4 profile on 433.92 MHz. By default each wheel
reports **260 kPa (2.6 bar; protocol byte `0x68`)**. The target scenario is
diagnostics of an Opel Astra J Sedan 1.4 LPG (2016, EU), but **compatibility
must be confirmed for the specific car**: via VIN/service listings, markings of
factory sensors, a diagnostic readout, or a reception test. OE number
13506028, related part numbers, or a listing offer alone do not confirm the
radio profile.
> **Nie jest to homologowany czujnik ani zamiennik sprawnego TPMS. Nie używać
> w jeździe drogowej.** Sztuczne ciśnienie może ukryć przebitą lub niedopompowaną
> oponę i opóźnić ostrzeżenie. Przed i po teście sprawdź wszystkie opony
> niezależnym manometrem. Zobacz [SAFETY](docs/SAFETY.md).
> **This is not a homologated sensor nor a replacement for a working TPMS.
> Do not use while driving.** Synthetic pressure can hide a punctured or
> underinflated tyre and delay the warning. Before and after the test, check
> all tyres with an independent gauge. See [SAFETY](docs/SAFETY.md).
## Co jest gotowe, a czego nie
## What is done, and what is not
- Gotowe: build ESP32, testy ramek/NVS/maszyny stanów, syntetyczny CU8 dekodowany
przez niezależny `rtl_433`, trwała konfiguracja z konsoli, Clone IDs i LEARN.
- **Niewykonane:** pomiar rzeczywistego CC1101, RTL-SDR z anteną, test z samochodem,
pomiar prądu i testy automotive. Dlatego wynik jest RC, nie „validated”.
- Jedyny profil podstawowy to **OOK**. Nie przełączaj na FSK „na próbę”.
- ESP32 nie generuje nośnej 433 MHz — wymagany jest osobny CC1101 433 MHz.
- Done: ESP32 build, frame/NVS/state-machine tests, synthetic CU8 decoded by
an independent `rtl_433`, persistent configuration from the console, Clone
IDs and LEARN.
- **Not done:** measurement of a real CC1101, RTL-SDR with an antenna, a test
with a car, current measurement, and automotive tests. That is why the
result is RC, not "validated".
- The only base profile is **OOK**. Do not switch to FSK "just to try it".
- The ESP32 does not generate the 433 MHz carrier — a separate CC1101 433 MHz
is required.
## Schemat ideowy
## Concept sketch
```text
Prototyp na biurku:
USB-C ──> [ESP32-S2-MINI] ── SPI ──> [CC1101 433 MHz] ──> antena SMA
│ │ │
│ └── GPIO0: przycisk (BOOT) └── wspólna GND, tylko 3,3 V
└── GPIO15: wbudowana LED (aktywna HIGH)
Bench prototype:
USB-C ──> [ESP32-S2-MINI] ── SPI ──> [CC1101 433 MHz] ──> SMA antenna
│ │ │
│ └── GPIO0: button (BOOT) └── common GND, 3.3 V only
└── GPIO15: built-in LED (active HIGH)
Zasilanie docelowe z gniazda zapalniczki samochodowej:
wariant A: gniazdo ──> [ładowarka samochodowa USB] ──> USB-C płytki
wariant B: gniazdo ──> bezpiecznik/TVS ──> [LM317T 3,3 V] ──> 3V3 + VCC CC1101
Target supply from the car cigarette-lighter socket:
variant A: socket ──> [USB car charger] ──> board USB-C
variant B: socket ──> fuse/TVS ──> [LM317T 3.3 V] ──> 3V3 + CC1101 VCC
Konfiguracja: USB CDC 115200 → NVS → 4 × {ID, ciśnienie, temperatura}
Configuration: USB CDC 115200 → NVS → 4 × {ID, pressure, temperature}
```
Wyjście LM317T ustaw dzielnikiem na **3,3 V i podłącz do 3V3, nie do 5V**. Nie
podłączaj 12 V do GPIO, 3V3 ani 5V. Przy zasilaniu zewnętrznym 3,3 V odłącz
USB, chyba że separacja źródeł została sprawdzona w dokumentacji konkretnego
egzemplarza płytki. Gniazdo zapalniczki w większości aut jest zasilane tylko
po przekręceniu stacyjki — **sprawdź to w swoim aucie**. Wtedy emulator nie
pobiera prądu na postoju; komputer samochodowy i tak nie odczytuje stanu TPMS
przy wyłączonym zapłonie, więc brak nadawania parkingowego nie ma znaczenia.
Pełny pinout, dzielnik LM317T i kondensatory: [HARDWARE](docs/HARDWARE.md).
Set the LM317T output with the divider to **3.3 V and connect it to 3V3, not
to 5V**. Do not connect 12 V to GPIO, 3V3, or 5V. When powering from an
external 3.3 V source, disconnect USB unless source separation has been
verified for the specific board revision. In most cars the cigarette-lighter
socket is powered only after the ignition is switched on — **check this in
your own car**. Then the emulator draws no current while parked; the car
computer does not read TPMS state with the ignition off anyway, so lacking
parking transmission does not matter. Full pinout, the LM317T divider, and
capacitors: [HARDWARE](docs/HARDWARE.md).
## Quick Start
### 1. Złóż prototyp
### 1. Assemble the prototype
Kup elementy z [BOM](docs/HARDWARE.md#bom-prototypu-laboratoryjnego). Podłącz
CC1101 i przycisk zgodnie z tabelą pinów; LED jest już na płytce S2 Mini.
Na biurku zasil układ przez sprawdzony kabel USB-C z danymi. Nie montuj jeszcze
niczego w samochodzie.
Buy the parts from the [BOM](docs/HARDWARE.md#laboratory-prototype-bom).
Connect the CC1101 and the button according to the pin table; the LED is
already on the S2 Mini board. On the bench, power the device through a tested
USB-C cable that carries data. Do not install anything in the car yet.
### 2. Zainstaluj narzędzia i sprawdź projekt
### 2. Install the tools and verify the project
Wymagane: Python 3, Git, CMake, kompilator C/C++, `pkg-config` oraz nagłówki
libusb i librtlsdr.
Najprościej użyć Dockera:
Required: Python 3, Git, CMake, a C/C++ compiler, `pkg-config`, and the
libusb and librtlsdr headers. The easiest way is Docker:
```bash
docker build -t tpms-rc .
docker run --rm -v "$PWD/artifacts:/work/artifacts" tpms-rc
```
Bez Dockera skrypt utworzy `.venv` z PlatformIO, pobierze przypięty `rtl_433`
i referencyjne nagrania:
Without Docker, the script creates a `.venv` with PlatformIO, fetches the
pinned `rtl_433`, and the reference recordings:
```bash
bash tools/check_all
```
Ostatni komunikat musi brzmieć `PASS: wszystkie testy bez sprzetu...`.
To nie jest test fizycznego radia.
The last message must read `PASS: all hardware-free tests...`.
It is not a test of physical radio.
### 3. Skompiluj i wgraj
### 3. Build and flash
```bash
.venv/bin/pio run -e esp32s2mini
@@ -87,20 +91,22 @@ To nie jest test fizycznego radia.
.venv/bin/pio device monitor --baud 115200
```
Jeżeli port nie jest wykrywany automatycznie, dodaj `--upload-port /dev/ttyACM0`
(przy `run`) albo `--port /dev/ttyACM0` (przy `device monitor`). Zależnie od
systemu i trybu USB może to być również `/dev/ttyUSB0`. W monitorze PlatformIO
wyjście to zwykle `Ctrl+]`. Jeśli upload nie startuje, przytrzymaj **BOOT**,
naciśnij i puść **RESET**, następnie puść BOOT.
If the port is not detected automatically, add `--upload-port /dev/ttyACM0`
(for `run`) or `--port /dev/ttyACM0` (for `device monitor`). Depending on the
system and USB mode it may also be `/dev/ttyUSB0`. In the PlatformIO monitor,
the exit shortcut is usually `Ctrl+]`. If the upload does not start, hold
**BOOT**, press and release **RESET**, then release BOOT.
Po uruchomieniu wpisz `stay 300` i Enter. Masz 5 minut na konfigurację; polecenie
`info` pokazuje aktywne wartości. Każda zmiana konfiguracji jest od razu zapisywana
w NVS i zachowuje się po restarcie — **nie edytuj ID w kodzie**.
After startup, type `stay 300` and press Enter. You have 5 minutes to
configure; the `info` command shows active values. Every configuration change
is saved to NVS immediately and survives a restart — **do not edit IDs in
code**.
### 4A. Preferowane: Clone IDs
### 4A. Preferred: Clone IDs
Jeśli znasz oryginalne 24-bit ID (np. z wcześniejszego odczytu `rtl_433`), wpisz
je w kolejności FL, FR, RR, RL. Przykład — zastąp wartości własnymi:
If you know the original 24-bit IDs (e.g. from an earlier `rtl_433` readout),
enter them in FL, FR, RR, RL order. Example — replace the values with your
own:
```text
stay 300
@@ -113,60 +119,63 @@ info
send
```
ID musi mieć sześć cyfr hex, być niezerowe, różne od `FFFFFF` i unikalne.
Urządzenie wróci do NORMAL i będzie nadawało znane ID. **Nauka może być
niepotrzebna, ale nie jest to gwarantowane.** Potwierdź odbiór diagnostycznie;
nie zaczynaj od jazdy.
An ID must have six hex digits, be non-zero, differ from `FFFFFF`, and be
unique. The device returns to NORMAL and transmits the known IDs. **Learning
may be unnecessary, but that is not guaranteed.** Confirm reception
diagnostically; do not start with a road drive.
### 4B. Alternatywa: New IDs + LEARN
### 4B. Alternative: New IDs + LEARN
1. Wpisz `ids new`, następnie `info` i zapisz wygenerowane ID.
2. Uruchom właściwą dla swojej wersji auta procedurę nauki TPMS zgodnie z jej
instrukcją serwisową. Nie zgaduj sekwencji menu/pedałów.
3. Wpisz `mode learn`. Nadaje wyłącznie FL, co 2 s. LED wskaże 1 mrugnięcie.
4. `send` wymusza bieżące koło bez zmiany. Po potwierdzeniu kroku w aucie wpisz
`next`: FR → RR → RL. Krótki przycisk robi to samo; po RL wraca do NORMAL.
5. Jeśli minie 60 s na kole, LEARN przerwie się do NORMAL. Cała sesja ma limit
15 min. Po zakończeniu sprawdź ID i kody diagnostyczne.
1. Type `ids new`, then `info`, and write down the generated IDs.
2. Start the TPMS learning procedure appropriate for your car model/version
according to its service instructions. Do not guess menu/pedal sequences.
3. Type `mode learn`. It transmits FL only, every 2 s. The LED shows 1 blink.
4. `send` forces the current wheel without changing it. After confirming the
step in the car, type `next`: FR → RR → RL. A short button press does the
same; after RL it returns to NORMAL.
5. If 60 s passes on a wheel, LEARN interrupts to NORMAL. The whole session
has a 15 min limit. When finished, verify the IDs and diagnostic codes.
EL-50448/OEC-T5 jest aktywatorem LF 125 kHz, **nie programatorem ESP32**. Ta
procedura nie wymaga go. Szczegóły: [SETUP](docs/SETUP.md).
EL-50448/OEC-T5 is a 125 kHz LF activator, **not an ESP32 programmer**. This
procedure does not require it. Details: [SETUP](docs/SETUP.md).
## Sterowanie — jedna tabela
## Controls — one table
LED działa tylko podczas czuwania; w deep sleep jest zgaszona. Po zmianie koła
seria 1–4 mrugnięć wskazuje FL/FR/RR/RL.
The LED works only while awake; in deep sleep it is off. After a wheel change,
a series of 1–4 blinks indicates FL/FR/RR/RL.
| Tryb | Wzorzec LED | Krótki przycisk | Długi ≥1,5 s | Bardzo długi ≥4 s |
| Mode | LED pattern | Short button | Long ≥1.5 s | Very long ≥4 s |
|---|---|---|---|---|
| NORMAL | 1 mrugnięcie / 2 s | burst wszystkich 4 | wejście LEARN | wejście SINGLE |
| LEARN | 3 mrugnięcia / 0,5 s; po zmianie numer koła | następne koło + TX; po RL koniec | wyjście NORMAL | wejście SINGLE |
| SINGLE | 2 mrugnięcia / 0,5 s; po zmianie numer koła | następne koło + TX | wejście LEARN | wyjście NORMAL |
| NORMAL | 1 blink / 2 s | burst of all 4 | enter LEARN | enter SINGLE |
| LEARN | 3 blinks / 0.5 s; changes with wheel number | next wheel + TX; after RL done | exit to NORMAL | enter SINGLE |
| SINGLE | 2 blinks / 0.5 s; changes with wheel number | next wheel + TX | enter LEARN | exit to NORMAL |
W konsoli `send` w NORMAL nadaje wszystkie, a w LEARN/SINGLE tylko bieżące koło.
`send 1`…`send 4` wybiera koło jawnie; `send all` nadaje cztery. SINGLE wyłącza
się po 5 min.
In the console, `send` in NORMAL transmits all wheels, and in LEARN/SINGLE
only the current one. `send 1`…`send 4` select a wheel explicitly; `send all`
transmits four. SINGLE shuts off after 5 min.
## Najczęstsze problemy
## Most common problems
- **`BLAD: brak CC1101`**: sprawdź 3,3 V, wspólną masę oraz SCK/MISO/MOSI/CS
na GPIO4/5/6/7 i GDO0 na GPIO10; nie używaj 5 V na CC1101.
- **Konsola znika przed wpisaniem komend**: po restarcie od razu `stay 300`;
zwykłe wybudzenie RTC celowo nie otwiera okna konsoli.
- **NVS zgłasza błąd**: urządzenie używa bezpiecznych domyślnych; wpisz `info`.
`factory YES` kasuje własne ID i przywraca konfigurację fabryczną.
- **Auto nie odbiera**: najpierw zweryfikuj profil auta i odbiór RTL-SDR; nie
zmieniaj losowo modulacji, flag ani interwałów. Zobacz
- **`ERROR: no CC1101`**: check 3.3 V, common ground, and SCK/MISO/MOSI/CS
on GPIO4/5/6/7 and GDO0 on GPIO10; do not use 5 V on the CC1101.
- **Console disappears before you enter commands**: right after restart type
`stay 300`; a plain RTC wake deliberately does not open the console window.
- **NVS reports an error**: the device uses safe defaults; type `info`.
`factory YES` erases your IDs and restores the factory configuration.
- **The car does not receive**: first verify the car profile and RTL-SDR
reception; do not randomly change modulation, flags, or intervals. See
[TROUBLESHOOTING](docs/TROUBLESHOOTING.md).
## Walidacja, zasilanie i release
## Validation, power, and release
- Protokół i niewiadome: [PROTOCOL](docs/PROTOCOL.md)
- Dokładne wyniki i checklista HIL: [VALIDATION](docs/VALIDATION.md)
- Pobór (na razie szacunki): [POWER](docs/POWER.md)
- LM317T i zasilanie z gniazda zapalniczki: [HARDWARE](docs/HARDWARE.md#wariant-z-gniazda-zapalniczki--wymagania-niezwalidowany-projekt)
- Zmiany: [CHANGELOG](CHANGELOG.md)
- Protocol and unknowns: [PROTOCOL](docs/PROTOCOL.md)
- Detailed results and the HIL checklist: [VALIDATION](docs/VALIDATION.md)
- Consumption (estimates so far): [POWER](docs/POWER.md)
- LM317T and power from the cigarette-lighter socket:
[HARDWARE](docs/HARDWARE.md#cigarette-lighter-socket-variant--requirements-unvalidated-design)
- Changes: [CHANGELOG](CHANGELOG.md)
Gotowe obrazy tworzy `bash tools/package_release.sh`. Pliki i adresy opisano w
[VALIDATION](docs/VALIDATION.md#artefakty-i-wgrywanie). Release candidate nie
zawiera wyniku testu CC1101 ani samochodu.
Release images are produced by `bash tools/package_release.sh`. The files and
addresses are described in
[VALIDATION](docs/VALIDATION.md#artifacts-and-flashing). The release candidate
does not include a CC1101 test result or a car test.