mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-04 20:35:22 +00:00
small update (#1786)
This commit is contained in:
committed by
GitHub
parent
6ee5729064
commit
e85b9a67be
@ -190,8 +190,8 @@ generateNotes:
|
||||
| ESP8266 1MB | UART Flash | [OpenESP8266_1MB_{{version}}.factory.bin]({{host}}/{{owner}}/{{repository}}/releases/download/{{version}}/OpenESP8266_1MB_{{version}}.factory.bin) |
|
||||
| ESP8266 2MB | UART Flash | [OpenESP8266_2MB_{{version}}.factory.bin]({{host}}/{{owner}}/{{repository}}/releases/download/{{version}}/OpenESP8266_2MB_{{version}}.factory.bin) |
|
||||
| ESP8266 2MB | OTA Update | [OpenESP8266_{{version}}.img]({{host}}/{{owner}}/{{repository}}/releases/download/{{version}}/OpenESP8266_{{version}}.img) |
|
||||
| Win32 | | [obkSimulator_{{version}}.zip]({{host}}/{{owner}}/{{repository}}/releases/download/{{version}}/obkSimulator_{{version}}.zip) |
|
||||
| TXW81X | | [OpenTXW81X_{{version}}.bin]({{host}}/{{owner}}/{{repository}}/releases/download/{{version}}/OpenTXW81X_{{version}}.bin) |
|
||||
| Win32 | | [obkSimulator_{{version}}.zip]({{host}}/{{owner}}/{{repository}}/releases/download/{{version}}/obkSimulator_{{version}}.zip) |
|
||||
|
||||
|
||||
CCtr Flash = Tuya cloud Cutter flash
|
||||
@ -200,6 +200,7 @@ generateNotes:
|
||||
BK7231M binary will work also for some BL2028Ns, they are also often just a BK7231N with 000000 etc keys.
|
||||
|
||||
RTL8710A (RTL8711AM) can be flashed either via JTAG/SWD, or CH341A SPI.
|
||||
TXW81X must be flashed via CK-Link
|
||||
|
||||
Flashing instructions are available on the project's [README.md]({{host}}/{{owner}}/{{repository}}#readme)
|
||||
preset: conventionalcommits
|
||||
@ -257,6 +258,7 @@ publish:
|
||||
- path: "output/**/OpenRTL87*"
|
||||
- path: "output/**/OpenESP*"
|
||||
- path: "output/**/OpenECR*"
|
||||
- path: "output/**/OpenTXW*"
|
||||
- path: "output/**/obkSimulator*"
|
||||
|
||||
success:
|
||||
|
||||
@ -1,35 +1,37 @@
|
||||
|
||||
| Platform | Family | Wi-Fi 5GHz | WPA3 | OTA | GPIO | GPIO IRQ | UART | PWM | ADC | Deep sleep | WDT | SPI LED | IR |
|
||||
|---------------------------------------------------------|-----------------|------------|------|--------|------|----------|------|------|-----|------------|-----|---------|----|
|
||||
| BK7231T | Beken | ❌ | ✅¹² | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅¹² | ✅ |
|
||||
| BK7231N | Beken | ❌ | ✅¹² | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| BK7231S<br>BK7231U | Beken | ❌ | ✅ | ✅¹ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| BK7238 | Beken | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| BK7252 | Beken | ❌ | ✅ | ✅¹ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| BK7252N | Beken | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| XR809 | XRadio | ❌ | ❌ | ❌⁵ | ✅ | ✅ | ✅ | ✅⁸ | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| XR806 | XRadio | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅⁸ | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| XR872/XF16 | XRadio | ❌ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅⁸ | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| BL602/LF686 | Bouffalo Lab | ❌ | ✅ | ✅⁴ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ |
|
||||
| W800/W801 | Winner Micro | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ |
|
||||
| W600/W601 | Winner Micro | ❌ | ❌ | ✅ | ✅ | ✅ | ❓ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ |
|
||||
| LN882H | Lightning Semi | ❌ | ✅ | ✅⁴ | ✅ | ✅ | ❌ | ✅ | ⚠️ | ❌ | ✅ | ✅ | ❌ |
|
||||
| ESP8266<br>ESP8285 | Espressif | ❌ | ⚠️¹⁴ | ✅²'⁴ | ✅ | ✅ | ✅ | ✅⁷ | ❌ | ⚠️ | ❓⁹ | ❌ | ❌ |
|
||||
| ESP32<br>-C2<br>-C3<br>-C5<br>-C6<br>-C61<br>-S2<br>-S3 | Espressif | ⚠️¹³ | ⚠️¹⁴ | ✅⁴ | ✅ | ✅ | ✅ | ✅ | ❓ | ✅¹⁰ | ✅ | ✅ | ❌ |
|
||||
| TR6260 | Transa Semi | ❌ | ❌ | ⚠️³'⁴ | ✅ | ❌ | ❌ | ✅⁸ | ❌ | ❌ | ✅⁹ | ❌ | ❌ |
|
||||
| RTL8711AM (Ameba1) | Realtek | ❌ | ⚠️ | ✅⁴ | ✅ | ✅ | ✅ | ✅⁸ | ❌ | ❌ | ✅ | ✅ | ❌ |
|
||||
| RTL8710B (AmebaZ) | Realtek | ❌ | ✅ | ✅⁴ | ✅ | ✅ | ✅ | ✅⁸ | ❌ | ❌ | ✅ | ✅ | ❌ |
|
||||
| RTL8710C<br>RTL8720C (AmebaZ2) | Realtek | ❌ | ✅ | ✅⁴ | ✅ | ✅ | ✅ | ✅⁸ | ❌ | ❌ | ✅ | ✅ | ⚠️ |
|
||||
| RTL8720D (AmebaD)<br>RTL872xCSM<br>RTL8720CS (AmebaCS) | Realtek | ✅¹⁵ | ✅ | ✅⁴ | ✅ | ✅ | ✅ | ✅⁸ | ❌ | ❌ | ✅ | ✅ | ⚠️ |
|
||||
| RTL8721DA<br>RTL8711DAF (AmebaDplus) | Realtek | ✅ | ✅ | ✅⁶ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ⚠️ |
|
||||
| RTL8720E<br>RTL8710ECF (AmebaLite) | Realtek | ✅ | ✅ | ✅⁶ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ⚠️ |
|
||||
| ECR6600 | ESWIN | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅⁸ | ⚠️ | ⚠️¹¹ | ✅ | ❌ | ❌ |
|
||||
| TXW81X | Taixin | ❌ | ❌ | ❌ | ✅ | ❓ | ❌ | ❌ | ❌ | ❌ | ❓ | ❌ | ❌ |
|
||||
| Platform | Family | WPA3 | OTA | GPIO | GPIO IRQ | UART | PWM | ADC | Deep sleep | WDT | SPI LED | IR |
|
||||
|---------------------------------------------------------|-----------------|------|---------|------|----------|------|------|-----|------------|-----|---------|----|
|
||||
| BK7231T | Beken | ✅¹² | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅¹² | ✅ |
|
||||
| BK7231N | Beken | ✅¹² | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| BK7231S<br>BK7231U | Beken | ✅ | ✅¹ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| BK7238 | Beken | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| BK7252 | Beken | ✅ | ⚠️¹'¹⁴ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| BK7252N | Beken | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| XR809 | XRadio | ❌ | ❌⁵ | ✅ | ✅ | ✅ | ✅⁸ | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| XR806 | XRadio | ✅ | ✅ | ✅ | ✅ | ✅ | ✅⁸ | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| XR872/XF16 | XRadio | ✅ | ✅² | ✅ | ✅ | ✅ | ✅⁸ | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| BL602/LF686 | Bouffalo Lab | ✅ | ✅⁴ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
|
||||
| W800/W801 | Winner Micro | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ |
|
||||
| W600/W601 | Winner Micro | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ |
|
||||
| LN882H | Lightning Semi | ✅ | ✅⁴ | ✅ | ✅ | ❌ | ✅ | ❗️ | ❌ | ✅ | ✅ | ✅ |
|
||||
| ESP8266<br>ESP8285 | Espressif | ⚠️¹³ | ✅²'⁴ | ✅ | ✅ | ✅ | ✅⁷ | ❌ | ❗️ | ❓⁹ | ❌ | ❌ |
|
||||
| ESP32<br>-C2<br>-C3<br>-C5<br>-C6<br>-C61<br>-S2<br>-S3 | Espressif | ⚠️¹³ | ✅⁴ | ✅ | ✅ | ✅ | ✅ | ❓ | ✅¹⁰ | ✅ | ✅ | ❌ |
|
||||
| TR6260 | Transa Semi | ❌ | ❗️³'⁴ | ✅ | ❌ | ❌ | ✅⁸ | ❌ | ❌ | ✅⁹ | ❌ | ❌ |
|
||||
| RTL8711AM (Ameba1) | Realtek | ❗️ | ✅⁴ | ✅ | ✅ | ✅ | ✅⁸ | ❌ | ❌ | ✅ | ✅ | ❌ |
|
||||
| RTL8710B (AmebaZ) | Realtek | ✅ | ✅⁴ | ✅ | ✅ | ✅ | ✅⁸ | ❌ | ❌ | ✅ | ✅ | ❌ |
|
||||
| RTL8710C<br>RTL8720C (AmebaZ2) | Realtek | ✅ | ✅⁴ | ✅ | ✅ | ✅ | ✅⁸ | ➖ | ❌ | ✅ | ✅ | ✅ |
|
||||
| RTL8720D (AmebaD)<br>RTL872xCSM<br>RTL8720CS (AmebaCS) | Realtek | ✅ | ✅⁴ | ✅ | ✅ | ✅ | ✅⁸ | ❌ | ❌ | ✅ | ✅ | ❗️ |
|
||||
| RTL8721DA<br>RTL8711DAF (AmebaDplus) | Realtek | ✅ | ✅⁶ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ❗️ |
|
||||
| RTL8720E<br>RTL8710ECF (AmebaLite) | Realtek | ✅ | ✅⁶ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ❗️ |
|
||||
| ECR6600 | ESWIN | ✅ | ✅ | ✅ | ✅ | ✅ | ✅⁸ | ❗️ | ❗️¹¹ | ✅ | ❌ | ❌ |
|
||||
| TXW81X | Taixin | ❌ | ❗️ | ✅ | ❓ | ❌ | ❌ | ❌ | ❌ | ❓ | ❌ | ❌ |
|
||||
|
||||
✅ - Works
|
||||
❓ - Not tested
|
||||
❌ - Not implemented
|
||||
⚠️ - Broken
|
||||
✅ - Works<br>
|
||||
❓ - Not tested<br>
|
||||
❌ - Not implemented<br>
|
||||
❗️ - Broken<br>
|
||||
⚠️ - Warning<br>
|
||||
➖ - Not applicable<br>
|
||||
|
||||
¹ Success dependant on partition layout set in bootloader. SPI flash QIO firmware for guaranteed OTA success<br>
|
||||
² Excluding 1MB variation<br>
|
||||
@ -43,6 +45,5 @@
|
||||
¹⁰ Timer sleep only, no GPIO wakeup<br>
|
||||
¹¹ After waking up device will refuse to connect to WiFi until power cycled<br>
|
||||
¹² Only in _ALT builds<br>
|
||||
¹³ ESP32-C5 only<br>
|
||||
¹⁴ Must be manually enabled (CONFIG_ESP8266_WIFI_ENABLE_WPA3_SAE/CONFIG_ESP_WIFI_ENABLE_WPA3_SAE to y in sdkconfig.defaults)<br>
|
||||
¹⁵ Not on AmebaCS<br>
|
||||
¹³ Must be manually enabled (CONFIG_ESP8266_WIFI_ENABLE_WPA3_SAE/CONFIG_ESP_WIFI_ENABLE_WPA3_SAE to y in sdkconfig.defaults)<br>
|
||||
¹⁴ OTA on Tuya BK7252 is not supported (stock bootloader won't do anything, custom won't encrypt main partition on unpack, bricking it)<br>
|
||||
@ -29,6 +29,7 @@ CSRCS += $(_SHARED_APP)/hal/w800/hal_main_w800.c
|
||||
CSRCS += $(_SHARED_APP)/hal/w800/hal_pins_w800.c
|
||||
CSRCS += $(_SHARED_APP)/hal/w800/hal_wifi_w800.c
|
||||
CSRCS += $(_SHARED_APP)/hal/w800/hal_ota_w800.c
|
||||
CSRCS += $(_SHARED_APP)/hal/w800/hal_uart_w800.c
|
||||
CSRCS += main.c
|
||||
|
||||
OBK_SRCS = $(_SHARED_APP)/
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# It allows you to make changes to the SDK, for example..
|
||||
# For example, you can use changed files in the SDK for the automated build during the checks for a PR without changing the SDK itself:
|
||||
# So your PR needs a modified define in the SDK, for example ? This script can make this change directly before the build.
|
||||
|
||||
#
|
||||
#
|
||||
# As an example you will find a script below which will copy all content of the "override"
|
||||
@ -27,7 +26,6 @@
|
||||
#done
|
||||
## restore IFS to whatever it was before ...
|
||||
#IFS=$OFS
|
||||
|
||||
# you can also use all other commands to change files, like
|
||||
# sed -i "s/#define FOO bar/#define FOO baz/" sdk/OpenW600/platform/drivers/file_to_change.c
|
||||
# or, let's assume you made a local change to your SDK
|
||||
@ -38,4 +36,3 @@
|
||||
# and then in pre_build.sh you apply this patch with:
|
||||
#
|
||||
# patch -p 1 -d sdk/OpenW600 < platforms/W600/my_change.diff
|
||||
|
||||
|
||||
@ -1,42 +1,48 @@
|
||||
#if defined(PLATFORM_W800) || defined(PLATFORM_W600)
|
||||
|
||||
#include "../hal_generic.h"
|
||||
#include "../../new_pins.h"
|
||||
#include "../../new_cfg.h"
|
||||
#include "../hal_uart.h"
|
||||
#include "../../logging/logging.h"
|
||||
|
||||
#include "wm_include.h"
|
||||
#include "wm_uart.h"
|
||||
#include "wm_gpio_afsel.h" // for wm_uart1_rx_config and wm_uart1_tx_config
|
||||
#define UART_DEV_NAME "uart1"
|
||||
#define READ_BUF_SIZE 256
|
||||
|
||||
//#define READ_BUF_SIZE 256
|
||||
uint16_t used_uart = TLS_UART_1;
|
||||
|
||||
static s16 obk_uart_rx(u16 len)
|
||||
{
|
||||
|
||||
//addLogAdv(LOG_INFO, LOG_FEATURE_ENERGYMETER, "W800 obk_uart_rx - len=%i\r\n",len);
|
||||
u8 *buf=malloc(READ_BUF_SIZE);
|
||||
int i;
|
||||
if (! buf ){
|
||||
addLogAdv(LOG_INFO, LOG_FEATURE_ENERGYMETER, "W800 obk_uart_rx - malloc failed!\r\n");
|
||||
return WM_FAILED;
|
||||
}
|
||||
while(len){
|
||||
int ml=tls_uart_read(TLS_UART_1, buf,READ_BUF_SIZE-1 );
|
||||
//addLogAdv(LOG_INFO, LOG_FEATURE_ENERGYMETER, "W800 obk_uart_rx - ml=%i\r\n",ml);
|
||||
buf[READ_BUF_SIZE-1]=0;
|
||||
//addLogAdv(LOG_INFO, LOG_FEATURE_ENERGYMETER, "W800 obk_uart_rx - read=%s - len=%i - READ_BUF=%i\r\n",buf,len,READ_BUF_SIZE);
|
||||
for(i = 0; i < len && i < ml; i++)
|
||||
//u8 *buf=malloc(READ_BUF_SIZE);
|
||||
//int i;
|
||||
//if (! buf ){
|
||||
// addLogAdv(LOG_INFO, LOG_FEATURE_ENERGYMETER, "W800 obk_uart_rx - malloc failed!\r\n");
|
||||
// return WM_FAILED;
|
||||
//}
|
||||
while(len)
|
||||
{
|
||||
UART_AppendByteToReceiveRingBuffer(buf[i]);
|
||||
//int ml = tls_uart_read(TLS_UART_1, buf, READ_BUF_SIZE - 1);
|
||||
//buf[READ_BUF_SIZE - 1] = 0;
|
||||
//for(i = 0; i < len && i < ml; i++)
|
||||
//{
|
||||
// UART_AppendByteToReceiveRingBuffer(buf[i]);
|
||||
//}
|
||||
//len -= i;
|
||||
byte b;
|
||||
int ml = tls_uart_read(used_uart, &b, 1);
|
||||
UART_AppendByteToReceiveRingBuffer(b);
|
||||
len -= ml;
|
||||
}
|
||||
len -=i;
|
||||
}
|
||||
free(buf);
|
||||
return WM_SUCCESS;
|
||||
//free(buf);
|
||||
return WM_SUCCESS;
|
||||
}
|
||||
|
||||
void HAL_UART_SendByte(byte b)
|
||||
{
|
||||
tls_uart_write(TLS_UART_1, (char*)&b, 1);
|
||||
tls_uart_write(used_uart, (char*)&b, 1);
|
||||
}
|
||||
|
||||
int HAL_UART_Init(int baud, int parity, bool hwflowc)
|
||||
@ -44,17 +50,49 @@ int HAL_UART_Init(int baud, int parity, bool hwflowc)
|
||||
struct tls_uart_options uart_opts;
|
||||
uart_opts.baudrate = baud;
|
||||
uart_opts.charlength = TLS_UART_CHSIZE_8BIT;
|
||||
uart_opts.flow_ctrl = TLS_UART_FLOW_CTRL_NONE;
|
||||
uart_opts.flow_ctrl = hwflowc == true ? TLS_UART_FLOW_CTRL_HARDWARE : TLS_UART_FLOW_CTRL_NONE;
|
||||
uart_opts.paritytype = parity;
|
||||
uart_opts.stopbits = TLS_UART_ONE_STOPBITS;
|
||||
wm_uart1_rx_config(WM_IO_PB_07);
|
||||
wm_uart1_tx_config(WM_IO_PB_06);
|
||||
|
||||
if (WM_SUCCESS != tls_uart_port_init(TLS_UART_1, &uart_opts, 1))
|
||||
return;
|
||||
tls_uart_rx_callback_register((u16) TLS_UART_1, (s16(*)(u16, void*))obk_uart_rx, NULL);
|
||||
#if defined(PLATFORM_W600)
|
||||
#define tls_uart_rx_callback_register(a,b,c) tls_uart_rx_callback_register(a,b)
|
||||
if(!CFG_HasFlag(OBK_FLAG_USE_SECONDARY_UART))
|
||||
{
|
||||
used_uart = TLS_UART_1;
|
||||
wm_uart1_cts_config(WM_IO_PB_09);
|
||||
wm_uart1_rts_config(WM_IO_PB_10);
|
||||
wm_uart1_rx_config(WM_IO_PB_11);
|
||||
wm_uart1_tx_config(WM_IO_PB_12);
|
||||
}
|
||||
else
|
||||
{
|
||||
used_uart = TLS_UART_0;
|
||||
wm_uart0_rx_config(WM_IO_PA_05);
|
||||
wm_uart0_tx_config(WM_IO_PA_04);
|
||||
}
|
||||
#else
|
||||
if(!CFG_HasFlag(OBK_FLAG_USE_SECONDARY_UART))
|
||||
{
|
||||
used_uart = TLS_UART_1;
|
||||
wm_uart1_cts_config(WM_IO_PB_19);
|
||||
wm_uart1_rts_config(WM_IO_PB_20);
|
||||
wm_uart1_rx_config(WM_IO_PB_07);
|
||||
wm_uart1_tx_config(WM_IO_PB_06);
|
||||
}
|
||||
else
|
||||
{
|
||||
used_uart = TLS_UART_0;
|
||||
wm_uart0_rx_config(WM_IO_PB_20);
|
||||
wm_uart0_tx_config(WM_IO_PB_19);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(WM_SUCCESS != tls_uart_port_init(used_uart, &uart_opts, 1))
|
||||
{
|
||||
addLogAdv(LOG_ERROR, LOG_FEATURE_DRV, "UART init failed!");
|
||||
return;
|
||||
}
|
||||
tls_uart_rx_callback_register((u16)used_uart, (s16(*)(u16, void*))obk_uart_rx, NULL);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@ -81,6 +81,8 @@
|
||||
#define ENABLE_OBK_SCRIPTING 1
|
||||
#define ENABLE_ADVANCED_CHANNELTYPES_DISCOVERY 1
|
||||
#define ENABLE_LITTLEFS 1
|
||||
//#define ENABLE_DRIVER_TUYAMCU 1
|
||||
#undef ENABLE_HTTP_MAC
|
||||
|
||||
#elif PLATFORM_W800
|
||||
|
||||
|
||||
Reference in New Issue
Block a user