How do I capture a trace information from Notecard?

Trace information is a stream of messages that can be useful when looking to understand Notecard behavior.

Blues Support often requests trace information when assisting customers with network connectivity questions.


Network Sync Trace - Easy Mode

Requires

  • USB connection to Notecard
  • Recent Chrome or Chrome-based browser

Steps:

  1. Visit In-Browser Terminal - Blues Developers

  2. Follow the connection guide here until you verify connection to Notecard

  3. Perform the trace by entering the following

sync-trace
  1. Click the Save history button in the upper right-hand corner

This will download the contents of the terminal history to a .log file


Manual Trace - Notecard Playground

Video Overview: https://www.youtube.com/watch?v=SHgK21Vi3Dk

Use this if looking to modify the verbosity of the trace log on different Notecard behaviors, especially if you need to log something other than network syncs.

Requires

  • USB connection to Notecard
  • Recent Chrome or Chrome-based browser

Steps:

  1. Visit In-Browser Terminal - Blues Developers

  2. Follow the connection guide here until you verify connection to Notecard

  3. Enable the trace with the following request

{"req":"card.trace","mode":"on"}
  1. Perform operations that you want to capture. For network connectivity related inquiries, this usually is a hub.sync request
{"req":"hub.sync"}
  1. Click the Save history button in the upper right-hand corner

This will download the contents of the terminal history to a .log file

  1. Disable the trace with
{"req":"card.trace","mode":"off"}

Manual Trace - Serial Terminal App

Use this if looking to modify the verbosity of the trace log on different Notecard behaviors, especially if you need to log something other than network syncs. Use the serial terminal app if you do not have access to the Notecard USB or the Notecard Playground.

Requires

  • USB or Auxiliary Serial (AUX RX/TX) connection to Notecard
  • Serial terminal application
  1. Connect the Notecard to your serial terminal app using one of the following serial port configurations
Connection Serial Configuration Abbreviated
USB Baud Rate : 9600, 8 bit, no parity, 1 stop bit 9600 8N1
AUX RX/TX Baud Rate: 115200, 8 bit, no parity, 1 stop bit 115200 8N1
  1. Enable the serial terminal app to log responses (if the app has this feature)

  2. Enable the trace with the following request

{"req":"card.trace","mode":"on"}
  1. Perform operations that you want to capture. For network connectivity related inquiries, this usually is a hub.sync request
{"req":"hub.sync"}
  1. Disable the trace with
{"req":"card.trace","mode":"off"}

See also:

Why isnt card.trace included in the notecard api docs?

I would think its probably one of the most important functions used in the in-browser terminal.

I always go looking for it in the in-browser (try-it) functionality and cant find it, and have to search for it, and end up here.

1 Like