Oh that is strange. The code is common for all platforms https://github.com/espruino/Espruino/blob/master/libs/bluetooth/bluetooth_utils.c#L135 and the error message you see in your first example is here https://github.com/espruino/Espruino/blob/master/libs/bluetooth/bluetooth_utils.c#L167
Are you using recent/latest version of Espruino?
EDIT: the specific ESP32 code printing the message starting with "invalid Char UUID:" is here https://github.com/espruino/Espruino/blob/master/targets/esp32/BLE/esp32_gatts_func.c#L453 but for parsing it is calling the common bleVarToUUIDAndUnLock method
bleVarToUUIDAndUnLock
and what is also strange is that it probably parses the service ID in same format on line 510, before it breaks few lines below on parsing characteristics here https://github.com/espruino/Espruino/blob/master/targets/esp32/BLE/esp32_gatts_func.c#L521 so looks like maybe it reads the string from some wrong place and gets some garbage(?)
Yes, Espruino firmware version of my ESP32 board was updated to 2v21 version. Seems the problem is not with the public code, but rather with EPS32.
@SI_Cheng-Yun started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Oh that is strange. The code is common for all platforms
https://github.com/espruino/Espruino/blob/master/libs/bluetooth/bluetooth_utils.c#L135
and the error message you see in your first example is here
https://github.com/espruino/Espruino/blob/master/libs/bluetooth/bluetooth_utils.c#L167
Are you using recent/latest version of Espruino?
EDIT: the specific ESP32 code printing the message starting with "invalid Char UUID:" is here
https://github.com/espruino/Espruino/blob/master/targets/esp32/BLE/esp32_gatts_func.c#L453
but for parsing it is calling the common
bleVarToUUIDAndUnLock
methodand what is also strange is that it probably parses the service ID in same format
on line 510, before it breaks few lines below on parsing characteristics here
https://github.com/espruino/Espruino/blob/master/targets/esp32/BLE/esp32_gatts_func.c#L521
so looks like maybe it reads the string from some wrong place and gets some garbage(?)