Skip to content
BinLogger

Documentation

On this page

Capture messages

Start BinLogger locally, open Capture, and select Default Channel (channel 0). Press the red Capture button. For a quick check, send this eight-byte sensor reading from your terminal.

send sensor 7 reading
Bash or Zsh
curl http://localhost:8080/api/v1/bin-messages \
-H 'Content-Type: application/json' \
-d '{"chnlNum":0,"bytes":"AQcAKgkpDOQ="}'
PowerShell
$body = '{"chnlNum":0,"bytes":"AQcAKgkpDOQ="}'
Invoke-RestMethod -Method Post -Uri http://localhost:8080/api/v1/bin-messages -ContentType 'application/json' -Body $body

Look under Active session messages (1). The first row shows 8B in LEN. Select it to see the eight bytes in Hex Viewer. The request’s bytes property carries those bytes as Base64.

Default Channel is live. Its message table contains row 0 with length 8B, the default layout, and an empty INFO column.
Row 0 is the reading you just sent. INFO is empty until you configure preview fields.

To compare two sensors later, send one more reading while capture is running. This one comes from sensor 8 and records 21.50 °C.

send sensor 8 reading
Bash or Zsh
curl http://localhost:8080/api/v1/bin-messages \
-H 'Content-Type: application/json' \
-d '{"chnlNum":0,"bytes":"AQgAKwhmDIA="}'
PowerShell
$body = '{"chnlNum":0,"bytes":"AQgAKwhmDIA="}'
Invoke-RestMethod -Method Post -Uri http://localhost:8080/api/v1/bin-messages -ContentType 'application/json' -Body $body

To keep your sample, press Pause, then Save. Name the session First capture so you can find it in Sessions.

To automate logging, choose Download public API specification in the Capture toolbar. Use its request schemas to send individual messages or batches, or generate a client for your language. Set chnlNum to the receiving channel’s number. Choose Stream for individual messages or Snapshot for batches captured at successive points in time.

Decode messages

Download the sample Kaitai Struct layout (.ksy) and drop the file onto Saved Layouts in Layouts. The layout, sample_message, defines five fields in wire order: message type, sensor ID, sequence number, temperature in hundredths of a degree Celsius, and battery voltage in millivolts. Multibyte fields use big-endian byte order.

Test the layout in Decoder

Open Decoder, paste 01 07 00 2A 09 29 0C E4 into Binary data (hex or base64), choose Use Layout and select sample_message. Press Decode. Compare Decoded Struct with the result below. Sensor 7 sent message type 1, sequence 42. Its temperature reading is 2345 (23.45 °C) and its battery voltage is 3300 mV.

Decoded Struct shows temperature_centi_c as 2345 on a teal background. The other fields show message type 1, sensor 7, sequence 42, and battery voltage 3300.
The sample layout gives temperature_centi_c a teal background. Its bit range appears above the value.

Apply the layout to a session or channel

In Sessions, open First capture and choose Edit. Set its decoding configuration to Use Layout, select sample_message, and save. Select row 0 to inspect the first reading.

Decoding configuration in Edit Session with Use Layout selected and sample_message in the layout selector.
Save this selection to decode both readings with sample_message.

For future recordings, edit the channel in Capture and select the layout before recording. If messages on one channel use several formats, create a strategy under Strategies and select it as the decoding configuration. Each rule set associates a condition, such as a message type, with a layout. The first matching rule set chooses the layout.

Show preview fields in the message list

Preview fields show decoded values in the INFO column so you can scan messages without opening each one.

  1. Open Layouts, select sample_message, and expand message_type in Display Settings.
  2. Under Preview settings, choose Add. BinLogger enables the preview. Change Prefix from Inherit to Set and enter type=.
  3. Repeat for sensor_id with the prefix sensor=, and for temperature_centi_c with temp=. Choose Save, then reopen First capture in Sessions.
Render settings for temperature_centi_c show a dark teal text swatch and a light teal background swatch.
The sample layout sets the temperature field’s colours.
Preview settings have Enabled checked, Prefix set to temp=, and both colours set to Inherit.
Leave the preview colours on Inherit to carry the teal background into INFO.
The saved message table shows type=1, sensor=7, temp=2345 on row 0 and type=1, sensor=8, temp=2150 on row 1.
Compare the two readings directly in INFO. Row 0 is still eight bytes long and now shows sensor 7 at 23.45 °C. Row 1 shows sensor 8 at 21.50 °C.

Use Render settings to change how a field appears in message details, including its print format and colours. Preview fields inherit colours, shape, prefix, and suffix unless you override them.

Open a session

Choose a recording under Sessions → Saved Sessions. To open a file, choose Import session, select a BinLogger CSV or a text file with one message per hex block separated by blank lines, confirm the name, and choose Import.

Inspect fields and bytes

In First capture, select row 0 and switch Decoded Struct to Tree. Hover over temperature_centi_c. Its bit range, 32–47, corresponds to bytes 4 and 5 in Hex Viewer. Read in big-endian order, 09 29 is the integer 2345.

The field tree shows temperature_centi_c as a signed two-byte integer with value 2345. Hex Viewer highlights 09 29 at offsets 4 and 5.
The next two bytes, 0C E4, belong to battery_mv and decode to 3300.

Filter and highlight

In First capture, enter _root.temperature_centi_c >= 2300 in Filter and press Enter. This finds readings at or above 23 °C. Only sensor 7 matches. If the field is missing from the suggestions just after you assign the layout, wait for the session’s Precalculate fields job to finish.

Select Highlight to mark matches while keeping surrounding rows visible. Clear the expression and press Enter to show all messages again.

Filtered 1/2. Row 0 with temp=2345 is marked and row 1 with temp=2150 is dimmed.
With Highlight enabled, both readings stay visible. The yellow bar marks sensor 7, the only reading above the threshold.