ESP_LOGE let the esp32 restat,when i use this fun(),want to know the reason?
Posted: Sun May 23, 2021 3:13 pm
- void send_deviceData(){
- //static const char *buff="test";
- char buff[100]={"0"};
- sprintf(buff,"{'DeviceId':%s,'DeviceName':%s,'Mode':%d,'Power':%d,"
- "'ProNum':%s}",deviceData.DeviceId,deviceData.DeviceName,
- deviceData.Mode,deviceData.Power,deviceData.ProNum);
- while(1){
- int err = send(sock, buff, strlen(buff), 0);
- if (err < 0) {
- ESP_LOGE(TAG, "Error occurred during sending: errno %d", errno);
- }
- /*
- else{
- //ESP_LOGE(TAG, "Send bytes success,content");
- }
- */
- vTaskDelay(2000/portTICK_RATE_MS);
- }
- vTaskDelete(send_devdahandle);
- }
- else{
- //ESP_LOGE(TAG, "Send bytes success,content");
- }
Attachment is serial port printing information.