wifi_ir: progetto Go.Comma R9 - documentazione, script flash e setup
This commit is contained in:
commit
e510529685
6 files changed
+301
No files matched your search
@@ -0,0 +1,75 @@
|
||||
# Flash Tasmota via Seriale
|
||||
|
||||
## Prerequisiti
|
||||
|
||||
- [ ] USB-UART (CH340G o CP2102, ~3€)
|
||||
- [ ] 3 fili jumper femmina-femmina
|
||||
- [ ] Go.Comma R9 aperto (4 viti sotto piedini in gomma)
|
||||
- [ ] Rock Pi 4 acceso e raggiungibile
|
||||
|
||||
## Passi
|
||||
|
||||
### 1. Collega USB-UART al Rock Pi
|
||||
|
||||
Inserisci il cavetto in una porta USB del Rock Pi.
|
||||
Verifica con:
|
||||
|
||||
```bash
|
||||
ls /dev/ttyUSB* # o /dev/ttyACM*
|
||||
```
|
||||
|
||||
### 2. Collega i fili al Go.Comma R9
|
||||
|
||||
Vedi `docs/hardware.md` per lo schema esatto.
|
||||
|
||||
**Attenzione**: GPIO0 va collegato a GND prima di accendere per entrare in flash mode.
|
||||
|
||||
### 3. Installa esptool.py (già fatto)
|
||||
|
||||
```bash
|
||||
pip3 install esptool
|
||||
```
|
||||
|
||||
### 4. Verifica connessione
|
||||
|
||||
```bash
|
||||
esptool.py --port /dev/ttyUSB0 flash_id
|
||||
```
|
||||
|
||||
Dovresti vedere il chip ID dell'ESP8266.
|
||||
|
||||
### 5. Scarica Tasmota
|
||||
|
||||
```bash
|
||||
wget https://github.com/arendst/Tasmota/releases/download/v14.4.0/tasmota.bin
|
||||
```
|
||||
|
||||
### 6. Flasha Tasmota
|
||||
|
||||
```bash
|
||||
esptool.py --port /dev/ttyUSB0 --baud 115200 \
|
||||
write_flash --flash_size=2MB 0x0 tasmota.bin
|
||||
```
|
||||
|
||||
### 7. Template Tasmota
|
||||
|
||||
Dopo il flash, connettiti al WiFi `tasmota-XXXX` e configura il template:
|
||||
|
||||
```json
|
||||
{"NAME":"Go.Comma R9","GPIO":[1,1,1,1,1,1,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":18}
|
||||
```
|
||||
|
||||
| GPIO | Funzione |
|
||||
|---|---|
|
||||
| GPIO14 | IRsend |
|
||||
| GPIO5 | IRrecv |
|
||||
| GPIO4 | LED (opzionale) |
|
||||
| GPIO13 | Button (opzionale) |
|
||||
|
||||
### 8. Alternative: ESPHome
|
||||
|
||||
In alternativa a Tasmota, si può usare ESPHome con il componente `ir_transmitter` e `ir_receiver_climate`.
|
||||
|
||||
## Script automatizzato
|
||||
|
||||
Vedi `scripts/flash.sh` per una versione automatizzata.
|
||||
@@ -0,0 +1,47 @@
|
||||
# Hardware Go.Comma R9
|
||||
|
||||
## Specifiche
|
||||
|
||||
| Specifica | Valore |
|
||||
|---|---|
|
||||
| Modello | Go.Comma R9 Smart Remote |
|
||||
| Chip WiFi | ESP8266 (Tensilica Xtensa LX106) |
|
||||
| Modulo | TYWE3S (2MB flash) |
|
||||
| LED IR | 7 LED a 38KHz |
|
||||
| Ricevitore IR | TSOP38238 o equivalente (38KHz) |
|
||||
| Tensione | 5V (USB) / 3.3V (modulo) |
|
||||
|
||||
## Pinout TYWE3S sul PCB
|
||||
|
||||
Il modulo TYWE3S ha 14 pin a semicerchio. Sui pad del PCB sono serigrafate le connessioni:
|
||||
|
||||
| Pin TYWE3S | Funzione Go.Comma | Utilizzo flashing |
|
||||
|---|---|---|
|
||||
| TX (GPIO1) | — | ← RX USB-UART |
|
||||
| RX (GPIO3) | — | → TX USB-UART |
|
||||
| GND | — | GND |
|
||||
| GPIO0 | Flash mode | → GND (per flash) |
|
||||
| GPIO14 | **IR TX** (7 LED) | — |
|
||||
| GPIO5 | **IR RX** (ricevitore) | — |
|
||||
| GPIO4 | **LED** (indicatore) | — |
|
||||
| GPIO13 | **Pulsante** (fisico) | — |
|
||||
| 3.3V | Alimentazione modulo | Già alimentato |
|
||||
| RST | Reset | — |
|
||||
| EN (CH_PD) | Chip enable | — |
|
||||
|
||||
## Schema collegamenti USB-UART
|
||||
|
||||
```
|
||||
USB-UART (CH340/CP2102) Go.Comma R9 (PCB)
|
||||
══════════════════════ ═════════════════
|
||||
TX ─────────────────▶ RX (pad sul PCB)
|
||||
RX ◀───────────────── TX (pad sul PCB)
|
||||
GND ───────────────── GND
|
||||
GND ───────────────── GPIO0 (pad, per flash mode)
|
||||
```
|
||||
|
||||
**Note**:
|
||||
- Usare 3.3V, NON 5V — l'ESP8266 lavora a 3.3V
|
||||
- Collegare GPIO0 a GND PRIMA di accendere il telecomando
|
||||
- Il telecomando ha la sua alimentazione (pile), non serve VCC esterno
|
||||
- Rimuovere GPIO0 da GND dopo il flash
|
||||
@@ -0,0 +1,39 @@
|
||||
# Tentativo Flash OTA via tuya-convert
|
||||
|
||||
## Setup
|
||||
|
||||
- Clonato tuya-convert v2.4.6 su Rock Pi: `/home/rock/tuya-convert/`
|
||||
- NetworkManager configurato, WiFi power management disabilitato
|
||||
- Config: `WLAN=wlan0`, `AP=vtrust-flash`
|
||||
|
||||
## Esecuzione
|
||||
|
||||
Dispositivo messo in pairing mode (LED lampeggio veloce) ed eseguito:
|
||||
|
||||
```bash
|
||||
./setup.sh
|
||||
```
|
||||
|
||||
## Risultato: FALLITO
|
||||
|
||||
```
|
||||
Your device's firmware is too new. Tuya patched the PSK vulnerability
|
||||
that we use to establish a connection. You might still be able to
|
||||
flash this device over serial.
|
||||
```
|
||||
|
||||
## Causa
|
||||
|
||||
Il Go.Comma R9 monta un firmware Tuya recente che ha la vulnerabilità PSK-Identity-02
|
||||
corretta. tuya-convert sfrutta questa falla per intercettare l'handshake WiFi
|
||||
durante il pairing — con la correzione, l'attacco non funziona più.
|
||||
|
||||
## Conclusione
|
||||
|
||||
- ✅ tuya-convert non supporta ESP8266 con firmware recente
|
||||
- ❌ CloudCutter non supporta ESP8266 (solo Beken/Realtek)
|
||||
- ✅ **Unica strada**: flash seriale con USB-UART (~3€)
|
||||
|
||||
Riferimenti:
|
||||
- https://github.com/ct-Open-Source/tuya-convert
|
||||
- https://github.com/tuya-cloudcutter/tuya-cloudcutter
|
||||
Reference in new issue
Block a user