Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

[BUG] Trace output of ESP32-DevKitC jobs demo is clobbered #3543

@cookpate

Description

@cookpate

Describe the bug
A help message is printed out when the jobs_for_aws demo first runs. On the ESP32 DevKit at least, the message ends up clobbered and doesn't print out in full. I initially thought I was going to a dead link in the docs.

System information

  • Hardware board: ESP32-DevKitC
  • IDE used: ESP-IDF
  • Operating System: Windows
  • Code version: 202107.00-81-g49e7fe5d6
  • Project/Demo: Jobs_Demo

Expected behavior
The help message should be displayed in full without any clobbering as shown:

LogInfo( ( "\r\n"
"/*-----------------------------------------------------------*/\r\n"
"\r\n"
"The Jobs demo is now ready to accept Jobs.\r\n"
"Jobs may be created using the AWS IoT console or AWS CLI.\r\n"
"See the following link for more information.\r\n" ) );
LogInfo( ( "\r"
"https://docs.aws.amazon.com/cli/latest/reference/iot/create-job.html\r\n"
"\r\n"
"This demo expects Job documents to have an \"action\" JSON key.\r\n"
"The following actions are currently supported:\r\n" ) );
LogInfo( ( "\r"
" - print \r\n"
" Logs a message to the local console. The Job document must also contain a \"message\".\r\n"
" For example: { \"action\": \"print\", \"message\": \"Hello world!\"} will cause\r\n"
" \"Hello world!\" to be printed on the console.\r\n" ) );
LogInfo( ( "\r"
" - publish \r\n"
" Publishes a message to an MQTT topic. The Job document must also contain a \"message\" and \"topic\".\r\n" ) );
LogInfo( ( "\r"
" For example: { \"action\": \"publish\", \"topic\": \"demo/jobs\", \"message\": \"Hello world!\"} will cause\r\n"
" \"Hello world!\" to be published to the topic \"demo/jobs\".\r\n" ) );
LogInfo( ( "\r"
" - exit \r\n"
" Exits the demo program. This program will run until { \"action\": \"exit\" } is received.\r\n"
"\r\n"
"/*-----------------------------------------------------------*/\r\n" ) );

Screenshots or console output

14 495 [iot_thread] [jobs_demo.c:833] [INFO] [JobsDemo]
/*-----------------------------------------------------------*/

The Jobs demo is now ready to accept Jobs.
https://docs.aws.amazon.com/cli/latest/reference/iot/create-job.htmlJobsDemo]

 - print          ] [jobs_demo.c:843] [INFO] [JobsDemo]  key.
   Logs a message to the local console. The Job document must also contain a "message".
 - publish        "action17 495 [iot_thread] [jobs_demo.c:846] [INFO] [JobsDemo]
   Publishes a message to an MQTT topic. The Job document must also contain a "message" and "topic".


   For example: { "action": "publish", "topic": "demo/jobs", "message": "Hello world!"} will cause
 - exit           to be published 19 495 [iot_thread] [jobs_demo.c:854] [INFO] [JobsDemo]
   Exits the demo program. This program will run until { "action": "exit" } is received.

/*--------------------20 495 [iot_thread] [mqtt_demo_helpers.c:565] [INFO] [MQTT] Attempt to subscribe to the MQTT topic $aws/things/cookpateESP32-TestBoard/jobs/notify-next.

Steps to reproduce bug
Example:
1. Configure to run the Jobs Demo (#define CONFIG_JOBS_DEMO_ENABLED in aws_demo_config.h)
2. In the root directory with a configured ESP32 thing plugged in, flash and monitor the demo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions