r/embedded • • 13d ago

I kept working on my open-source serial monitor. It's at 2.2 now.

A while back, I shared WireTrace here when it was 1.0. A few of you tried it and told me what was missing, and the plot it has today started in that thread. I've kept working on it since, and it's at 2.2 now.

It's a serial monitor. You plug in a board, pick the port, and it shows what the board sends and saves all of it to a file. You can watch several boards at once, each in its own tab.

![img](ctbjby9wa63i1 "WireTrace")

Since 1.0, it has picked up:

  • A live plot of the numbers your board prints, under the console or in its own window. You can save the chart or its values.
  • Reconnecting on its own when a board drops off USB or resets, carrying on in the same log.
  • Colours for errors and warnings, including ESP-IDF and Zephyr logs, and a note when a board restarts.
  • Alerts when errors show up, the connection drops, or a board goes quiet.
  • Highlights the lines you're looking for, and saved commands on shortcuts.
  • Port settings like parity, stop bits, flow control, DTR and RTS.
  • Long logs that continue in a new file at a size you choose.
  • A short session report: errors, warnings, drops and restarts.
  • Light and dark themes.
  • Updates that are checked before they install, and a way back to the previous version if you don't like one.
  • A short tour you can take without a board.

It's free and open source. There's an installer for Windows and builds for Linux. On a Mac, it runs from source for now.

The Windows installer isn't signed yet, so Windows shows a warning the first time you run it. I'm working on that.

If you'd like to try it: https://github.com/TheNuanceProject/WireTrace

If it doesn't work with your board, or there's something you keep wishing it did, I'd like to hear it.

5 Upvotes

15 comments sorted by

3

u/Altruistic_Fruit2345 11d ago

Is the serial format for data and for tagging stuff documented somewhere? I couldn't see it.

3

u/shahin_hashim 11d ago

Good question... It's in the user guide inside the app (Help > User guide, or F1), but you're right, it isn't easy to find online. I'll put a copy up where everyone can read it without installing.

The short version:

Levels: ESP-IDF lines like E (1234) wifi: ..., Zephyr lines like <err> net: ... and bracketed levels like [ERROR] or [WARN] are taken as they are. Otherwise it looks for words like error, fail, warn or debug at the start of a word. The level only sets the colour, it never changes what gets logged.

Plot: with no setup it picks up JSON ({"temp": 25.1, "hum": 55}), name and value pairs (Temperature: 22.4, Humidity: 55 or temp=22.4 hum=55), or plain values separated by commas, tabs, semicolons, bars or spaces. If your board mixes messages and readings, start the reading lines with plt: and only those get plotted. A line like plt! Temperature,Humidity,Pressure names values that come without names. For anything else you can give a pattern with named groups in Configure plot.

Thanks for pointing it out.

1

u/shahin_hashim 10d ago

It is now: https://thenuanceproject.com/projects/wiretrace/formats/

Levels are under https://thenuanceproject.com/projects/wiretrace/formats/#levels (ESP-IDF, Zephyr and [LEVEL] tags are read first, then keywords), and what gets plotted is under https://thenuanceproject.com/projects/wiretrace/formats/#plot-data, with examples for Arduino, ESP-IDF, Zephyr and plain C.

Until now, it was only in the help section inside the app, so thanks for asking.

3

u/Soso12159 9d ago

Thanks, this is exactly what I've been looking for !

2

u/shahin_hashim 9d ago

Glad it's useful. If there's something you keep needing when you work with your boards and it isn't there, tell me... 🙂

2

u/Soso12159 8d ago

I was wondering if there's a way to have control over the number of plots and which var gets plotted where? I couldnt find more options other than 1 chart or by scale

1

u/shahin_hashim 8d ago

Not fully yet. In 2.2 the panels are made by scale on their own, so values of a similar size share one, up to four panels. You can't pick the panel for a value yet...

What you can do now, untick a value in the list on the left to hide it, or choose exactly which values get plotted with Configure... > Manual (regex) > Capture from sample..., where you click the numbers you want in one of your lines and name them. Pop out puts the plot in its own window.

Choosing the panels yourself makes sense though. How would you want to set it up, by dragging a value onto a panel, or by picking the panel for each value from a list?

2

u/Soso12159 7d ago

I think something like in Simulink (see photo) to select how many panels you want would be great, along with having the option to tick the variables we want for each graph would be great!

1

u/shahin_hashim 7d ago

Thanks, the Simulink picture makes it really clear. Choosing how many panels you want and then which values go in each one is a nice way to set it up...

I'm planning panel choice for an upcoming update. I'm going through how other tools handle it first, so it's quick to set up and works well whatever you all are plotting, and your example is part of that.

A lot of what's in WireTrace now came from people like you trying it and saying what was missing, so thank you for giving it a go and taking the time to write this. 🙂

2

u/Soso12159 7d ago

No problem, I really appreciate your app since I had no luck setting up the SWD plotter for STM32, and this has really saved me. Can't wait to see how it evolves!

2

u/shahin_hashim 7d ago

Good to hear it got you going on the STM32. Thanks again for the idea... 🍻

2

u/drmpf 13d ago

Your implementation has the advantage that it can handle more than one Serial at a time.

My project, pfodWeb.html, https://github.com/drmpf/pfodWeb_src, only handles one Serial, but runs in any web browser and has proxys for Windows, Linux and MacOS, if the browser does not support Serial natively. pfodWeb also supports BLE, TCP/IP and HTTP connections. CSV incoming data can be plotted, split into different plots, scaled, frozen, logged. Any CSV file can be re-opened for plotting. You can bookmark a plot with all its settings, scalings etc. for fast re-opening.

So I would suggest you add the option to reopen logged data for re-plotting.
I like your A/B cursors :-)

0

u/shahin_hashim 13d ago

Thanks for taking a look, and for sharing pfodWeb, sounds so cool. I'll have a look at it. Now that you mention it, I can see why reopening a log to plot it would help, especially after a long capture. Do you mostly reopen CSV files, or would a plain text log be useful to plot too?

Glad you liked the A/B cursors.

2

u/drmpf 12d ago

pfodWeb only plots csv data so that is the only file that is supports for re-opening.
BUT as side effect ANY csv data file can be opened for plotting not just the ones generated by pfodWeb.

Plain text is logged as raw data (intermixed with the CSV data) and you can export all of that to a log. Mainly used for debug msgs.

One other point, not sure if WireTrace supports this, but pfodWeb accepts multiple unique data streams, intermixed and separated by the number of fields in the CSV line. The chart has a drop down to select the stream (by number if fiels) to plot. The Export By Fields button exports each stream to its own CSV file for reloading.

1

u/shahin_hashim 11d ago

That's a really good point, thanks... I hadn't thought about it that way. WireTrace doesn't do separate streams yet. Right now, a tab plots one kind of line, and lines in a different shape are left out of the plot... they're still logged. Picking the stream from a list and exporting each one to its own CSV sounds really useful, so I'll look into that along with reopening CSV files... Thanks for taking the time to explain it.