Repository navigation
Feature/tuya ble control - #49
Draft
heshaoqiong-tuya wants to merge 3 commits into
Draft
heshaoqiong-tuya wants to merge 3 commits into
heshaoqiong-tuya wants to merge 3 commits into
Conversation
heshaoqiong-tuya
force-pushed
the
feature/tuya-ble-control
branch
2 times, most recently
from
November 13, 2026 02:17
b74a5d4 to
33e5480
Compare
Activated devices and BLE-only products need authenticated local control without coupling the BLE owner to MQTT or partially applying DP batches. Add bound advertising, KEY_14/KEY_15 authorization, validated DP TLV callbacks and explicit ordinary or timestamped reports. Apply local DP batches atomically through the public IoT API, notify outside the state lock and keep every MQTT uplink application-owned. Parse activation delivery as typed protocol JSON and verify credentials from extended single-mode Pairing before installation. Queue the KEY_12 ACK before switching forms, retain credentials across reconnects, and require a delivered or firmware-provisioned schema before binding. Schema-less cloud activation remains supported and covered separately. Announce protocol 4.8 after parsing bounded AppFlag and mesh extensions, while accepting legacy pair requests. Derive device capability and V2 flags consistently, track the App DP-channel claim, and fence asynchronous results across session generations. Transparent-DP routing remains a port responsibility. Register sources in both host and ESP-IDF builds, add lexical and bounded string helpers with regression coverage, require the offline BLE-only demo in CI, and document the API, owner-context boundary and bilingual reference pages with sidebar navigation. Research-only HTML reports do not form part of the SDK documentation. The original series also passed ASan/UBSan 32/32, codec differential checks 3135/3135, strict host and ESP32-S3 compilation 4/4 source files, and documentation builds for 2/2 locales. Verified after consolidation: host build; full serial CTest 32/32; BLE 19 wire and 29 bound-control scenarios plus test_prov. Co-Authored-By: Codex <noreply@openai.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
The App needs turn-control callbacks, AI audio uplinks and BT device-info responses in an authenticated session. Handle 0x0094 start, stop, error and heartbeat opcodes, expose device-originated turn requests, and use frame-level ACKs while the App answers turn requests with fresh frames. Advertise Hey Tuya Flag2 bit 5 only when a voice callback is registered. Send encoded AI audio on 0x0091 with caller-owned audio sequence, ACK_SN=0, optional per-frame replies and distinct Opus format codes for 32 kbps and 16 kbps. Require a bound KEY_15 session and use the existing bounded TX queue. Answer authenticated 0x0060 device-info queries with session state and the device name. Share DP command macros across authorization, dispatch and reporting, and document the voice vocabulary and public interfaces. The application continues to own capture, encoding and all BLE state access. The original voice-frame suite also passed focused ASan/UBSan 1/1. Verified after consolidation: host build; full serial CTest 32/32; BLE 19 wire and 33 bound-control scenarios plus test_prov. Co-Authored-By: Codex <noreply@openai.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
The default log sink does not need a Win32 implementation. Use localtime_r, flockfile and funlockfile directly to simplify timestamp formatting and atomic stderr output. Verified: cmake --build build -j 4; full serial ctest 32/32. Co-Authored-By: Codex <noreply@openai.com>
heshaoqiong-tuya
force-pushed
the
feature/tuya-ble-control
branch
from
November 17, 2026 10:08
b4703cc to
c0223fd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.