Open zebin-wu opened 5 years ago
Because the project needs to get airkiss random to compose the broadcast package, but smartconfig does not provide a method to get airkiss random.
ESP32 esp-idf allows us to get random in the event, like this:
} else if (event_base == SC_EVENT && event_id == SC_EVENT_GOT_SSID_PSWD) { aks_log(LOG_INFO, "Got SSID and password"); smartconfig_event_got_ssid_pswd_t *evt = (smartconfig_event_got_ssid_pswd_t *)event_data; struct al_aks_data *data = al_os_mem_calloc(sizeof(struct al_aks_data)); if (!data) { aks_log(LOG_ERR, "alloc data error."); return; } memcpy(data->ssid.id, evt->ssid, sizeof(evt->ssid)); memcpy(data->password, evt->password, sizeof(evt->password)); data->ssid.len = strlen((char *)evt->ssid); extern u8 aks_random; aks_random = evt->token;
I would be grateful if esp8266 could provide an interface to get random as soon as possible.
@xuhongv 我知道可以调用airkiss 的库,我之后的做法也是直接调用,只是说esp8266 中的smartconfig缺失这个有点遗憾
这个有更新吗?
不清楚,你可以找找airkiss的开源库
Environment
Problem Description
Because the project needs to get airkiss random to compose the broadcast package, but smartconfig does not provide a method to get airkiss random.
ESP32 esp-idf allows us to get random in the event, like this:
I would be grateful if esp8266 could provide an interface to get random as soon as possible.