Debug log (as in "mos console") over MQTT

My goal is to see a debug log, similar to that which shows up when I type mos console, on an AWS MQTT topic. I’ve tried to point stderr_topic and stdout_topic to AWS topics, but I haven’t had any luck and I think it may be a dead end.

Additionally, I have connected to my device using mos --cert-file certfile.crt.pem --key-file aws-cerfile.key.pem --port mqtts:// and run mos console using that method. When I do so, I get the following message:

Connecting to tcps://
Subscribed to device/log

Does anyone have any advice or insight, or is this a doomed endeavor? I appreciate any help you can provide!

I have successfully used AWS IoT Core MQTT to view device logs using stderr_topic.

Are you getting any specific errors in your mos logs when trying this?

1 Like

With the help of @rojer - I found a much easier and better way today - use debug.udp_log_addr= and set it to your IP address:1993. Forward the UDP port on your router if the device is external, then run mos console --port udp://:1993/ in terminal and you’ll get a full output - same as if your device is connected over usb.


Thank you so much! That’s incredibly helpful. I really appreciate the advice.