smart_config+微信airkiss
复制以下代码到工程,调用usr_smart_config()即可
需要注意APP目录下的Makefile需要添加配置
-lsmartconfig \
-lairkiss\
LINKFLAGS_eagle.app.v6 = \
-L../lib \
-nostdlib \
-T$(LD_FILE) \
-Wl,--no-check-sections \
-Wl,--gc-sections \
-u call_user_start \
-Wl,-static \
-Wl,--start-group \
-lc \
-lgcc \
-lhal \
-lphy \
-lpp \
-lnet80211 \
-llwip \
-lwpa \
-lcrypto \
-lmain \
-ljson \
-lupgrade\
-lmbedtls \
-lpwm \
-ldriver \
-lsmartconfig \
-lairkiss\
//微信的相关信息
#define DEVICE_TYPE "xxxxxxxx" //wechat public number
#define DEVICE_ID "49348" //model ID
#define DEFAULT_LAN_PORT 12476
LOCAL esp_udp ssdp_udp;
LOCAL struct espconn pssdpudpconn;
LOCAL os_timer_t ssdp_time_serv;
uint8_t lan_buf[200];
uint16_t lan_buf_len;
uint8 udp_sent_cnt = 0;
const airkiss_config_t akconf =
{
(airkiss_memset_fn)&memset,
(airkiss_memcpy_fn)&memcpy,
(airkiss_memcmp_fn)&memcmp,
0,
};
/********************************************
函数名称 :airkiss_wifilan_time_callback()
函数描述:airkiss 模式下定时回调函数
函数功能:通过UDP发送airkiss指