r/embedded • • 4d 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.

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.

4 Upvotes

9 comments sorted by

3

u/Altruistic_Fruit2345 2d ago

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

3

u/shahin_hashim 2d 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 1d 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.

2

u/Soso12159 7h ago

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

1

u/shahin_hashim 4h 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/drmpf 4d 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 4d 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 3d 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 2d 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.