From 3e68ffff2d7110ac4d373cee2fbe8170f57b226b Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Thu, 10 Nov 2022 16:33:48 +0100 Subject: [PATCH] add logs --- ADIS_ESP32_Eclipse/main/udp_server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ADIS_ESP32_Eclipse/main/udp_server.c b/ADIS_ESP32_Eclipse/main/udp_server.c index d5cd3a0..f043066 100644 --- a/ADIS_ESP32_Eclipse/main/udp_server.c +++ b/ADIS_ESP32_Eclipse/main/udp_server.c @@ -52,10 +52,12 @@ void HandleIncomingUdpMessage(const char *rxMsg, int sock, struct sockaddr *sour if (rxMsg[strLen-1]=='!') { /* send to ESP32 shell */ rxMsg += sizeof("@esp:")-1; + ESP_LOGI(TAG,"msg without @esp: %s",rxMsg); unsigned char *cmd = (unsigned char*)calloc(strLen, sizeof(unsigned char)); if(cmd != NULL){ size_t cmdLen = strLen-(sizeof("@esp:")-1)-1; McuUtility_strcpy(cmd, cmdLen, (const unsigned char *)rxMsg); + ESP_LOGI(TAG,"cmd: %s",cmd); SHELL_SendToESPAndGetResponse((unsigned char*)cmd, response, sizeof(response)); }else{ McuUtility_strcpy(response, sizeof(response), (unsigned char*)"Failed to parse cmd!");