add THB3
This commit is contained in:
parent
0a7674a45f
commit
739dd764c7
46 changed files with 3094 additions and 36577 deletions
16
README.md
16
README.md
|
|
@ -1,9 +1,9 @@
|
||||||
# BTHome THB1, THB2, BTH01, TH05(HW: v1.3..1.6), TH05F
|
# BTHome THB1, THB2, THB3, BTH01, TH05(HW: v1.3..1.6), TH05F
|
||||||
|
|
||||||
Custom firmware for Tuya devices on the PHY622x2 chipset
|
Custom firmware for Tuya devices on the PHY622x2 chipset
|
||||||
| [THB1](https://pvvx.github.io/THB1) | [THB2](https://pvvx.github.io/THB2) | [BTH01](https://pvvx.github.io/BTH01/) | [TH05_V1.3](https://pvvx.github.io/TH05-v1.3) | [TH05_V1.4](https://pvvx.github.io/TH-05) | [TH05F](https://pvvx.github.io/TH05F) |
|
| [THB1](https://pvvx.github.io/THB1) | [THB2](https://pvvx.github.io/THB2) | [THB3](https://pvvx.github.io/THB3) | [BTH01](https://pvvx.github.io/BTH01/) | [TH05_V1.3](https://pvvx.github.io/TH05-v1.3) | [TH05_V1.4](https://pvvx.github.io/TH-05) | [TH05F](https://pvvx.github.io/TH05F) |
|
||||||
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||||
|  |  |  |  |  | 
|
|  |  |  |  |  |  | 
|
||||||
|
|
||||||
* Программа для настройки и BLE OTA [PHY62x2BTHome.html](https://pvvx.github.io/THB2/web/PHY62x2BTHome.html).
|
* Программа для настройки и BLE OTA [PHY62x2BTHome.html](https://pvvx.github.io/THB2/web/PHY62x2BTHome.html).
|
||||||
* Подгрузка файлов OTA в [PHY62x2BTHome.html](https://pvvx.github.io/THB2/web/PHY62x2BTHome.html) производится автоматически - загружать из файлы из данного репозитория для OTA не требуется.
|
* Подгрузка файлов OTA в [PHY62x2BTHome.html](https://pvvx.github.io/THB2/web/PHY62x2BTHome.html) производится автоматически - загружать из файлы из данного репозитория для OTA не требуется.
|
||||||
|
|
@ -16,8 +16,9 @@ Custom firmware for Tuya devices on the PHY622x2 chipset
|
||||||
|
|
||||||
| Устройство | Файл Boot | Файл OTA | Маркировка на печатной плате |
|
| Устройство | Файл Boot | Файл OTA | Маркировка на печатной плате |
|
||||||
|:---:|:---:|:---:|:---:|
|
|:---:|:---:|:---:|:---:|
|
||||||
| [THB1](https://pvvx.github.io/THB1) | BOOT_THB1_v15.hex | THB1_v15.bin | нет |
|
| [THB1](https://pvvx.github.io/THB1) | BOOT_THB1_v16.hex | THB1_v16.bin | нет |
|
||||||
| [THB2](https://pvvx.github.io/THB2) | BOOT_THB2_v15.hex | THB2_v15.bin | нет |
|
| [THB2](https://pvvx.github.io/THB2) | BOOT_THB2_v16.hex | THB2_v16.bin | нет |
|
||||||
|
| [THB3](https://pvvx.github.io/THB2) | BOOT_THB2_v16.hex | THB2_v16.bin | нет |
|
||||||
| [BTH01](https://pvvx.github.io/BTH01) | BOOT_BTH01_v15.hex | BTH01_v15.bin | нет |
|
| [BTH01](https://pvvx.github.io/BTH01) | BOOT_BTH01_v15.hex | BTH01_v15.bin | нет |
|
||||||
| [TH05_V1.4](https://pvvx.github.io/TH-05) | BOOT_TH05_v15.hex | TH05_v1.4.bin | TH05_V1.4, TH05_V1.5, TH05_V1.6 с чипом BL55028 |
|
| [TH05_V1.4](https://pvvx.github.io/TH-05) | BOOT_TH05_v15.hex | TH05_v1.4.bin | TH05_V1.4, TH05_V1.5, TH05_V1.6 с чипом BL55028 |
|
||||||
| [TH05_V1.3](https://pvvx.github.io/TH05-v1.3) | BOOT_TH05D_v15.hex | TH05D_v15.bin | RSH-TH05-V1.3 с чипом BL55072 |
|
| [TH05_V1.3](https://pvvx.github.io/TH05-v1.3) | BOOT_TH05D_v15.hex | TH05D_v15.bin | RSH-TH05-V1.3 с чипом BL55072 |
|
||||||
|
|
@ -70,7 +71,7 @@ Custom firmware for Tuya devices on the PHY622x2 chipset
|
||||||
|
|
||||||
Если на адаптере отсутствует RST пин, тогда следует замкнуть вывод RESET с GND(-Vbat) и быстро разомкнуть при старте скрипта (вомзожно потребуется несколько попыток)
|
Если на адаптере отсутствует RST пин, тогда следует замкнуть вывод RESET с GND(-Vbat) и быстро разомкнуть при старте скрипта (вомзожно потребуется несколько попыток)
|
||||||
|
|
||||||
Название контактов на устройстве смотреть в описании по ссылкам: [THB1](https://pvvx.github.io/THB1), [THB2](https://pvvx.github.io/THB2), [BTH01](https://pvvx.github.io/BTH01/), [TH05_V1.3](https://pvvx.github.io/TH05-v1.3), [TH05_V1.4](https://pvvx.github.io/TH-05)
|
Название контактов на устройстве смотреть в описании по ссылкам: [THB1](https://pvvx.github.io/THB1), [THB2](https://pvvx.github.io/THB2), [THB3](https://pvvx.github.io/THB3), [BTH01](https://pvvx.github.io/BTH01/), [TH05_V1.3](https://pvvx.github.io/TH05-v1.3), [TH05_V1.4](https://pvvx.github.io/TH-05)
|
||||||
|
|
||||||
2. Установить python3 и необходимые библиотеки
|
2. Установить python3 и необходимые библиотеки
|
||||||
|
|
||||||
|
|
@ -197,6 +198,7 @@ python3 rdwr_phy62x2.py -p COM11 -r we 0x10000 ./bin/TH05V13_v13.bin
|
||||||
|
|
||||||
* На [THB1](https://pvvx.github.io/THB1) - маркирован как `RX`
|
* На [THB1](https://pvvx.github.io/THB1) - маркирован как `RX`
|
||||||
* На [THB2](https://pvvx.github.io/THB2) - маркирован как `RX`
|
* На [THB2](https://pvvx.github.io/THB2) - маркирован как `RX`
|
||||||
|
* На [THB3](https://pvvx.github.io/THB3) - маркирован как `RX`
|
||||||
* На [BTH01](https://pvvx.github.io/BTH01/) - маркирован как `RX2`
|
* На [BTH01](https://pvvx.github.io/BTH01/) - маркирован как `RX2`
|
||||||
* На [TH05_V1.3](https://pvvx.github.io/TH05-v1.3) - маркирован как `RX0`
|
* На [TH05_V1.3](https://pvvx.github.io/TH05-v1.3) - маркирован как `RX0`
|
||||||
* На [TH05_V1.4](https://pvvx.github.io/TH-05) - маркирован как `RX2`
|
* На [TH05_V1.4](https://pvvx.github.io/TH-05) - маркирован как `RX2`
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
3062
bin/BOOT_THB3_v16.hex
Normal file
3062
bin/BOOT_THB3_v16.hex
Normal file
File diff suppressed because it is too large
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/TH05_v14.bin
BIN
bin/TH05_v14.bin
Binary file not shown.
BIN
bin/TH05_v15.bin
BIN
bin/TH05_v15.bin
Binary file not shown.
BIN
bin/THB1_v14.bin
BIN
bin/THB1_v14.bin
Binary file not shown.
BIN
bin/THB1_v15.bin
BIN
bin/THB1_v15.bin
Binary file not shown.
BIN
bin/THB2_v14.bin
BIN
bin/THB2_v14.bin
Binary file not shown.
BIN
bin/THB2_v15.bin
BIN
bin/THB2_v15.bin
Binary file not shown.
BIN
bin/THB3_v16.bin
Normal file
BIN
bin/THB3_v16.bin
Normal file
Binary file not shown.
|
|
@ -42,10 +42,10 @@
|
||||||
#define DEVICE_THB1 23
|
#define DEVICE_THB1 23
|
||||||
#define DEVICE_TH05D 24 // TH05_V1.3
|
#define DEVICE_TH05D 24 // TH05_V1.3
|
||||||
#define DEVICE_TH05F 25 // TH05Y_V1.2
|
#define DEVICE_TH05F 25 // TH05Y_V1.2
|
||||||
//#define DEVICE_THB3 26
|
#define DEVICE_THB3 26
|
||||||
|
|
||||||
#ifndef DEVICE
|
#ifndef DEVICE
|
||||||
#define DEVICE DEVICE_BTH01
|
#define DEVICE DEVICE_THB3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// supported services by the device (bits)
|
// supported services by the device (bits)
|
||||||
|
|
@ -200,7 +200,7 @@
|
||||||
#define DEF_HARDWARE_REVISION "0015"
|
#define DEF_HARDWARE_REVISION "0015"
|
||||||
#define DEF_MANUFACTURE_NAME_STR "Tuya"
|
#define DEF_MANUFACTURE_NAME_STR "Tuya"
|
||||||
|
|
||||||
#elif DEVICE == DEVICE_THB1
|
#elif (DEVICE == DEVICE_THB1) || (DEVICE == DEVICE_THB3)
|
||||||
/* Model: THB1 */
|
/* Model: THB1 */
|
||||||
#if OTA_TYPE == OTA_TYPE_BOOT
|
#if OTA_TYPE == OTA_TYPE_BOOT
|
||||||
#define DEV_SERVICES (OTA_TYPE \
|
#define DEV_SERVICES (OTA_TYPE \
|
||||||
|
|
@ -238,8 +238,13 @@
|
||||||
#define GPIO_TRG GPIO_P09 // mark TX
|
#define GPIO_TRG GPIO_P09 // mark TX
|
||||||
#define GPIO_INP GPIO_P10 // mark RX
|
#define GPIO_INP GPIO_P10 // mark RX
|
||||||
|
|
||||||
|
#if DEVICE == DEVICE_THB1
|
||||||
#define DEF_MODEL_NUMBER_STR "THB1"
|
#define DEF_MODEL_NUMBER_STR "THB1"
|
||||||
#define DEF_HARDWARE_REVISION "0017"
|
#define DEF_HARDWARE_REVISION "0017"
|
||||||
|
#else
|
||||||
|
#define DEF_MODEL_NUMBER_STR "THB3"
|
||||||
|
#define DEF_HARDWARE_REVISION "001A"
|
||||||
|
#endif
|
||||||
#define DEF_MANUFACTURE_NAME_STR "Tuya"
|
#define DEF_MANUFACTURE_NAME_STR "Tuya"
|
||||||
|
|
||||||
#elif DEVICE == DEVICE_TH05D
|
#elif DEVICE == DEVICE_TH05D
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,8 @@
|
||||||
|
|
||||||
#if (DEVICE == DEVICE_THB1)
|
#if (DEVICE == DEVICE_THB1)
|
||||||
#define LCD_BUF_SIZE 7
|
#define LCD_BUF_SIZE 7
|
||||||
|
#elif (DEVICE == DEVICE_THB3)
|
||||||
|
#define LCD_BUF_SIZE 7
|
||||||
#elif (DEVICE == DEVICE_TH05D)
|
#elif (DEVICE == DEVICE_TH05D)
|
||||||
#define LCD_BUF_SIZE 8
|
#define LCD_BUF_SIZE 8
|
||||||
#elif (DEVICE == DEVICE_TH05)
|
#elif (DEVICE == DEVICE_TH05)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#if (DEV_SERVICES & SERVICE_SCREEN) && (DEVICE == DEVICE_THB1)
|
#if (DEV_SERVICES & SERVICE_SCREEN) && ((DEVICE == DEVICE_THB1) || (DEVICE == DEVICE_THB3))
|
||||||
#include "OSAL.h"
|
#include "OSAL.h"
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
#include "rom_sym_def.h"
|
#include "rom_sym_def.h"
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ const ioinit_cfg_t ioInit[] = {
|
||||||
{ GPIO_P33, GPIO_FLOATING }, // I2C_SDA
|
{ GPIO_P33, GPIO_FLOATING }, // I2C_SDA
|
||||||
{ GPIO_P34, GPIO_FLOATING } // I2C_SCL
|
{ GPIO_P34, GPIO_FLOATING } // I2C_SCL
|
||||||
|
|
||||||
#elif (DEVICE == DEVICE_THB1)
|
#elif (DEVICE == DEVICE_THB1) || (DEVICE == DEVICE_THB3)
|
||||||
{ GPIO_P00, GPIO_PULL_DOWN },
|
{ GPIO_P00, GPIO_PULL_DOWN },
|
||||||
{ GPIO_P01, GPIO_PULL_UP }, // KEY - GPIO_KEY
|
{ GPIO_P01, GPIO_PULL_UP }, // KEY - GPIO_KEY
|
||||||
{ GPIO_P02, GPIO_PULL_DOWN },
|
{ GPIO_P02, GPIO_PULL_DOWN },
|
||||||
|
|
|
||||||
24
fw.json
24
fw.json
|
|
@ -1,25 +1,19 @@
|
||||||
{"custom":[
|
{"custom":[
|
||||||
"bin/THB2_v15.bin",
|
|
||||||
"bin/BTH01_v15.bin",
|
|
||||||
"bin/TH05_v15.bin",
|
|
||||||
"?",
|
|
||||||
"bin/THB1_v15.bin",
|
|
||||||
"bin/TH05D_v15.bin",
|
|
||||||
"bin/TH05F_v15.bin"],
|
|
||||||
"betafw":[
|
|
||||||
"bin/THB2_v16.bin",
|
"bin/THB2_v16.bin",
|
||||||
"bin/BTH01_v16.bin",
|
"bin/BTH01_v16.bin",
|
||||||
"bin/TH05_v16.bin",
|
"bin/TH05_v16.bin",
|
||||||
"?",
|
"?",
|
||||||
"bin/THB1_v16.bin",
|
"bin/THB1_v16.bin",
|
||||||
"bin/TH05D_v16.bin",
|
"bin/TH05D_v16.bin",
|
||||||
"bin/TH05F_v16.bin"],
|
"bin/TH05F_v16.bin",
|
||||||
|
"bin/THB3_v16.bin"],
|
||||||
"updateboot":[
|
"updateboot":[
|
||||||
"update_boot/BOOT_THB2_v15.bin",
|
"update_boot/BOOT_THB2_v16.bin",
|
||||||
"update_boot/BOOT_BTH01_v15.bin",
|
"update_boot/BOOT_BTH01_v16.bin",
|
||||||
"update_boot/BOOT_TH05_v15.bin",
|
"update_boot/BOOT_TH05_v16.bin",
|
||||||
"?",
|
"?",
|
||||||
"update_boot/BOOT_TH05D_v15.bin",
|
"update_boot/BOOT_TH05D_v16.bin",
|
||||||
"update_boot/BOOT_TH05F_v15.bin",
|
"update_boot/BOOT_TH05F_v16.bin",
|
||||||
"update_boot/BOOT_THB1_v15.bin"]
|
"update_boot/BOOT_THB1_v16.bin",
|
||||||
|
"update_boot/BOOT_THB3_v16.bin"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
update_boot/BOOT_THB3_v16.bin
Normal file
BIN
update_boot/BOOT_THB3_v16.bin
Normal file
Binary file not shown.
2
wr_thb3.cmd
Normal file
2
wr_thb3.cmd
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
python3 rdwr_phy62x2.py -p COM11 -e -r wh ./bin/BOOT_THB3_v16.hex
|
||||||
|
@rem python3 rdwr_phy62x2.py -p COM11 -r we 0x10000 ./bin/THB3_v16.bin
|
||||||
Loading…
Add table
Add a link
Reference in a new issue