We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I use this code to test my esp8266,it stack in BOOL ICACHE_FLASH_ATTR MQTT_InitClient(),and I add some print mark,like this: system_os_task(MQTT_Task, MQTT_TASK_PRIO, mqtt_procTaskQueue, MQTT_TASK_QUEUE_SIZE); system_os_post(MQTT_TASK_PRIO, 0, (os_param_t)mqttClient); MQTT_INFO("done!\r\n"); return false; in file mqtt.c,the end of function BOOL ICACHE_FLASH_ATTR MQTT_InitClient(MQTT_Client mqttClient, uint8_t client_id, uint8_t* client_user, uint8_t* client_pass, uint32_t keepAliveTime, uint8_t cleanSession) and user_main.c like this: `static void ICACHE_FLASH_ATTR app_init(void) { uart_init(BIT_RATE_115200, BIT_RATE_115200); print_info(); INFO("1\n"); MQTT_InitConnection(&mqttClient, MQTT_HOST, MQTT_PORT, DEFAULT_SECURITY); //MQTT_InitConnection(&mqttClient, "192.168.11.122", 1880, 0); INFO("2\n"); if ( !MQTT_InitClient(&mqttClient, MQTT_CLIENT_ID, MQTT_USER, MQTT_PASS, MQTT_KEEPALIVE, MQTT_CLEAN_SESSION) ) { INFO("Failed to initialize properly. Check MQTT version.\r\n"); return; } // MQTT_InitClient(&mqttClient, MQTT_CLIENT_ID, MQTT_USER, MQTT_PASS, MQTT_KEEPALIVE, MQTT_CLEAN_SESSION); INFO("3\n"); //MQTT_InitClient(&mqttClient, "client_id", "user", "pass", 120, 1); MQTT_InitLWT(&mqttClient, "/lwt", "offline", 0, 0); INFO("4\n"); MQTT_OnConnected(&mqttClient, mqttConnectedCb); INFO("5\n"); MQTT_OnDisconnected(&mqttClient, mqttDisconnectedCb); INFO("6\n"); MQTT_OnPublished(&mqttClient, mqttPublishedCb); INFO("7\n"); MQTT_OnData(&mqttClient, mqttDataCb); INFO("8\n");
system_os_task(MQTT_Task, MQTT_TASK_PRIO, mqtt_procTaskQueue, MQTT_TASK_QUEUE_SIZE); system_os_post(MQTT_TASK_PRIO, 0, (os_param_t)mqttClient); MQTT_INFO("done!\r\n"); return false;
WIFI_Connect(STA_SSID, STA_PASS, wifiConnectCb); INFO("9\n"); }`
when program running ,I got this: [INFO] BOOTUP... [INFO] SDK: 2.1.0(ce90efd) [INFO] Chip ID: 00152E6F [INFO] Memory info: data : 0x3ffe8000 ~ 0x3ffe87f0, len: 2032 rodata: 0x3ffe87f0 ~ 0x3ffe9724, len: 3892 bss : 0x3ffe9728 ~ 0x3ffefd70, len: 26184 heap : 0x3ffefd70 ~ 0x3fffc000, len: 49808 [INFO] ------------------------------------------- [INFO] Build time: 2017-9月-21_16:04:29_CST [INFO] ------------------------------------------- 1 MQTT:InitConnection 2 MQTT:InitClient done!
and secs latter,esp8266 reboot,agin and agin. I'm really confused,how can I resolve this problem,thanks!
The text was updated successfully, but these errors were encountered:
The same problem with SDK v2.0.0
Sorry, something went wrong.
No branches or pull requests
I use this code to test my esp8266,it stack in BOOL ICACHE_FLASH_ATTR MQTT_InitClient(),and I add some print mark,like this:
system_os_task(MQTT_Task, MQTT_TASK_PRIO, mqtt_procTaskQueue, MQTT_TASK_QUEUE_SIZE); system_os_post(MQTT_TASK_PRIO, 0, (os_param_t)mqttClient); MQTT_INFO("done!\r\n"); return false;
in file mqtt.c,the end of function BOOL ICACHE_FLASH_ATTR MQTT_InitClient(MQTT_Client mqttClient, uint8_t client_id, uint8_t* client_user, uint8_t* client_pass, uint32_t keepAliveTime, uint8_t cleanSession)
and user_main.c like this:
`static void ICACHE_FLASH_ATTR app_init(void)
{
uart_init(BIT_RATE_115200, BIT_RATE_115200);
print_info();
INFO("1\n");
MQTT_InitConnection(&mqttClient, MQTT_HOST, MQTT_PORT, DEFAULT_SECURITY);
//MQTT_InitConnection(&mqttClient, "192.168.11.122", 1880, 0);
INFO("2\n");
if ( !MQTT_InitClient(&mqttClient, MQTT_CLIENT_ID, MQTT_USER, MQTT_PASS, MQTT_KEEPALIVE, MQTT_CLEAN_SESSION) )
{
INFO("Failed to initialize properly. Check MQTT version.\r\n");
return;
}
// MQTT_InitClient(&mqttClient, MQTT_CLIENT_ID, MQTT_USER, MQTT_PASS, MQTT_KEEPALIVE, MQTT_CLEAN_SESSION);
INFO("3\n");
//MQTT_InitClient(&mqttClient, "client_id", "user", "pass", 120, 1);
MQTT_InitLWT(&mqttClient, "/lwt", "offline", 0, 0);
INFO("4\n");
MQTT_OnConnected(&mqttClient, mqttConnectedCb);
INFO("5\n");
MQTT_OnDisconnected(&mqttClient, mqttDisconnectedCb);
INFO("6\n");
MQTT_OnPublished(&mqttClient, mqttPublishedCb);
INFO("7\n");
MQTT_OnData(&mqttClient, mqttDataCb);
INFO("8\n");
WIFI_Connect(STA_SSID, STA_PASS, wifiConnectCb);
INFO("9\n");
}`
when program running ,I got this:
[INFO] BOOTUP...
[INFO] SDK: 2.1.0(ce90efd)
[INFO] Chip ID: 00152E6F
[INFO] Memory info:
data : 0x3ffe8000 ~ 0x3ffe87f0, len: 2032
rodata: 0x3ffe87f0 ~ 0x3ffe9724, len: 3892
bss : 0x3ffe9728 ~ 0x3ffefd70, len: 26184
heap : 0x3ffefd70 ~ 0x3fffc000, len: 49808
[INFO] -------------------------------------------
[INFO] Build time: 2017-9月-21_16:04:29_CST
[INFO] -------------------------------------------
1
MQTT:InitConnection
2
MQTT:InitClient
done!
and secs latter,esp8266 reboot,agin and agin.
I'm really confused,how can I resolve this problem,thanks!
The text was updated successfully, but these errors were encountered: