(Solved) AWS issue: RPC_Channel corrupted frame

I’m getting the following logs after the device connects to AWS:

> [Jul 30 10:09:41.459] mgos_rpc_channel_ua:142 0x3fff3bac Corrupted frame (0): '' '{"state": {"reported": {"ota":{"message": "idle", "status": 0, "is_cmgos_aws_shadow.c:358   Version: 0 -> 2912 (2)' 00000000 00000000
> [Jul 30 10:09:41.459] mgos_rpc_channel_ua:142 0x3fff3bac Corrupted frame (0): '' '{"state": {"reported": {"ota":{"message": "idle", "status": 0, "is_cmgos_aws_shadow.c:358   Version: 0 -> 2912 (2)' 00000000 00000000' 00000000 00000000
> [Jul 30 10:09:41.467] mgos_rpc_channel_ua:142 0x3fff3bac Corrupted frame (0): '' '{"state": {"reported": {"ota":{"message": "idle", "status": 0, "is_cmgos_aws_shadow.c:358   Version: 0 -> 2912 (2)' 00000000 00000000' 00000000 00000000' 00000000 00000000
> [Jul 30 10:09:41.573] mgos_rpc_channel_ua:142 0x3fff3bac Corrupted frame (0): '' '{"state": {"reporte
> ' 00000000 00000000
> [Jul 30 10:09:41.573] mgos_aws_shadow.c:358   Version: 0 -> 2913 (5)
> [Jul 30 10:09:41.573] mgos_aws_shadow.c:358   Version: 0 -> 2914 (5)

Or the likes of:

> [Jul 30 16:52:56.086]  mg_rpc.c:486            0x3fff376c INVALID FRAME (174): '{"state": {"reported": {"ota":{"message": "idle", "status": 0, "is_committed": true, "commit_timeout": 0, "partition": 0, "progress_percent": 0}}}, "clientToken": "707ac8a8"}'
> [Jul 30 16:52:56.119]  mg_rpc.c:486            0x3fff376c INVALID FRAME (174): '{"state": {"reported": {"ota":{"message": "idle", "status": 0, "is_committed": true, "commit_timeout": 0, "partition": 0, "progress_percent": 0}}}, "clientToken": "707ac8a8"}'
> [Jul 30 16:52:56.194] mg_rpc.c:486            0x3fff376c INVALID FRAME (174): '{"state": {"reported": {"ota":{"message": "idle", "status": 0, "is_committed": true, "commit_timeout": 0, "partition": 0, "progress_percent": 0}}}, "clientToken": "707ac8a8"}'
> [Jul 30 16:52:56.241] mg_rpc.c:486            0x3fff376c INVALID FRAME (174): '{"state": {"reported": {"ota":{"message": "idle", "status": 0, "is_committed": true, "commit_timeout": 0, "partition": 0, "progress_percent": 0}}}, "clientToken": "707ac8a8"}'
> [Jul 30 16:52:56.286] mg_rpc.c:486            0x3fff376c INVALID FRAME (174): '{"state": {"reported": {"ota":{"message": "idle", "status": 0, "is_committed": true, "commit_timeout": 0, "partition": 0, "progress_percent": 0}}}, "clientToken": "707ac8a8"}'
> [Jul 30 16:52:56.313] mgos_aws_shadow.c:358   Version: 0 -> 3061 (2)

Problem occurs after a rpc.loopback Sys.Reboot is called, but also occurs if normal mongoose system restart is used.

Sometimes the device follows the code normally, but most of the times it gets stuck and Core Dump it´s memory.

Any insights on this issue and/or how to solve it?

mgos_rpc_channel_ua suggests that the problem is with the UART RPC channel. Do you see it manifesting if UART is not used?

1 Like

Thank you for the reply, i was just about to mark as solved and update my issue. :sweat_smile:

My device indeed uses up the serial input of the ESP8266, more specifically the RX serial input.

My problem was solved by managing correctly the software allowance of the port. Currently, the function mgos_debug_suspend_uart() is sufficient for the C code to proceed.