Commit Graph

139 Commits

Author SHA1 Message Date
7bb04bdda2 safer str op 2025-07-10 15:27:26 +02:00
d4fb118c91 temporary fall back to sprintf 2025-07-10 09:28:08 +02:00
ce465a15e6 http override 2025-07-09 21:13:27 +02:00
7f0b7b75d3 allow serving gz files from lfs with gz header 2025-07-09 08:15:30 +02:00
a261a71ab1 Update ESP-IDF to v5.5-beta1 and add minimal ESP8266 support (#1707)
* update esp-idf

* esp8266

* fix

* pwm, uart and wifi fix

* fix ota

* fix 1m and ps

* update workflow
2025-07-06 07:54:23 +02:00
217dd1e3e1 fix GET/POST for all platforms, remove some not needed os_* mappings (os_strcpy, os_memset, etc)
* get and post to PLATFORM_ECR6600

* test

* Update http_client.c

* t

* need timer

* iotx_net_init ?

* Update utils_timer.c

* try os_time_get

* try ENABLE_SEND_POSTANDGET on bl602 as welll

* Update utils_net.h

* add httpclient to boufallo mk

* Update utils_timer.c

* Update new_common.h

* time

* try ln882h

* Update utils_timer.c

* OS_STRCPY ETCCC

* esp IDF

* Update new_common.h

* Update utils_timer.c

* Update new_common.h

* remove hal_machw_time_past dependency

* lwip_close_force better

* stub

* simplifyu

* omg typo

* revert

* remove os_strcpy

* remove os_strlen

* memmove

* os_strcmp

* os_strstr

* mem func

* try on xradio

* #define lwip_close_force(x) lwip_close(x)

* SWAP

* typo

* Update utils_timer.c

* rtl

* Update new_common.h

* tr

* #include <stdint.h> is reduntant

* clean hdr

* those headers could be common

* those headers could be common

* disable

---------

Co-authored-by: Tester23 <85486843+openshwprojects@users.noreply.github.com>
2025-07-02 20:46:00 +02:00
3b99b17cc2 Xradios (#1695)
* Xradios

* deep sleep

* xr806

* small adjustments
2025-06-30 18:47:47 +02:00
fac2cf081c w800 + berry (#1629)
* w800 + berry

* fix w600

* Update XR and makefile

* Berry cmake

* BL602 lfs test

* Update w800

* Fix

* W600 heap

* sensors & bl602

* bl602 delay_us
2025-06-20 09:35:00 +02:00
5916fbd8a7 Update BL602 code to work with latest sdk. (#1487)
* Support new BL602 SDK

* Update .gitmodules

---------

Co-authored-by: openshwprojects <85486843+openshwprojects@users.noreply.github.com>
2025-05-02 14:42:14 +02:00
a5a5b4b7b9 xr872 (A9 camera) 2025-04-18 18:05:04 +02:00
ac3c5d6da6 Faster wifi connecting (up to 2sec restart -> connected) (#1297)
* Wifi fast connect + extra

* --
2025-04-15 16:38:10 +02:00
eadba42f9f Berry integration part 1
* t

* fx

* split closure handler

* setTimeout, setInterval

* split berry frm SVM, but I need to move event waiter to separate struct?

* fx

* fx

* split relations

* remvoe ode duplciaton

* POC - pass value to berry

* POC - pass str to berry

* berry preps + lfs test

* lfs test + bytes

* save

* remove code duplication

* try dpid calls

* working test for bytes

* tyuamcu to file in eberry

* str for berry test

* tuyamcu to berry glue

* fx1

* fixes

* try berry http

* fix

* tests

* test  vaar lifespan

* test

* test

* test if

* berry in html

* #if ENABLE_OBK_BERRY

* fx

* better

* fx

* test nested loop

* free mem

* simpler

* split lfs run

* arg

* fx

* fix

* #if ENABLE_OBK_BERRY

* comamnd hook

* vars access, ntp

* finalize?

* unfinished
2025-04-12 16:56:24 +02:00
2d43185902 Port Simulator to Linux - p1
* intial makefile for windows sim

* netdb

* tr

* fx

* fxes

* fxes

* fxes

f

* fxes

* fxes

* fxes

* fx

* fx

* fxes?

* fxes

* better?

* stubs

* more

* fxes

* fx?

* comment out sleep

* but only in self test

* add assertion keyword

---------

Co-authored-by: Alexandre Oliveira <rockytvbr@gmail.com>
2025-03-26 22:13:39 +01:00
7ace8c31ba tr6260 (#1564) 2025-03-13 09:01:58 +01:00
544f48d022 ECR6600 (#1553)
* ECR6600

* fix macstr

* uart, bl0937

* vbat adc, ota

* pwm freq

* static ip, change mac

* update partitions
2025-03-07 22:11:42 +01:00
969e5bfa50 RTL8720D (#1550)
* ambd

* update sdk, get current fw idx

* test

* ota

* reset if hard fault

* revert and fix

* uart flow control

* disable uart tcp debug by default

* test

* wifi test

* adjust lwip
adjust scan

* increase timeout

* enable ssdp, close uart tcp sockets on restart

* test

* pwm

* fix bl0942

* cut some code
2025-02-28 08:43:00 +01:00
974d97acda try ln flash read (#1547)
* try flash read

* fx

* clera buffer so we won't get nonsense

* clear buffer
2025-02-25 22:58:29 +01:00
d4d6c69be3 BK7238 (#1527)
* beken new sdk + bk7238

* fix bk7238
2025-02-14 22:22:59 +01:00
6ac1f260ed RTL8710B/RTL8711AM (#1501)
* --

* test

* ota

* ameba1/rtl8711am

* workflow build

* uart tcp bridge driver

* fix build

* Static ip fix

* fix

* Rework amebaz ota

---------

Co-authored-by: Tester23 <85486843+openshwprojects@users.noreply.github.com>
2025-02-01 19:04:23 +01:00
ed1d815d20 respect CHANNEL_MAX in channels API 2025-01-27 06:22:11 +01:00
77efc7ebca make startup command multiline
* step 1

* step2

* Update cmd_script.c

* Update cmd_script.c

* Update obk_config.h

* Update cmd_script.c

* Update cmd_script.c

* fx

* Update obk_config.h

* Update OpenW800

* Update OpenW800

* Update obk_config.h

* f

* fix waitfor

* Update obk_config.h

* Update Makefile

* json escap9ijgng

* crash checks and size check

* w600 bmp

* fx

* Update Makefile

* test

* fx

* Tokenizer_GetPin

* fix

* fix

* ln882h pins

* Update new_http.c

* Update new_http.c

* Update new_http.c

* aht

* aht

* Update obk_config.h

* drv_sht3x

* aht pins

* f

* fx

* aht

* sunset fx

* ln owm

* Update CMakeLists.txt
2025-01-23 23:10:35 +01:00
0efec12de6 feat(httpserver): improved mimetype handling for frontend files (#1481) 2025-01-04 10:41:36 +01:00
2a9a7270f2 RTL8710C/RTL8720C support (#1468)
* Move delay us and wdt to hals, update workflow

* rtl8720c initial

* move uart to hal

* rtl uart

* obk adjustments

* sdk adjustments, fix ota

* add some features

* fix some warnings

* esp uart + tr6260/esp tcp_msl

* add bl0937, adjust ota

* enable artifacts merge

* add forgotten ln882h delay

* fix mqtt, pwm on boot

* irq fix

* fix wifi disconnect

* update sdk, change lfs location and size

* Update Makefile
2025-01-01 12:11:49 +01:00
1f51f65816 OTA for W800 + "Simple OTA" w/o httpd (#1471)
* OTA for W800
Removed unnecessary (and wasting resources) fetching of "index?status=1" on pages not using "state" div
Added simple "internal OTA" (just POST-ing a file)
Basic tests done - try avoiding other TCP connections to save memory
Somtimes there are memory related messages in log like "Thread create HTTP Client - errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY".

OTA working in most cases, somtimes device crashes during update.
Device will immediatly reboot after OTA completion, even printfs after writing last bytes was not visible in console.

* Add some more warnings
Make file selector accepting images on extension for platform
For Beken: Check magic "RBL" and future Platform name in header

* Changed way to verify firmware files: must match OBK file structure for the platform
As suggested by @NonPIayerCharacter added "NO_PLATFORM_OTA" in obk_config.h
For platforms w/o OTA the page will be only showing a hint.

* Fix page for non OTA devices

* streamlined tests
moved platform dependent #define for OTA extension to obk_config.h

* Optimized JS code

Only show hint for ".rbl" file on Beken platforms

Added a #define OBK_OTA_NAME_EXTENSION, actually only for LN882H
(here UART and OTA file are identicaly except an "_OTA" in the file name).
Otherwise the UART file would also match the template
(this file would not be flashed because of additional checks, but if we can prevent this ...)
2024-12-30 23:20:21 +01:00
532a90313c TR6260 support (#1446)
* TR6260 initial

* fix gh-actions

* various fixes/features

* wifi fast connect fix

* fix gpio, add i2c

* move config to obk
2024-12-12 18:55:26 +01:00
65082bb390 EXPERIMENTAL: Try to fix OTA for LN882H (#1441)
ota_persistent_write() might crash the device, it doesn't check if 4k buffer limits were ignored, writing outside the defined memory...
we might have a buffer so large, that we need to write multiple 4K segments (at least 2)
2024-12-04 09:29:17 +01:00
c50515603a ESP32 support (#1344)
* esp-idf

* fix, add s2, s3

* fix + ci

* fix naming

* ota

* adc

* reboot reason

* wdt + uart

* dht + ds1820

* fix esp32

* pwm

* uart hack

* fix build

* charts

* increase stack size

* tests

* fix timer

* optimize

* further c2 optimization

* gpio test, wifi reconnect fix

* gpio test

* Revert ledc freq

* cht83xx, increase inttemp stack size

* fix

* S3 fix, enable sht3x, pwm freq selection

* gpio & i2c fix attempt

* s2 fix

* Update defines for DHT

* Update sdk

---------

Co-authored-by: openshwprojects <85486843+openshwprojects@users.noreply.github.com>
2024-11-06 14:47:22 +01:00
c11a8d1e55 allow disabling Tasmota JSON API (#1236)
* allow disabling Tasmota JSON API

* test enable
2024-05-14 11:53:26 +02:00
46b698b77d Merge branch 'main' of https://github.com/openshwprojects/OpenBK7231T_App 2024-04-10 15:48:36 +02:00
89fc09a921 fix Web App API for long startup commands > 255 chars 2024-04-10 15:44:59 +02:00
f1c1894235 Add LittleFS for BL602 (#1159)
* Add little fs for bl602

* check for Lfs before creating file
2024-04-09 14:57:46 +02:00
d02008b7ca MAIN page item added to HTML footer. (#1115) 2024-03-08 00:12:26 +01:00
231b87aea8 Warnings in OpenBK7231T_App fixed. (#1098)
* Warnings in AppT fixed.

* Remove ota include file added by mistake in drv_sm2235.
2024-02-23 08:45:28 +01:00
421466063a add channels 2 to json 2024-02-20 11:25:33 +01:00
8ed822d284 Fix OTA for BL602 (#1062)
Change to erasing flash in smaller chunks, this avoids issues with http connection, because erasing seems to stop everything.
2024-02-05 05:14:20 +01:00
8bb382b1f2 rtos delay (#1056) 2024-02-04 12:53:27 +01:00
c5ad9acfb7 Implement full flash read for BL602 (#1052)
* Implement RSSI for BL602 (#5)

Adds RSSI for BL602, looks ok, reports similar to what BK7231N reports in the same place

* Update rest_interface.c

* Update rest_interface.c

* Update rest_interface.c

* Update rest_interface.c

* Update rest_interface.c

* Update rest_interface.c

* Update rest_interface.c

* Update rest_interface.c
2024-01-29 17:59:05 +01:00
92af5a6eaa OTA 2024-01-18 17:29:49 +01:00
2ba126b48b LN882H (#1022)
* it compiles and links

* Update user_main.c
2024-01-08 21:07:55 +01:00
57bf618d6d Start of LN882H platform definitions 2024-01-08 15:17:42 +02:00
95c30dd800 Add HTTP basic authentication (#996)
* add http basic auth

* add feature check for basic auth process

* fix http basic auth build for unsupported platforms (W800, W600)

* fix includes in http_basic_auth

* fix basic auth invocations when unavailable

* add http basic auth allow checks to http_fns

* remove unnecessary checks

* add my_strnicmp export

* silence warning

* update web password config ui

* update submodules

* add base64 lib to boufallo.mk for BL602

* add safe mode http basic auth bypass flag

* fix bl602 build with http auth bypass flag

* disable shared led driver

---------

Co-authored-by: Tester23 <openshwprojects@gmail.com>
2023-12-13 15:19:11 +01:00
08fc163286 rename loglevel to g_loglevel because it's global variable... 2023-11-26 12:17:11 +01:00
0fccb67580 cosmetic changes only, fixing compilation warnings 2023-11-20 14:54:05 +01:00
344251e9dd reword and fix littlefs define 2023-09-29 20:08:01 +02:00
da227f233a LFS rest interface should ignore GET arguments 2023-06-22 05:48:40 +02:00
604aa0ff76 rest interface for pins now also shows pin states, i will need it for pin doctor 2023-05-05 12:08:18 +02:00
4acaedaefe api for short name 2023-04-29 15:51:01 +02:00
6e22209ee4 NTP_SendRequest: Unable to send message - retry quickly after reboot 2023-04-25 11:34:04 +02:00
52566ee6fb expose flags and short comman 2023-03-18 17:19:52 +01:00
1e508c064d led_map interface, allow getting command results in old post command api 2023-03-17 15:24:07 +01:00