tuya/tuyaopen-ide-manifests/wifi

Claude Code and agent skill by tuya/tuyaopen-ide-manifests

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

TuyaOS Wi-Fi via tal_wifi: station connect, AP start, scan, low power. WiFi、联网、STA、AP、扫网、配网、tal_wifi、连接路由器、热点。

Install

npx vskill@latest install tuya/tuyaopen-ide-manifests/wifi

SKILL.md

TuyaOS Wi-Fi (tal_wifi)

Demos: software/TuyaOS/apps/tuyaos_demo_examples/src/examples/os_wifi/

ModeFileEntry
Station (STA)example_os_wifi_sta.cexample_wifi_sta
SoftAPexample_os_wifi_ap.cexample_wifi_ap
Scanexample_os_wifi_scan.cexample_wifi_scan
Low powerexample_os_wifi_low_power.cexample_wifi_low_power

Also related (product remote, not basic STA/AP):

TopicDemo
Wi-Fi FFC master…/service_ffc_master/ (tuya_iot_wifi_ffc_*)
Wi-Fi FFC slaver…/service_ffc_slaver/

Confirm first

  • Role: STA / AP / scan / LP / FFC remote?
  • STA: SSID + password (never hardcode secrets from demos — demos use placeholders).
  • AP: SSID, password, channel, IP/mask/gw if static.
  • Whether the app already runs a higher-level TuyaOS product init (example_soc_* / framework Wi-Fi). If the product stack owns Wi-Fi, do not double-tal_wifi_init without checking existing code.

Core APIs

FunctionRole
tal_wifi_init(event_cb)register WF_EVENT_E callback, bring up stack
tal_wifi_set_work_mode(mode)e.g. WWM_STATION / AP mode enum in headers
tal_wifi_station_connect(ssid, passwd)STA join
tal_wifi_get_ip(WF_STATION, &ip)read IP after WFE_CONNECTED
tal_wifi_ap_start(...)softAP (see AP demo for exact args / NW_IP_S)
tal_wifi_all_ap_scan / tal_wifi_release_apscan + free results
tal_wifi_lp_enable / tal_wifi_lp_disable / tal_wifi_set_lps_dtimlow power
tal_net_*UDP/TCP after link is up (AP demo uses broadcast)

STA pattern (adapt demo — do not leave xxxx credentials)

c
#include "tuya_cloud_types.h"
#include "tal_log.h"
#include "tal_wifi.h"
static void wifi_event_callback(WF_EVENT_E event, void *arg)
{
(void)arg;
switch (event) {
case WFE_CONNECTED: {
NW_IP_S sta_info;
memset(&sta_info, 0, sizeof(sta_info));
if (tal_wifi_get_ip(WF_STATION, &sta_info) == OPRT_OK) {
/* log ip/gw/mask — field names differ by SDK macro (nwipstr vs .ip) */
TAL_PR_NOTICE("wifi connected");
}
break;
}
case WFE_CONNECT_FAILED:
TAL_PR_ERR("wifi connect failed");
break;
case WFE_DISCONNECTED:
TAL_PR_NOTICE("wifi disconnected");
break;
default:
break;
}
}
void app_wifi_sta_start(const char *ssid, const char *passwd)
{
if (tal_wifi_init(wifi_event_callback) != OPRT_OK) {
TAL_PR_ERR("tal_wifi_init failed");
return;
}
if (tal_wifi_set_work_mode(WWM_STATION) != OPRT_OK) {
TAL_PR_ERR("set station mode failed");
return;
}
tal_wifi_station_connect((SCHAR_T *)ssid, (SCHAR_T *)passwd);
}

SoftAP (summary)

From example_os_wifi_ap.c:

  1. tal_wifi_init(cb)
  2. set AP work mode
  3. fill NW_IP_S (ip/mask/gw) + SSID/password/channel
  4. tal_wifi_ap_start(...) (exact prototype in demo / tal_wifi.h)
  5. optional: tal_net_socket_create + tal_net_send_to for LAN broadcast

Scan (summary)

tal_wifi_all_ap_scan(&ap_list, &count) then print SSID/RSSI/auth; always tal_wifi_release_ap(ap_list) when done.

Low power (summary)

After STA is up: tal_wifi_set_lps_dtim(...), tal_wifi_lp_enable(), and platform CPU LP helpers (tal_cpu_set_lp_mode / tal_sleep) as in the LP demo. Disable LP before heavy traffic.

Rules

  1. Open the matching demo `.c` in-tree when present; copy event handling and struct field names for this SDK version.
  2. Never commit real passwords from chat into source without user OK; use config / macros the app already uses.
  3. Product vs raw Wi-Fi: many commercial apps already init Wi-Fi inside TuyaOS product/device init. Grep the app for tal_wifi_init / tuya_iot_* first.
  4. FFC remotes use tuya_iot_wifi_ffc_init/control/bind/send — different stack; read service_ffc_* READMEs.
  5. Build with `tuyaos-build`. Not TuyaOpen tos.py / lwIP-only examples from other trees.

Troubleshooting

SymptomLikely causeFix
No WFE_CONNECTEDwrong SSID/pass / 5 GHz-only AP on 2.4-only chipverify band + credentials
Double init crashproduct stack already called tal_wifi_initreuse existing callback path
No IP fields compileSDK uses nwipstr vs .ipmatch demo #ifdef style
Scan leaksforgot tal_wifi_release_apfree after use

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/tuya/tuyaopen-ide-manifests/wifi/badge)](https://verified-skill.com/skills/tuya/tuyaopen-ide-manifests/wifi)

Something wrong with this skill or its page? Tell us.