>>21299065 I know, I've also tried to stop and start bl0942, but no success.
How can I disable logging on comport (by default)?
Added after 3 [minutes]: p.kaczmarek2 wrote: I do not think it's UART address.
I know this is the BL0942's internal address - I tried that to see if Tuya changed the address for the other BL0942.
Added after 2 [hours] 20 [minutes]:I added the received bytes log to the bl0942.c code.
static int BL0942_UART_TryToGetNextPacket(void) {
int cs;
int i;
int c_garbage_consumed = 0;
byte checksum;
cs = UART_GetDataSize();
ADDLOG_WARN(LOG_FEATURE_ENERGYMETER,
"bl0942 uart bytes %02X",
cs);
I tested it with an RS232 to USB PC converter connected at the same time on individual pins:
If UART 1 is set
request goes to TX1 2byte - also verified in PC
response on RX1 comes with 17 bytes - also verified on the PC
Warn:EnergyMeter:bl0942 uart bytes 17
If UART 2 is set
request goes to TX2 2byte - also verified in PC
response on RX2 in comes with 0 bytes - but the PC receives 17 bytes
Warn:EnergyMeter:bl0942 uart bytes 00
That is the problem is somewhere in the reception of data on UART2 - even if the data arrives on the pin, the routine in the bl0942.c code will not receive anything.
I will keep searching.