espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.91k stars 7.33k forks source link

Error sending large packet wss (IDFGH-8860) #10284

Closed saiquaan5 closed 1 year ago

saiquaan5 commented 2 years ago

Answers checklist.

IDF version.

commit 6407ecb3f8d2cc07c4c230e7e64f2046af5c86f7 (HEAD, tag: v4.4.3)

Operating System used.

macOS

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

No response

Development Kit.

esp32s3

Power Supply used.

External 3.3V

What is the expected behavior?

I am developing a gateway suite with esp32s3. Use pppos USB with SIM7600 but can test with wifi and ethernet. I use protobuf-c to send binary packets on outgoing. The size of each packet I send is more than 2000 bytes. I have increased the buffer size in the websocket_client.c file but after 2 successful submissions I get this error again. Look forward to the help

I (74228) MAIN: Has event schedule rs485_handle E (74236) APP_WEBSOCKET: Size of schedule message 2263 E (74237) esp-aes: Failed to allocate memory E (74244) esp-tls-mbedtls: write error :-0x0001: E (74249) TRANSPORT_BASE: esp_tls_conn_write error, errno=Success E (74256) TRANSPORT_WS: Error write header E (74260) WEBSOCKET_CLIENT: Network error: esp_transport_write() returned -1, errno=0 E (74270) TRANSPORT_BASE: poll_read select error 0, errno = Success, fd = 54 I (74270) WEBSOCKET_CLIENT: Reconnect after 10000 ms E (74277) WEBSOCKET_CLIENT: Network error: esp_transport_poll_read() returned -1, errno=119 I (74283) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (74297) MAIN: disconnected wss event I (74292) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (74307) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (74313) MAIN: disconnected wss event I (74312) MAIN: Has event log rs485_handle I (74322) MAIN: mtfc Offline I (74375) MAIN: Has event log rs485_handle I (74376) MAIN: mtfc Offline

I use Ringbuffer. and my submit function

app_websocket_handle_t app_websocket_init(app_websocket_config_t* config) { app_websocket_handle_t handle = malloc(sizeof(app_websocket_t)); handle->network_handle = config->network_handle; handle->app_rs485_handle = config->rs485_handle; handle->callback = config->callback; handle->websocket_connected = false; handle->websocket_url = strdup(config->websocket_url); handle->is_start_websocket = false; handle->ws_tx_buffer = malloc(WS_BUFFER_SIZE); handle->rx_rb = xRingbufferCreate(DEFAULT_MESH_RINGBUFFER_SIZE, RINGBUF_TYPE_NOSPLIT); handle->tx_rb = xRingbufferCreate(DEFAULT_MESH_RINGBUFFER_SIZE, RINGBUF_TYPE_NOSPLIT); handle->device_id = NULL; handle->last_login_tick = -LOGIN_TIMEOUT_MS; handle->last_ping_tick = -PING_TIMEOUT_MS; handle->last_timeout_ping = -PING_TIMEOUT_MS; handle->last_reg_tick = -REGISTER_TIMEOUT_MS; handle->hardware_id = strdup(config->hardware_id); handle->keepAlliveCloud = 0; return handle; }

void app_websocket_send(app_websocket_handle_t handle, uint8_t data, int len) { esp_websocket_client_send_bin(handle->client, (char) data, len, 1000 / portTICK_PERIOD_MS); }

static void websocket_event_handler(void handler_args, esp_event_base_t base, int32_t event_id, void event_data) { app_websocket_handle_t handle = (app_websocket_handle_t)handler_args;

esp_websocket_event_data_t *data = (esp_websocket_event_data_t *)event_data;
switch (event_id) {
    case WEBSOCKET_EVENT_CONNECTED:
        ESP_LOGI(TAG, "WEBSOCKET_EVENT_CONNECTED");
        handle->websocket_connected = true;
        handle->is_logged = false;
        _callback(handle, APP_WEBSOCKET_ON_EVENT_CONNECTED, NULL, 0);
        break;
    case WEBSOCKET_EVENT_DISCONNECTED:
        ESP_LOGI(TAG, "WEBSOCKET_EVENT_DISCONNECTED");
        handle->websocket_connected = false;
        handle->is_logged = false;
        _callback(handle, APP_WEBSOCKET_ON_EVENT_DISCONNECTED, NULL, 0);
        break;
    case WEBSOCKET_EVENT_DATA:
        if (data->data_len <= 0) {
            break;
        }
        ESP_LOGI(TAG, "WEBSOCKET_EVENT_DATA");
        ESP_LOGI(TAG, "Received opcode=%d", data->op_code);
        ESP_LOGW(TAG, "Received=%.*s", data->data_len, (char *)data->data_ptr);
        ESP_LOGW(TAG, "Total payload length=%d, data_len=%d, current payload offset=%d\r\n", data->payload_len, data->data_len, data->payload_offset);
        if (xRingbufferSend(handle->rx_rb, data->data_ptr, data->data_len, 10000 / portTICK_RATE_MS) != pdTRUE) {
            ESP_LOGE(TAG, "Error enqueuing...");
        }
        break;
    case WEBSOCKET_EVENT_ERROR:
        ESP_LOGI(TAG, "WEBSOCKET_EVENT_ERROR");
        _callback(handle, APP_WEBSOCKET_ON_EVENT_ERROR, NULL, 0);
        break;
}

}

esp_err_t _app_ws_prepare(app_websocket_handle_t handle) { if (!get_internet_connection_status(handle->network_handle)) { ESP_LOGI(TAG, "Waiting for network..."); vTaskDelay(500 / portTICK_RATE_MS); return ESP_FAIL; } if(!is_get_details(handle->app_rs485_handle)) { ESP_LOGI(TAG, "Waiting for get details..."); vTaskDelay(500 / portTICK_RATE_MS); return ESP_FAIL; }

if (handle->websocket_connected) {
    return ESP_OK;
}

if (handle->is_start_websocket) {
    return ESP_FAIL;
}

esp_websocket_client_config_t websocket_cfg = {};

websocket_cfg.uri = handle->websocket_url;

ESP_LOGI(TAG, "Connecting to %s...", websocket_cfg.uri);

handle->client = esp_websocket_client_init(&websocket_cfg);
esp_websocket_register_events(handle->client, WEBSOCKET_EVENT_ANY, websocket_event_handler, (void *)handle);

esp_websocket_client_start(handle->client);

handle->is_start_websocket = true;

return ESP_FAIL;   

}

esp_err_t _app_ws_sending_data(app_websocket_handle_t handle) { size_t item_sz;

void *item = xRingbufferReceive(handle->tx_rb, &item_sz, 100 / portTICK_RATE_MS);

if (item != NULL) {
    app_websocket_send(handle, item, item_sz);
    vRingbufferReturnItem(handle->tx_rb, item);
}
return ESP_OK;

}

esp_err_t _app_ws_sending_schedule(app_websocket_handle_t handle, type_mtfc_schedule_t type_mtfc_schedule) { if (handle == NULL) return; if (!handle->is_logged) { return ESP_FAIL; }

MainMessage mainMessage = MAIN_MESSAGE__INIT;
DeviceMessage deviceMessage = DEVICE_MESSAGE__INIT;
DeviceUpdateMessage deviceUpdateMessage = DEVICE_UPDATE_MESSAGE__INIT;
DeviceUpdateScheduleRequest deviceUpdateScheduleRequest = DEVICE_UPDATE_SCHEDULE_REQUEST__INIT;

deviceUpdateScheduleRequest.deviceid = handle->device_id;
deviceUpdateScheduleRequest.num_side = type_mtfc_schedule.num_side;

ActiveLamp active_lamp = ACTIVE_LAMP__INIT;
HMTime begin = HMTIME__INIT;
HMTime end = HMTIME__INIT;
begin.hour = type_mtfc_schedule.active_time.tbegin.hour;
// printf("Begin.hour: %02d\r\n", begin.hour);
begin.minute = type_mtfc_schedule.active_time.tbegin.minute;
// printf("Begin.minute: %02d\r\n", begin.minute);
active_lamp.begin = &begin;

end.hour = type_mtfc_schedule.active_time.tend.hour;
end.minute = type_mtfc_schedule.active_time.tend.minute;
active_lamp.end = &end;
/*******************************************************************Cycle Form**************************************************************************************************/
CycleLampForm cycleLampForm = CYCLE_LAMP_FORM__INIT;
OneCycleLampTime *oneCycleLampTimeList[32];
for (int i = 0; i < 32; i++)
{
    oneCycleLampTimeList[i] = (OneCycleLampTime *)malloc(sizeof(OneCycleLampTime));
    one_cycle_lamp_time__init(oneCycleLampTimeList[i]);
}
OneSideLampTime *oneSideLampTimeList[32][8];

for (int i = 0; i < 32; i++)
{
    for (int j = 0; j < 8; j++)
    {
        oneSideLampTimeList[i][j] = (OneSideLampTime *)malloc(sizeof(OneSideLampTime));
        one_side_lamp_time__init(oneSideLampTimeList[i][j]);
    }

    for (int j = 0; j < 8; j++)
    {
        oneSideLampTimeList[i][j]->t_green = type_mtfc_schedule.cycle.index[i].side[j].t_green;
        oneSideLampTimeList[i][j]->t_yellow = type_mtfc_schedule.cycle.index[i].side[j].t_yellow;
        oneSideLampTimeList[i][j]->t_red = type_mtfc_schedule.cycle.index[i].side[j].t_red;
        oneSideLampTimeList[i][j]->t_start_green = type_mtfc_schedule.cycle.index[i].side[j].t_start_green;
        oneSideLampTimeList[i][j]->t_start_yellow = type_mtfc_schedule.cycle.index[i].side[j].t_start_yellow;
        oneSideLampTimeList[i][j]->t_end_green = type_mtfc_schedule.cycle.index[i].side[j].t_end_green;
        oneSideLampTimeList[i][j]->t_end_yellow = type_mtfc_schedule.cycle.index[i].side[j].t_end_yellow;
    }
    oneCycleLampTimeList[i]->side = oneSideLampTimeList[i];
    oneCycleLampTimeList[i]->n_side = MAX_SIDE;
    oneCycleLampTimeList[i]->clearance_time_crossroads = type_mtfc_schedule.cycle.index[i].clearance_time_crossroads;
    oneCycleLampTimeList[i]->num_side_used = type_mtfc_schedule.cycle.index[i].num_side_used;
    oneCycleLampTimeList[i]->period_crossroads = type_mtfc_schedule.cycle.index[i].period_crossroads;
}
cycleLampForm.n_index = 32;
cycleLampForm.index = oneCycleLampTimeList;
/*******************************************************************Cycle Form**************************************************************************************************/
/*******************************************************************Time Form**************************************************************************************************/

TimeLampForm timeLampForm = TIME_LAMP_FORM__INIT;
DayTimeLine *dayTimeLine[MAX_TIME_FORM];

for (int i = 0; i < MAX_TIME_LINE; i++)
{
    dayTimeLine[i] = (DayTimeLine *)malloc(sizeof(DayTimeLine));
    day_time_line__init(dayTimeLine[i]);
}

HMTime t_begin_apply = HMTIME__INIT;
OneTimeline *oneTimeline[MAX_TIME_FORM][MAX_TIME_LINE];
for (int i = 0; i < MAX_TIME_FORM; i++)
{
    for (int j = 0; j < MAX_TIME_LINE; j++)
    {
        oneTimeline[i][j] = (OneTimeline *)malloc(sizeof(OneTimeline));
        one_timeline__init(oneTimeline[i][j]);
    }
    for (int j = 0; j < MAX_TIME_LINE; j++)
    {
        oneTimeline[i][j]->t_begin_apply = malloc(sizeof(HMTime));

        hmtime__init(oneTimeline[i][j]->t_begin_apply);

        oneTimeline[i][j]->t_begin_apply->hour = type_mtfc_schedule.time.index[i].select_point[j].t_begin_apply.hour;
        oneTimeline[i][j]->t_begin_apply->minute = type_mtfc_schedule.time.index[i].select_point[j].t_begin_apply.minute;
        oneTimeline[i][j]->index_cycle_form = type_mtfc_schedule.time.index[i].select_point[j].index_cycle_form;
    }
    dayTimeLine[i]->n_selectpoint = MAX_TIME_FORM;
    dayTimeLine[i]->selectpoint = oneTimeline[i];
}
timeLampForm.n_index = MAX_TIME_FORM;
timeLampForm.index = dayTimeLine;

/*******************************************************************Time Form**************************************************************************************************/

/*******************************************************************Day Form**************************************************************************************************/
DayLampForm dayLampForm = DAY_LAMP_FORM__INIT;

uint32_t temp[7];

for (int i = 0; i < MAX_DAYS_WORKING; i++) {
    temp[i] = type_mtfc_schedule.days.index[i];
}

dayLampForm.index = temp;// malloc(MAX_DAYS_WORKING * sizeof(uint32_t));

// copy_u8_array_to_u32_array(type_mtfc_schedule.days.index, dayLampForm.index, MAX_DAYS_WORKING);
dayLampForm.n_index = MAX_DAYS_WORKING;

/*******************************************************************Day Form**************************************************************************************************/

deviceUpdateScheduleRequest.days = &dayLampForm;
deviceUpdateScheduleRequest.time = &timeLampForm;
deviceUpdateScheduleRequest.active_time = &active_lamp;
deviceUpdateScheduleRequest.cycle = &cycleLampForm;
deviceUpdateMessage.deviceupdateschedulerequest = &deviceUpdateScheduleRequest;
deviceMessage.deviceupdatemessage = &deviceUpdateMessage;
mainMessage.devicemessage = &deviceMessage;

int size = main_message__pack(&mainMessage, handle->ws_tx_buffer);

if (xRingbufferSend(handle->tx_rb, handle->ws_tx_buffer, size, 5000 / portTICK_RATE_MS) != pdTRUE)
{
    ESP_LOGE(TAG, "Error enqueuing...");
    return ESP_FAIL;
}

// int size = main_message__pack(&mainMessage, handle->ws_tx_buffer);

// app_websocket_send(handle, handle->ws_tx_buffer, size);

ESP_LOGE(TAG, "Size of schedule message %d", size);
return ESP_OK;

}

I HAVE CHECKED MANY TIMES AND EVERY 2 SUCCESSFUL SENDS THE SYSTEM HAS THIS ERROR

I (386811) MAIN: mtfc Offline E (396892) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (396892) esp-tls: create_ssl_handle failed E (396893) esp-tls: Failed to open new connection E (396898) TRANSPORT_BASE: Failed to open a new connection E (396905) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (396913) WEBSOCKET_CLIENT: Error transport connect I (396918) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (396924) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (396930) MAIN: disconnected wss event I (396945) MAIN: Has event log rs485_handle I (396945) MAIN: mtfc Offline E (407344) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (407344) esp-tls: create_ssl_handle failed E (407344) esp-tls: Failed to open new connection E (407350) TRANSPORT_BASE: Failed to open a new connection E (407356) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (407364) WEBSOCKET_CLIENT: Error transport connect I (407370) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (407376) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (407381) MAIN: disconnected wss event I (407397) MAIN: Has event log rs485_handle I (407397) MAIN: mtfc Offline E (417437) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (417437) esp-tls: create_ssl_handle failed E (417438) esp-tls: Failed to open new connection E (417443) TRANSPORT_BASE: Failed to open a new connection E (417450) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (417457) WEBSOCKET_CLIENT: Error transport connect I (417463) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (417469) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (417475) MAIN: disconnected wss event I (417490) MAIN: Has event log rs485_handle I (417490) MAIN: mtfc Offline E (427804) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (427804) esp-tls: create_ssl_handle failed E (427804) esp-tls: Failed to open new connection E (427810) TRANSPORT_BASE: Failed to open a new connection E (427816) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (427824) WEBSOCKET_CLIENT: Error transport connect I (427830) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (427836) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (427841) MAIN: disconnected wss event I (427857) MAIN: Has event log rs485_handle I (427857) MAIN: mtfc Offline E (438744) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (438744) esp-tls: create_ssl_handle failed E (438745) esp-tls: Failed to open new connection E (438750) TRANSPORT_BASE: Failed to open a new connection E (438757) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (438765) WEBSOCKET_CLIENT: Error transport connect I (438770) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (438776) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (438782) MAIN: disconnected wss event I (438797) MAIN: Has event log rs485_handle I (438797) MAIN: mtfc Offline E (449647) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (449647) esp-tls: create_ssl_handle failed E (449648) esp-tls: Failed to open new connection

What is the actual behavior?

I (386811) MAIN: mtfc Offline E (396892) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (396892) esp-tls: create_ssl_handle failed E (396893) esp-tls: Failed to open new connection E (396898) TRANSPORT_BASE: Failed to open a new connection E (396905) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (396913) WEBSOCKET_CLIENT: Error transport connect I (396918) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (396924) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (396930) MAIN: disconnected wss event I (396945) MAIN: Has event log rs485_handle I (396945) MAIN: mtfc Offline E (407344) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (407344) esp-tls: create_ssl_handle failed E (407344) esp-tls: Failed to open new connection E (407350) TRANSPORT_BASE: Failed to open a new connection E (407356) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (407364) WEBSOCKET_CLIENT: Error transport connect I (407370) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (407376) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (407381) MAIN: disconnected wss event I (407397) MAIN: Has event log rs485_handle I (407397) MAIN: mtfc Offline E (417437) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (417437) esp-tls: create_ssl_handle failed E (417438) esp-tls: Failed to open new connection E (417443) TRANSPORT_BASE: Failed to open a new connection E (417450) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (417457) WEBSOCKET_CLIENT: Error transport connect I (417463) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (417469) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (417475) MAIN: disconnected wss event I (417490) MAIN: Has event log rs485_handle I (417490) MAIN: mtfc Offline E (427804) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (427804) esp-tls: create_ssl_handle failed E (427804) esp-tls: Failed to open new connection E (427810) TRANSPORT_BASE: Failed to open a new connection E (427816) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (427824) WEBSOCKET_CLIENT: Error transport connect I (427830) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (427836) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (427841) MAIN: disconnected wss event I (427857) MAIN: Has event log rs485_handle I (427857) MAIN: mtfc Offline E (438744) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (438744) esp-tls: create_ssl_handle failed E (438745) esp-tls: Failed to open new connection E (438750) TRANSPORT_BASE: Failed to open a new connection E (438757) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (438765) WEBSOCKET_CLIENT: Error transport connect I (438770) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (438776) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (438782) MAIN: disconnected wss event I (438797) MAIN: Has event log rs485_handle I (438797) MAIN: mtfc Offline E (449647) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (449647) esp-tls: create_ssl_handle failed E (449648) esp-tls: Failed to open new connection

Steps to reproduce.

  1. Step
  2. Step
  3. Step ... I (386811) MAIN: mtfc Offline E (396892) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (396892) esp-tls: create_ssl_handle failed E (396893) esp-tls: Failed to open new connection E (396898) TRANSPORT_BASE: Failed to open a new connection E (396905) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (396913) WEBSOCKET_CLIENT: Error transport connect I (396918) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (396924) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (396930) MAIN: disconnected wss event I (396945) MAIN: Has event log rs485_handle I (396945) MAIN: mtfc Offline E (407344) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (407344) esp-tls: create_ssl_handle failed E (407344) esp-tls: Failed to open new connection E (407350) TRANSPORT_BASE: Failed to open a new connection E (407356) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (407364) WEBSOCKET_CLIENT: Error transport connect I (407370) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (407376) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (407381) MAIN: disconnected wss event I (407397) MAIN: Has event log rs485_handle I (407397) MAIN: mtfc Offline E (417437) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (417437) esp-tls: create_ssl_handle failed E (417438) esp-tls: Failed to open new connection E (417443) TRANSPORT_BASE: Failed to open a new connection E (417450) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (417457) WEBSOCKET_CLIENT: Error transport connect I (417463) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (417469) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (417475) MAIN: disconnected wss event I (417490) MAIN: Has event log rs485_handle I (417490) MAIN: mtfc Offline E (427804) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (427804) esp-tls: create_ssl_handle failed E (427804) esp-tls: Failed to open new connection E (427810) TRANSPORT_BASE: Failed to open a new connection E (427816) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (427824) WEBSOCKET_CLIENT: Error transport connect I (427830) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (427836) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (427841) MAIN: disconnected wss event I (427857) MAIN: Has event log rs485_handle I (427857) MAIN: mtfc Offline E (438744) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (438744) esp-tls: create_ssl_handle failed E (438745) esp-tls: Failed to open new connection E (438750) TRANSPORT_BASE: Failed to open a new connection E (438757) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (438765) WEBSOCKET_CLIENT: Error transport connect I (438770) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (438776) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (438782) MAIN: disconnected wss event I (438797) MAIN: Has event log rs485_handle I (438797) MAIN: mtfc Offline E (449647) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (449647) esp-tls: create_ssl_handle failed E (449648) esp-tls: Failed to open new connection

Debug Logs.

I (386811) MAIN: mtfc Offline
E (396892) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00
E (396892) esp-tls: create_ssl_handle failed
E (396893) esp-tls: Failed to open new connection
E (396898) TRANSPORT_BASE: Failed to open a new connection
E (396905) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443
E (396913) WEBSOCKET_CLIENT: Error transport connect
I (396918) WEBSOCKET_CLIENT: Reconnect after 10000 ms
I (396924) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED
I (396930) MAIN: disconnected wss event
I (396945) MAIN: Has event log rs485_handle
I (396945) MAIN: mtfc Offline
E (407344) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00
E (407344) esp-tls: create_ssl_handle failed
E (407344) esp-tls: Failed to open new connection
E (407350) TRANSPORT_BASE: Failed to open a new connection
E (407356) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443
E (407364) WEBSOCKET_CLIENT: Error transport connect
I (407370) WEBSOCKET_CLIENT: Reconnect after 10000 ms
I (407376) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED
I (407381) MAIN: disconnected wss event
I (407397) MAIN: Has event log rs485_handle
I (407397) MAIN: mtfc Offline
E (417437) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00
E (417437) esp-tls: create_ssl_handle failed
E (417438) esp-tls: Failed to open new connection
E (417443) TRANSPORT_BASE: Failed to open a new connection
E (417450) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443
E (417457) WEBSOCKET_CLIENT: Error transport connect
I (417463) WEBSOCKET_CLIENT: Reconnect after 10000 ms
I (417469) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED
I (417475) MAIN: disconnected wss event
I (417490) MAIN: Has event log rs485_handle
I (417490) MAIN: mtfc Offline
E (427804) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00
E (427804) esp-tls: create_ssl_handle failed
E (427804) esp-tls: Failed to open new connection
E (427810) TRANSPORT_BASE: Failed to open a new connection
E (427816) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443
E (427824) WEBSOCKET_CLIENT: Error transport connect
I (427830) WEBSOCKET_CLIENT: Reconnect after 10000 ms
I (427836) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED
I (427841) MAIN: disconnected wss event
I (427857) MAIN: Has event log rs485_handle
I (427857) MAIN: mtfc Offline
E (438744) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00
E (438744) esp-tls: create_ssl_handle failed
E (438745) esp-tls: Failed to open new connection
E (438750) TRANSPORT_BASE: Failed to open a new connection
E (438757) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443
E (438765) WEBSOCKET_CLIENT: Error transport connect
I (438770) WEBSOCKET_CLIENT: Reconnect after 10000 ms
I (438776) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED
I (438782) MAIN: disconnected wss event
I (438797) MAIN: Has event log rs485_handle
I (438797) MAIN: mtfc Offline
E (449647) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00
E (449647) esp-tls: create_ssl_handle failed
E (449648) esp-tls: Failed to open new connection

More Information.

No response

saiquaan5 commented 2 years ago

ALL LOG

saiquaan5 commented 2 years ago

Writing at 0x00008000... (100 %) Wrote 3072 bytes (117 compressed) at 0x00008000 in 0.1 seconds (effective 252.1 kbit/s)... Hash of data verified.

Leaving... Hard resetting via RTS pin... Executing action: monitor Running idf_monitor in directory /Users/mac/project/GW-Traffic-SDKD-1.0/GW-Traffic-sdkd_ver1.1/usb_cdc_4g_module Executing "/Users/mac/.espressif/python_env/idf4.4_py3.10_env/bin/python /Users/mac/esp/esp-idf/tools/idf_monitor.py -p /dev/cu.usbserial-0001 -b 115200 --toolchain-prefix xtensa-esp32s3-elf- --target esp32s3 /Users/mac/project/GW-Traffic-SDKD-1.0/GW-Traffic-sdkd_ver1.1/usb_cdc_4g_module/build/cdc_4g.elf -m '/Users/mac/.espressif/python_env/idf4.4_py3.10_env/bin/python' '/Users/mac/esp/esp-idf/tools/idf.py' '-p' '/dev/cu.usbserial-0001' '-b' '921600'"... --- idf_monitor on /dev/cu.usbserial-0001 115200 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- nt 3: paddr=ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x1 (POWERON),boot:0xb (SPI_FAST_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:1 load:0x3fce3808,len:0x17c0 load:0x403c9700,len:0xe64 load:0x403cc700,len:0x2fec entry 0x403c9980 I (24) boot: ESP-IDF v4.4.3-dirty 2nd stage bootloader I (25) boot: compile time 10:27:38 I (25) boot: chip revision: 0 I (27) qio_mode: Enabling default flash chip QIO I (32) boot.esp32s3: Boot SPI Speed : 80MHz I (37) boot.esp32s3: SPI Mode : QIO I (42) boot.esp32s3: SPI Flash Size : 4MB I (46) boot: Enabling RNG early entropy source... I (52) boot: Partition Table: I (55) boot: ## Label Usage Type ST Offset Length I (63) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (70) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (78) boot: 2 factory factory app 00 00 00010000 00100000 I (85) boot: 3 storage Unknown data 01 82 00110000 00100000 I (92) boot: End of partition table I (97) esp_image: segment 0: paddr=00010020 vaddr=3c0a0020 size=2d9d8h (186840) map I (133) esp_image: segment 1: paddr=0003da00 vaddr=3fc9d230 size=02618h ( 9752) load I (135) esp_image: segment 2: paddr=00040020 vaddr=42000020 size=9af7ch (634748) map I (235) esp_image: segment 3: paddr=000dafa4 vaddr=3fc9f848 size=01b64h ( 7012) load I (237) esp_image: segment 4: paddr=000dcb10 vaddr=40378000 size=1522ch ( 86572) load I (258) esp_image: segment 5: paddr=000f1d44 vaddr=50000000 size=00010h ( 16) load I (266) boot: Loaded app from partition at offset 0x10000 I (266) boot: Disabling RNG early entropy source... I (278) cpu_start: Pro cpu up. I (278) cpu_start: Starting app cpu, entry point is 0x40379600 0x40379600: call_start_cpu1 at /Users/mac/esp/esp-idf/components/esp_system/port/cpu_start.c:148

I (0) cpu_start: App cpu up. I (292) cpu_start: Pro cpu start user code I (292) cpu_start: cpu freq: 240000000 I (292) cpu_start: Application information: I (295) cpu_start: Project name: cdc_4g I (300) cpu_start: App version: db54cff-dirty I (305) cpu_start: Compile time: Dec 1 2022 10:27:34 I (311) cpu_start: ELF file SHA256: 8ed56125a6a0cf0f... I (317) cpu_start: ESP-IDF: v4.4.3-dirty I (323) heap_init: Initializing. RAM available for dynamic allocation: I (330) heap_init: At 3FCA4D10 len 00044A00 (274 KiB): D/IRAM I (336) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM I (343) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM I (350) spi_flash: detected chip: generic I (354) spi_flash: flash io: qio W (358) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header. I (371) sleep: Configure to isolate all GPIO pins in sleep state I (378) sleep: Enable automatic switching of GPIO sleep configuration I (385) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (400) MAIN: HardwareId: GW-3C:4A:D9:FA W (422) MAIN: System using 4g/wifi I (422) APP_NETWORK: ----------------------- System using 4G ----------------------- I (424) APP_WEBSOCKET: Waiting for network... I (424) RS485_TASK: driver uart installed successfully I (637) MAIN: Type CPU: 0 Num phase: 2 IMEI: SDKD-7830B506 FirmwareBuild: [Nov 9 2022 16:13:50] Lat: 10.89 ,Long: 106.68 I (929) APP_WEBSOCKET: Waiting for network... I (1429) APP_WEBSOCKET: Waiting for network... I (1929) APP_WEBSOCKET: Waiting for network... I (2429) APP_WEBSOCKET: Waiting for network... I (2929) APP_WEBSOCKET: Waiting for network... I (3429) APP_WEBSOCKET: Waiting for network... I (3929) APP_WEBSOCKET: Waiting for network... I (4429) APP_WEBSOCKET: Waiting for network... I (4929) APP_WEBSOCKET: Waiting for network... I (5429) APP_WEBSOCKET: Waiting for network... I (5929) APP_WEBSOCKET: Waiting for network... I (6429) APP_WEBSOCKET: Waiting for network... I (6929) APP_WEBSOCKET: Waiting for network... I (7429) APP_WEBSOCKET: Waiting for network... I (7929) APP_WEBSOCKET: Waiting for network... I (8429) APP_WEBSOCKET: Waiting for network... I (8929) APP_WEBSOCKET: Waiting for network... I (9429) APP_WEBSOCKET: Waiting for network... I (9929) APP_WEBSOCKET: Waiting for network... I (10429) APP_WEBSOCKET: Waiting for network... I (10929) APP_WEBSOCKET: Waiting for network... I (11429) APP_WEBSOCKET: Waiting for network... I (11929) APP_WEBSOCKET: Waiting for network... I (12423) APP_4G: ==================================== I (12423) APP_4G: ESP 4G Cat.1 Wi-Fi Router I (12423) APP_4G: ==================================== I (12429) APP_WEBSOCKET: Waiting for network... W (12429) modem_board: Force reset modem I (12438) gpio: GPIO[8]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 W (12448) modem_board: Resetting modem using io=8, level=1 W (12654) modem_board: Waiting for modem initialize ready I (12934) APP_WEBSOCKET: Waiting for network... I (13434) APP_WEBSOCKET: Waiting for network... I (13934) APP_WEBSOCKET: Waiting for network... I (14434) APP_WEBSOCKET: Waiting for network... I (14934) APP_WEBSOCKET: Waiting for network... I (15434) APP_WEBSOCKET: Waiting for network... I (15934) APP_WEBSOCKET: Waiting for network... I (16434) APP_WEBSOCKET: Waiting for network... I (16934) APP_WEBSOCKET: Waiting for network... I (17434) APP_WEBSOCKET: Waiting for network... I (17684) ESP_USBH: USB Port=1 init succeed, fifo strategy=0 I (17684) ESP_USBH: usb port start succeed I (17684) USB_HCDC: CDC task start I (17684) USB_HCDC: usb driver install succeed I (17693) USB_HCDC: Waiting CDC Device Connection I (17684) ESP_USBH: USB Processing Start I (17703) ESP_USBH: Waiting USB Connection I (17708) ESP_USBH: Port power: ON Succeed I (17934) APP_WEBSOCKET: Waiting for network... I (18170) ESP_USBH: line 144 PORT_EVENT_CONNECTION I (18270) ESP_USBH: Resetting Port I (18330) ESP_USBH: Port reset succeed I (18330) ESP_USBH: Getting Port Speed I (18330) ESP_USBH: USB Speed: full-speed I (18333) ESP_USBH: Pipe init succeed, addr: 00 I (18338) ESP_USBH: Set Device Addr = 1 I (18342) ESP_USBH: Set Device Addr Done I (18347) ESP_USBH: get device desc I (18351) ESP_USBH: get device desc, actual_num_bytes:26 Device descriptor bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0x0 bDeviceSubClass 0x0 bDeviceProtocol 0x0 bMaxPacketSize0 64 idVendor 0x1e0e idProduct 0x9001 bcdDevice 3.10 iManufacturer 1 iProduct 2 iSerialNumber 3 bNumConfigurations 1 I (18380) ESP_USBH: get short config desc I (18386) ESP_USBH: get config desc, actual_num_bytes:16 I (18391) ESP_USBH: get full config desc I (18397) ESP_USBH: get full config desc, actual_num_bytes:266 Configuration descriptor bLength 9 bDescriptorType 2 wTotalLength 258 bNumInterfaces 6 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 bMaxPower 500mA Interface descriptor bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 0xff bInterfaceSubClass 0xff bInterfaceProtocol 0xff I (18434) APP_WEBSOCKET: Waiting for network... iInterface 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x1 EP 1 OUT bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 Interface descriptor bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 0xff bInterfaceSubClass 0x0 bInterfaceProtocol 0x0 iInterface 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 0x3 INT wMaxPacketSize 10 bInterval 32 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x2 EP 2 OUT bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 Interface descriptor bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 0xff bInterfaceSubClass 0x0 bInterfaceProtocol 0x0 iInterface 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 0x3 INT wMaxPacketSize 10 bInterval 32 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x3 EP 3 OUT bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 Interface descriptor bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 0xff bInterfaceSubClass 0x0 bInterfaceProtocol 0x0 iInterface 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes 0x3 INT wMaxPacketSize 10 bInterval 32 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x4 EP 4 OUT bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 Interface descriptor bLength 9 bDescriptorType 4 bInterfaceNumber 4 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 0xff bInterfaceSubClass 0x0 bInterfaceProtocol 0x0 iInterface 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x89 EP 9 IN bmAttributes 0x3 INT wMaxPacketSize 10 bInterval 32 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x5 EP 5 OUT bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 Interface descriptor bLength 9 bDescriptorType 4 bInterfaceNumber 5 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 0xff bInterfaceSubClass 0xff bInterfaceProtocol 0xff iInterface 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x8b EP 11 IN bmAttributes 0x3 INT wMaxPacketSize 8 bInterval 32 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x8a EP 10 IN bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 Endpoint descriptor bLength 7 bDescriptorType 5 bEndpointAddress 0x6 EP 6 OUT bmAttributes 0x2 BULK wMaxPacketSize 64 bInterval 0 I (18768) ESP_USBH: Set Device Configuration = 1 I (18774) ESP_USBH: Set Device Configuration Done I (18779) ESP_USBH: Pipe init succeed, addr: 86 I (18784) ESP_USBH: Pipe init succeed, addr: 04 I (18789) USB_HCDC: CDC Device Connected I (18794) esp-modem: --------- Modem PreDefined Info ------------------ I (18801) esp-modem: Model: User Defined I (18806) esp-modem: Modem itf: IN Addr:0x86, OUT Addr:0x04 I (18812) esp-modem: ---------------------------------------------------- I (18820) gpio: GPIO[7]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (18829) gpio: GPIO[8]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (18839) USB_HCDC: rx0 flush -0 = 0 I (18843) modem_board: DTE reconnect, reconnecting ...

I (18940) APP_WEBSOCKET: Waiting for network... I (19440) APP_WEBSOCKET: Waiting for network... I (19849) modem_board: reconnect after 5s... I (19940) APP_WEBSOCKET: Waiting for network... I (20440) APP_WEBSOCKET: Waiting for network... I (20849) modem_board: reconnect after 4s... I (20940) APP_WEBSOCKET: Waiting for network... I (21440) APP_WEBSOCKET: Waiting for network... I (21849) modem_board: reconnect after 3s... I (21940) APP_WEBSOCKET: Waiting for network... I (22440) APP_WEBSOCKET: Waiting for network... I (22849) modem_board: reconnect after 2s... I (22940) APP_WEBSOCKET: Waiting for network... I (23440) APP_WEBSOCKET: Waiting for network... I (23849) modem_board: reconnect after 1s... I (23849) modem_board: Modem state STAGE_SYNC, Start I (23940) APP_WEBSOCKET: Waiting for network... I (24440) APP_WEBSOCKET: Waiting for network... I (24513) modem_board: Network Auto reconnecting ... I (24513) modem_board: Modem state STAGE_SYNC, Success! I (24613) modem_board: Modem state STAGE_CHECK_SIM, Start W (24626) esp_modem_dce: esp_modem_dce_generic_command(35): Command:AT+CPIN? ...failed W (24631) esp_modem_dce: esp_modem_dce_generic_command(35): Command:AT+CPIN=1234 ...failed W (24665) modem_board: No SIM Card or PIN Wrong! W (24665) modem_board: Modem state STAGE_CHECK_SIM, Failed, retry1, after 3000ms... I (24940) APP_WEBSOCKET: Waiting for network... I (25440) APP_WEBSOCKET: Waiting for network... I (25940) APP_WEBSOCKET: Waiting for network... I (26440) APP_WEBSOCKET: Waiting for network... I (26940) APP_WEBSOCKET: Waiting for network... I (27440) APP_WEBSOCKET: Waiting for network... I (27667) modem_board: Modem state STAGE_CHECK_SIM, Start W (27674) esp_modem_dce: esp_modem_dce_generic_command(35): Command:AT+CPIN=1234 ...failed W (27676) modem_board: No SIM Card or PIN Wrong! W (27677) modem_board: Modem state STAGE_CHECK_SIM, Failed, retry2, after 3000ms... I (27940) APP_WEBSOCKET: Waiting for network... I (28440) APP_WEBSOCKET: Waiting for network... I (28940) APP_WEBSOCKET: Waiting for network... I (29440) APP_WEBSOCKET: Waiting for network... I (29940) APP_WEBSOCKET: Waiting for network... I (30440) APP_WEBSOCKET: Waiting for network... I (30685) modem_board: Modem state STAGE_CHECK_SIM, Start I (30687) modem_board: SIM Card Ready I (30687) modem_board: Modem state STAGE_CHECK_SIM, Success! I (30790) modem_board: Modem state STAGE_CHECK_SIGNAL, Start I (30793) modem_board: Signal quality: rssi=30, ber=99 I (30793) modem_board: Modem state STAGE_CHECK_SIGNAL, Success! I (30897) modem_board: Modem state STAGE_CHECK_REGIST, Start I (30901) modem_board: Network registed, Operator: "Viettel Viettel" I (30901) modem_board: Modem state STAGE_CHECK_REGIST, Success! I (30940) APP_WEBSOCKET: Waiting for network... I (31005) modem_board: Modem state STAGE_START_PPP, Start I (31037) modem_board: Modem state STAGE_START_PPP, Success! W (31038) modem_board: Modem event! 0 I (31057) esp-netif_lwip-ppp: Connected I (31057) esp-netif_lwip-ppp: Name Server1: 203.113.131.6 I (31057) esp-netif_lwip-ppp: Name Server2: 203.113.131.5 I (31063) modem_board: IP event! 6 I (31066) modem_board: Modem Connected to PPP Server I (31072) modem_board: ppp ip: 10.173.238.83, mask: 255.255.255.255, gw: 10.64.64.64 I (31081) modem_board: Main DNS: 203.113.131.6 I (31086) modem_board: Backup DNS: 203.113.131.5 W (31091) APP_4G: changed: ap dns addr (auto): 203.113.131.6 I (31137) modem_board: Modem state STAGE_WAIT_IP, Start I (31137) modem_board: Modem state STAGE_WAIT_IP, Success! I (31440) APP_WEBSOCKET: Connecting to wss://dev.hue-traffic.sitech.com.vn/websocket... I (31639) APP_WEBSOCKET: to be increment variable ping timeout 0 I (32118) APP_WEBSOCKET: WEBSOCKET_EVENT_CONNECTED I (32118) MAIN: connected wss event I (32118) APP_WEBSOCKET: To be register I (32121) APP_WEBSOCKET: Type CPU: 0 Num phase: 2 IMEI: SDKD-7830B506 FirmwareBuild: [Nov 9 2022 16:13:50] Lat: 10.89 Long: 106.68 I (32264) APP_WEBSOCKET: WEBSOCKET_EVENT_DATA I (32264) APP_WEBSOCKET: Received opcode=2 W (32264) APP_WEBSOCKET: Received=7 53 11ED7053B1B55331A4CA005056034B6A�>

Thành công W (32272) APP_WEBSOCKET: Total payload length=57, data_len=57, current payload offset=0

I (32281) APP_WEBSOCKET: processing 57 bytes I (32286) APP_WEBSOCKET: Has Register response with code = 0 and message = Thành công I (32295) APP_WEBSOCKET: Device Register success, device id = 11ED7053B1B55331A4CA005056034B6A I (32336) APP_WEBSOCKET: To be login I (32460) APP_WEBSOCKET: WEBSOCKET_EVENT_DATA I (32460) APP_WEBSOCKET: Received opcode=2 W (32460) APP_WEBSOCKET: Received= "�>

Thành công W (32465) APP_WEBSOCKET: Total payload length=23, data_len=23, current payload offset=0

I (32474) APP_WEBSOCKET: processing 23 bytes I (32479) APP_WEBSOCKET: Has login response with code = 0 and message = Thành công I (32487) APP_WEBSOCKET: Device login success ! I (32493) MAIN: connected cloud wss event I (32508) MAIN: Has event log rs485_handle I (32508) MAIN: mtfc online I (32526) RS485_TASK: get config CPU I (32538) APP_WEBSOCKET: To be ping I (32538) MAIN: Has event config rs485_handle E (32538) APP_WEBSOCKET: Size of config message 68 I (32629) APP_WEBSOCKET: WEBSOCKET_EVENT_DATA I (32629) APP_WEBSOCKET: Received opcode=2 W (32629) APP_WEBSOCKET: Received= 2�> OK W (32633) APP_WEBSOCKET: Total payload length=13, data_len=13, current payload offset=0

I (32642) APP_WEBSOCKET: processing 13 bytes I (32647) APP_WEBSOCKET: Response from keepAlliveCloud I (34062) RS485_TASK: index_cycle 1 I (34063) RS485_TASK: index_cycle 2 I (34073) RS485_TASK: index_cycle 3 I (34073) RS485_TASK: index_cycle 4 I (34083) RS485_TASK: index_cycle 5 I (34084) RS485_TASK: index_cycle 6 I (34093) RS485_TASK: index_cycle 7 I (34094) RS485_TASK: index_cycle 8 I (34094) RS485_TASK: index_cycle 9 I (34104) RS485_TASK: index_cycle 10 I (34105) RS485_TASK: index_cycle 11 I (34114) RS485_TASK: index_cycle 12 I (34115) RS485_TASK: index_cycle 13 I (34125) RS485_TASK: index_cycle 14 I (34125) RS485_TASK: index_cycle 15 I (34135) RS485_TASK: index_cycle 16 I (34136) RS485_TASK: index_cycle 17 I (34136) RS485_TASK: index_cycle 18 I (34146) RS485_TASK: index_cycle 19 I (34146) RS485_TASK: index_cycle 20 I (34156) RS485_TASK: index_cycle 21 I (34157) RS485_TASK: index_cycle 22 I (34166) RS485_TASK: index_cycle 23 I (34167) RS485_TASK: index_cycle 24 I (34177) RS485_TASK: index_cycle 25 I (34177) RS485_TASK: index_cycle 26 I (34187) RS485_TASK: index_cycle 27 I (34188) RS485_TASK: index_cycle 28 I (34188) RS485_TASK: index_cycle 29 I (34198) RS485_TASK: index_cycle 30 I (34198) RS485_TASK: index_cycle 31 I (34202) RS485_TASK: index_cycle 32 I (34202) MAIN: Has event schedule rs485_handle E (34210) APP_WEBSOCKET: Size of schedule message 2263 I (41977) APP_WEBSOCKET: to be increment variable ping timeout 0 I (42587) APP_WEBSOCKET: To be ping I (42656) APP_WEBSOCKET: WEBSOCKET_EVENT_DATA I (42656) APP_WEBSOCKET: Received opcode=2 W (42657) APP_WEBSOCKET: Received= 2�> OK W (42660) APP_WEBSOCKET: Total payload length=13, data_len=13, current payload offset=0

I (42673) APP_WEBSOCKET: processing 13 bytes I (42674) APP_WEBSOCKET: Response from keepAlliveCloud I (51980) APP_WEBSOCKET: to be increment variable ping timeout 0 I (52599) APP_WEBSOCKET: To be ping I (52741) APP_WEBSOCKET: WEBSOCKET_EVENT_DATA I (52741) APP_WEBSOCKET: Received opcode=2 W (52741) APP_WEBSOCKET: Received= 2�> OK W (52745) APP_WEBSOCKET: Total payload length=13, data_len=13, current payload offset=0

I (52754) APP_WEBSOCKET: processing 13 bytes I (52759) APP_WEBSOCKET: Response from keepAlliveCloud I (54072) RS485_TASK: index_cycle 1 I (54073) RS485_TASK: index_cycle 2 I (54083) RS485_TASK: index_cycle 3 I (54083) RS485_TASK: index_cycle 4 I (54093) RS485_TASK: index_cycle 5 I (54094) RS485_TASK: index_cycle 6 I (54103) RS485_TASK: index_cycle 7 I (54104) RS485_TASK: index_cycle 8 I (54104) RS485_TASK: index_cycle 9 I (54114) RS485_TASK: index_cycle 10 I (54115) RS485_TASK: index_cycle 11 I (54124) RS485_TASK: index_cycle 12 I (54125) RS485_TASK: index_cycle 13 I (54135) RS485_TASK: index_cycle 14 I (54135) RS485_TASK: index_cycle 15 I (54145) RS485_TASK: index_cycle 16 I (54146) RS485_TASK: index_cycle 17 I (54146) RS485_TASK: index_cycle 18 I (54156) RS485_TASK: index_cycle 19 I (54156) RS485_TASK: index_cycle 20 I (54166) RS485_TASK: index_cycle 21 I (54167) RS485_TASK: index_cycle 22 I (54176) RS485_TASK: index_cycle 23 I (54177) RS485_TASK: index_cycle 24 I (54187) RS485_TASK: index_cycle 25 I (54187) RS485_TASK: index_cycle 26 I (54197) RS485_TASK: index_cycle 27 I (54198) RS485_TASK: index_cycle 28 I (54198) RS485_TASK: index_cycle 29 I (54208) RS485_TASK: index_cycle 30 I (54208) RS485_TASK: index_cycle 31 I (54212) RS485_TASK: index_cycle 32 I (54212) MAIN: Has event schedule rs485_handle E (54220) APP_WEBSOCKET: Size of schedule message 2263 I (61986) APP_WEBSOCKET: to be increment variable ping timeout 0 I (62706) APP_WEBSOCKET: To be ping I (62808) APP_WEBSOCKET: WEBSOCKET_EVENT_DATA I (62808) APP_WEBSOCKET: Received opcode=2 W (62808) APP_WEBSOCKET: Received= 2�> OK W (62812) APP_WEBSOCKET: Total payload length=13, data_len=13, current payload offset=0

I (62821) APP_WEBSOCKET: processing 13 bytes I (62826) APP_WEBSOCKET: Response from keepAlliveCloud I (71991) APP_WEBSOCKET: to be increment variable ping timeout 0 I (72719) APP_WEBSOCKET: To be ping I (72862) APP_WEBSOCKET: WEBSOCKET_EVENT_DATA I (72863) APP_WEBSOCKET: Received opcode=2 W (72863) APP_WEBSOCKET: Received= 2�> OK W (72866) APP_WEBSOCKET: Total payload length=13, data_len=13, current payload offset=0

I (72876) APP_WEBSOCKET: processing 13 bytes I (72881) APP_WEBSOCKET: Response from keepAlliveCloud I (74082) RS485_TASK: index_cycle 1 I (74083) RS485_TASK: index_cycle 2 I (74093) RS485_TASK: index_cycle 3 I (74093) RS485_TASK: index_cycle 4 I (74103) RS485_TASK: index_cycle 5 I (74104) RS485_TASK: index_cycle 6 I (74113) RS485_TASK: index_cycle 7 I (74114) RS485_TASK: index_cycle 8 I (74114) RS485_TASK: index_cycle 9 I (74124) RS485_TASK: index_cycle 10 I (74125) RS485_TASK: index_cycle 11 I (74134) RS485_TASK: index_cycle 12 I (74135) RS485_TASK: index_cycle 13 I (74145) RS485_TASK: index_cycle 14 I (74145) RS485_TASK: index_cycle 15 I (74155) RS485_TASK: index_cycle 16 I (74156) RS485_TASK: index_cycle 17 I (74156) RS485_TASK: index_cycle 18 I (74166) RS485_TASK: index_cycle 19 I (74166) RS485_TASK: index_cycle 20 I (74176) RS485_TASK: index_cycle 21 I (74177) RS485_TASK: index_cycle 22 I (74186) RS485_TASK: index_cycle 23 I (74187) RS485_TASK: index_cycle 24 I (74197) RS485_TASK: index_cycle 25 I (74197) RS485_TASK: index_cycle 26 I (74207) RS485_TASK: index_cycle 27 I (74207) RS485_TASK: index_cycle 28 I (74208) RS485_TASK: index_cycle 29 I (74218) RS485_TASK: index_cycle 30 I (74218) RS485_TASK: index_cycle 31 I (74222) RS485_TASK: index_cycle 32 I (74222) MAIN: Has event schedule rs485_handle E (74230) APP_WEBSOCKET: Size of schedule message 2263 E (74231) esp-aes: Failed to allocate memory E (74238) esp-tls-mbedtls: write error :-0x0001: E (74243) TRANSPORT_BASE: esp_tls_conn_write error, errno=Success E (74250) TRANSPORT_WS: Error write header E (74254) WEBSOCKET_CLIENT: Network error: esp_transport_write() returned -1, errno=0 E (74264) TRANSPORT_BASE: poll_read select error 0, errno = Success, fd = 54 I (74264) WEBSOCKET_CLIENT: Reconnect after 10000 ms E (74271) WEBSOCKET_CLIENT: Network error: esp_transport_poll_read() returned -1, errno=119 I (74277) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (74291) MAIN: disconnected wss event I (74286) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (74301) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (74307) MAIN: disconnected wss event I (74307) MAIN: Has event log rs485_handle I (74316) MAIN: mtfc Offline I (74322) MAIN: Has event log rs485_handle I (74324) MAIN: mtfc Offline E (84797) esp-tls-mbedtls: mbedtls_ssl_setup returned -0x7F00 E (84797) esp-tls: create_ssl_handle failed E (84798) esp-tls: Failed to open new connection E (84803) TRANSPORT_BASE: Failed to open a new connection E (84809) TRANSPORT_WS: Error connecting to host dev.hue-traffic.sitech.com.vn:443 E (84817) WEBSOCKET_CLIENT: Error transport connect I (84823) WEBSOCKET_CLIENT: Reconnect after 10000 ms I (84828) APP_WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED I (84834) MAIN: disconnected wss event I (84849) MAIN: Has event log rs485_handle I (84849) MAIN: mtfc Offline

chipweinberger commented 2 years ago

Your post is a little hard to read.

You should format it using expanding sections

https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab

and with code blocks

https://www.markdownguide.org/extended-syntax/#fenced-code-blocks

saiquaan5 commented 2 years ago

Ok i try. thanks for rep :d

ESP-YJM commented 2 years ago

@saiquaan5 From your log, it seems it failed with memory allocation failed. You need check whether your memory is enough and whether there is a memory leak in the application.

Alvin1Zhang commented 1 year ago

@saiquaan5 Thanks for reporting and sharing the updates. Would you please help share if any further updates for the issue? Thanks.

mahavirj commented 1 year ago

Closing. Please drop a comment if you are still facing the issue.