# Wi-Fi Chip SDK

## How many resources does the 8266 SDK require?

16K RAM，400K Flash

## There is no pre\_App\_init when compiling the SDK provided by Tuya?

Just define a pre\_app\_init empty function in the application code

## Why did the SDK provided by Tuya fail to compile?

You need to compile in root mode, please provide logs to Tuya for analysis if it still fails to compile.

## How many bits are the SDK compilation environment toolchain provided by Tuya?

64-bits

## What are the SDK compilation environment requirements provided by Tuya?

64-bits Linux environment

## How to close watchdog by ESP8266 SDK?

system\_soft\_wdt\_stop ()

## Why does Espressif SDK provided by Tuya have 2 bin files after compilation, which one is used?

Use the bin file end with (1)

## How many timers does the ESP8266 SDK have?

Two, one hardware timer, one software timer

## What should I pay attention to when developing pointers for ESP8266 SDK?

The memory must be read with a 4-byte pair. When converting the pointer, make sure that it is a 4-byte pair. Otherwise, the conversion will fail and it cannot be used.

## Why there is no main function in ESP8266 SDK, and what is the program entry function?

app\_init is the program entry function

## Does the SDK provided by Tuya use RTOS?

No, we use FreeRTOS.

## What is the operable address of flash when Tuya 8266 SDK is developed?

Tuya has divided the Flash area, customers can develop directly.

## How to locate the issue when Fatal error appears in the log printed?

You can find the corresponding address in the (\*.S) file and add printing to locate the problem. Fatal exception (28): epc1=0x4025bfa6, epc2=0x00000000, epc3=0x00000000, excvaddr=0x0000000f, depc=0x00000000 For example, if user1.bin is used, you can find the address 0x4025bfa6 in user1.S and check out the corresponding function.

## Which function is used to reset the network status for secondary development with Wi-Fi SDK?

Call the function VOID tuya\_dev\_reset\_factory(VOID), you can restore the factory settings or switch between the two network distribution status.

## Which version is the security baseline based on?

Greater or equal to 5.42 baseline

## With Wi-Fi SDK secondary development, what parameters can I choose to set the Wi-Fi configuration mode?

Normal mode: WCM\_OLD, Low power consumption mode: WCM\_LOW\_POWER, Special distribution mode: WCM\_SPCL\_MODE, Compatibility mode: WCM\_OLD\_CPT

## How to download secondary development files compiled by Wi-Fi SDK to the chip?

Combine several files into a complete package and burn it with Espressif burning tool

## Which function is used to test IO for secondary development with Wi-Fi SDK??

You can use the callback function gpio\_func\_test(VOID).

## Which function is used to get Wi-Fi network status for secondary development with Wi-Fi SDK?

Call the function of GW\_Wi-Fi\_STAT\_E tuya\_get\_wf\_status(VOID), the returned parameters can be compared with GW\_Wi-Fi\_STAT\_E structure

## Which function is used to get the device status for secondary development with Wi-Fi SDK?

Call the GW\_STAT\_E tuya\_get\_gw\_status(VOID) function against the GW\_STAT\_E structure

## Which function of the demo program is easy to start with in the Wi-Fi SDK for secondary development?

The application entry function of our SDK is OPERATE\_RET device\_init(VOID)

## What do I need to prepare for secondary development based on Wi-Fi SDK?

You need to build a VM, a compiler and have to be familiar with the secondary development documents

## How are the 8285 chip high-temperature and low-temperature versions different?

They apply to different working temperatures.

## Does 8266 development support online simulation?

Yes. Tuya can provide a commissioning assistant to commission the module.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ifreeq.com/faqs/device-development/untitled-2/wi-fi-chip-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
