Skip to content

Output sent via Monitor object arrives out of order and corrupted #52

@per1234

Description

@per1234

Describe the problem

When a sketch transmits data via the Monitor object, the messages arrive out of order and with incorrectly placed line breaks.

To reproduce

  1. Create the following sketch:
    #include <Arduino_RouterBridge.h>
    
    void setup() {
      Monitor.begin();
    }
    
    void loop() {
      Monitor.print("Reading 1: ");
      Monitor.println(1234);
      Monitor.print("Reading 2: ");
      Monitor.println(4567);
      delay(500);
    }
  2. Upload the sketch to an UNO Q board.
  3. Open Serial Monitor.

🐛 The output from the sketch is not as expected:

Reading 1: 1234Reading 2: 4567
1234Reading 2: 4567
Reading 1: 

Reading 2: 4567Reading 1: 1234

Reading 2: 4567Reading 1: 1234

Reading 2: 45671234Reading 1: 
Reading 2: 4567
1234Reading 1: 1234Reading 2: 
Reading 1: 4567
Reading 1: 

1234Reading 2: 4567
Reading 2: 4567Reading 1: 1234
Reading 1: 
1234Reading 2: 4567

[...]

Expected behavior

Output is received in order:

Reading 1: 1234
Reading 2: 4567
Reading 1: 1234
Reading 2: 4567
Reading 1: 1234
Reading 2: 4567
Reading 1: 1234
Reading 2: 4567

[...]

Arduino_RouterBridge version

0.3.0

Additional context

We are seeing a spike of reports over the course of last few days. This seems to correlate with recent releases

  • "Arduino UNO Q Board" platform (arduino:zephyr) version 0.53.0
  • Arduino App Bricks version 0.6.4

Originally reported at:
https://forum.arduino.cc/t/why-an-update-messed-up-monitor-print/1427515

Note this:

I had my first simple sketch working then updated with a new patch for the MCU. Now the print formatting using Monitor is all over the place

Additional reports

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions