Skip to content

Feat/esp idf component#5

Open
xiongzh2000 wants to merge 6 commits into
tuya:masterfrom
xiongzh2000:feat/esp-idf-component
Open

Feat/esp idf component#5
xiongzh2000 wants to merge 6 commits into
tuya:masterfrom
xiongzh2000:feat/esp-idf-component

Conversation

@xiongzh2000

Copy link
Copy Markdown

No description provided.

xiong-luze and others added 6 commits July 8, 2026 11:32
Replace the real UUID/AUTH_KEY/PRODUCT_KEY (present since the init commit)
with placeholder values. Users fill in their own; never commit real creds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- tai_send_image_audio_start/chunk/end: send an Image (OneShot) plus a
  streamed Audio in a single event; chunk/end delegate to the audio path.
- pal_freertos: route allocations >=4KB to PSRAM so large image buffers
  don't exhaust internal DRAM on ESP32-S3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Dual-mode root CMakeLists.txt: under ESP-IDF (ESP_PLATFORM) register the
whole repo as one self-contained component and return early; otherwise
fall through to the standalone POSIX CMake library + tests (unchanged).
Add a root idf_component.yml (v0.3.0) so downstream projects pull the SDK
by version via the component manager instead of copying sources.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A one-shot image frame can be tens of KB; on a power-saving Wi-Fi link
the socket buffer can take several seconds to drain, and the 3s deadline
produced spurious TAI_ERR_NET (tls_send failed: -3) on larger images.
15s only bites a genuinely stuck link; small packets that succeed return
immediately. Device-verified: 35KB image frame now sends and the vision
answer streams back.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GATEWAY_NOT_EXISTS (device removed/unbound on the cloud) was mapped to the
generic OPRT_COMMUNICATION_ERROR, indistinguishable from a transient
network failure. Add OPRT_DEVICE_NOT_EXIST (-8) and return it from the
ATOP response decode so callers (e.g. session-token fetch) can re-provision
on genuine removal without wiping creds on transient errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Server-sent image packets (TAI_PKT_IMAGE, e.g. a cloud-generated picture)
were received by the protocol layer but dropped by the dispatcher as an
"unknown pkt_type=32". Add an on_image callback to tai_config_t and handle
TAI_PKT_IMAGE in tai_proto_dispatch: strip the 8-byte media header, extract
the stream flag, and deliver each chunk (START..END / ONE_SHOT) so the caller
can reassemble and decode the image.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants