EMBEDOSTOOLS TOOLSEM·LINKDOCS

EM·LINK

Universal Device Terminal - a single HTML file that talks to devices over USB serial or WiFi (WebSocket or MQTT over WebSocket), decodes industrial protocols and plots telemetry. The engineering calculators run on their own pages at tools.embedos.io; ALL TOOLS in the EM·LINK header opens them in a new tab.

No install. No account. No server. Nothing you connect to, capture or calculate leaves your machine.

EM·LINK with the simulator running on the Ocean theme
EM·LINK with the simulator running on the Ocean theme


Quick start#

  1. Open EM·LINK in a modern browser. For USB serial use desktop Chrome or Edge, which provide

the Web Serial API; WebSocket, MQTT and the simulator work in any modern browser.

  1. Pick a transport in the sidebar.
  2. Press CONNECT.

No hardware to hand? Choose SIMULATOR and connect. It streams synthetic telemetry, ANSI-coloured log lines, GNSS sentences, Modbus RTU frames and J1939 CAN frames, so every feature can be explored with nothing plugged in.

If you see a red banner#

USB serial uses the Web Serial API, which needs a secure context and a desktop Chromium-based browser (Chrome or Edge). Opening the file directly with file:// works in some browser builds and not others. If the banner appears in Chrome or Edge, serve the file over local HTTP instead:

python3 -m http.server 8000

localhost counts as secure, so everything works from there. On phones, Safari and Firefox the banner says USB serial is not available there and the USB SERIAL option is greyed out; WebSocket, MQTT and the simulator still work.

Browser support#

FeatureDesktop Chrome / EdgeSafari, Firefox, phones
USB Serialyesnot available
WebSocket · MQTTyesyes
Plotter · decoders · filesyesyes

USB serial needs the Web Serial API, which not every browser family implements. Everything else - the decoders, the plotter, the file store - works in any modern browser.

Themes#

Three: Ocean (navy + blue), Signal (near-black + orange), and Field (light, for projectors and well-lit rooms). Pick one from the theme icons on the right edge of EM·LINK; on a phone they are in the ⋯ menu. The choice persists across visits.

Signal theme - heads-down debugging
Signal theme - heads-down debugging

Field theme - for projectors or bright control rooms
Field theme - for projectors or bright control rooms


Transports#

Three links and a simulator, one interface. Everything downstream - terminal, plotter, decoders, logging, file transfer - behaves identically no matter which you pick.

USB Serial#

Uses the Web Serial API. Click CONNECT and the browser shows its own port picker; the page never sees ports you have not explicitly granted.

Granted ports appear in PREVIOUSLY GRANTED on later visits, so you can reconnect without the picker. ⟳ REFRESH PORTS re-reads that list.

Auto-baud detection#

Select ◈ AUTO DETECT. The scan opens each rate from fastest to slowest, listens for about 1.1 s, and prints what it found:

AUTO-DETECT: scanning 17 rates for "BOOTING"…
   1500000 → 0 B, printable 0%
    921600 → 43 B, printable 12%
    115200 → 512 B, printable 99%
AUTO-DETECT: matched "BOOTING" at 115200.

Give it a search word of six characters or more taken from your boot banner and it stops on the first exact match. Leave the word blank and it falls back to picking the rate with the highest proportion of printable bytes. The full scan table is printed either way, so you can judge the result rather than trust it.

WebSocket#

Point it at a device running a WebSocket server. A few lines of firmware get you a bidirectional link with no relay and no cloud.

Binary and text frames are both accepted and handed to the terminal as bytes.

Mixed content: a page served over https:// may only open wss://. If you serve EM·LINK over HTTPS and your device speaks plain ws://, the browser blocks it. Open EM·LINK over http://localhost instead, or terminate TLS at the device.

MQTT over WebSocket#

Subscribes to a topic and prints each message as a line; transmitting publishes to a second topic.

The broker must expose a WebSocket listener - the plain 1883 TCP port will not work from a browser. A typical broker configuration:

listener 9001
protocol websockets

PREFIX LINES WITH TOPIC puts [embedos/plant1/telemetry] in front of each message, which matters when a wildcard subscription is pulling from many devices at once.

The MQTT client library is fetched from a CDN on first use, so this transport needs internet access even when the broker is local.

Simulator#

Generates a synthetic device: boot messages with ANSI colour, four telemetry channels, periodic WARN and ERROR lines, checksum-valid GNSS sentences, CRC-valid Modbus RTU frames and J1939 CAN frames. Transmitted commands are echoed back with ACK.


Terminal#

Display formats#

Switching format changes only the display. Line counting, plotting and every decoder keep running on the byte stream underneath, so nothing is lost by looking at hex for a while.

ANSI / VT100#

With ANSI / VT100 COLOUR on, the terminal handles:

than scrolling off the screen

Turn ANSI off to see the raw escape sequences, which is the faster way to debug firmware that is emitting them incorrectly.

UTF-8#

UTF-8 DECODE uses a streaming decoder that keeps multi-byte sequences intact across chunk boundaries - without it, a → arriving split across two reads renders as â. Turn it off for strictly binary or latin-1 protocols.

Raw keyboard mode#

RAW KEYBOARD (INTERACTIVE) sends keystrokes straight down the link instead of using the transmit box. This is what makes interactive serial consoles (a bootloader prompt, a Linux login shell, an AT command shell) usable:

KeySends
Ctrl+A … Ctrl+Z0x01 … 0x1A, so ^C, ^D, ^Z all work
ArrowsESC[A ESC[B ESC[C ESC[D
Home / EndESC[H / ESC[F
Delete / PgUp / PgDnESC[3~ / ESC[5~ / ESC[6~
Tab / Escape0x09 / 0x1B
Backspace^? (127) or ^H (8) - configurable

Pasting sends the clipboard contents down the link. Click into the terminal first so the transmit box does not have focus.

BACKSPACE SENDS exists because the two conventions are genuinely split: most Unix-like systems expect ^?, while many embedded monitors and older systems expect ^H. If backspace prints ^H or deletes the wrong character, switch it.

Other terminal options#

Transmit#

Type into the transmit box and press Enter. ↑ / ↓ walk command history.

TX LINE ENDING appends LF, CR, CRLF or nothing. AT-command modems generally want CR; Unix shells want LF; many industrial devices want CRLF.

MACROS are four editable command buttons, saved in the browser.


Plotter#

Any line containing KEY: value or KEY = value becomes a plot channel automatically:

TEMP0: 24.5
PRESSURE = 3.412
RPM: 1670

The plotter with two viewports, one per group of channels
The plotter with two viewports, one per group of channels

GRAPH opens the plot area; + VIEWPORT adds another. Each viewport has:

When to use NORM#

A shared Y axis is useless the moment magnitudes differ. Plot TEMP: 24 next to heap=27811 and the temperature is a flat line at the bottom. NORM maps each channel onto its own range so you can compare shape - when things move together, which leads which - rather than absolute value. Turn it off to read real numbers.


Decoders#

GNSS / NMEA#

Parses RMC, GGA, GSA, GSV, GLL, VTG and TXT with checksum validation. Invalid sentences are dropped silently rather than corrupting the fix.

GPS POPUP opens a draggable panel with a live map and track trail, position, altitude, speed, fix type, satellite count, HDOP, UTC, a course-over-ground compass and per-satellite SNR bars. ⧉ copies the coordinates.

The map uses OpenStreetMap tiles. With no internet it falls back to a self-drawn track plot with a scale grid, so the trail is still visible offline.

Modbus RTU and CAN / J1939 have their own sections: Modbus and CAN bus and J1939.


Modbus#

EM·LINK decodes Modbus RTU, the binary framing defined in the Modbus over Serial Line Specification and Implementation Guide (V1.02). Function codes and exception codes follow the Modbus Application Protocol Specification (V1.1b3). Tick MODBUS RTU under DECODERS in the settings panel, connect, and open the MODBUS tab.

EM·LINK is a monitor: it listens and decodes, it does not poll. Put it on a bus that already has a master (a PLC, SCADA or a Modbus master tool), or on the serial port of a device that is talking RTU. Every frame both ways is decoded, so you see the request and the reply.

The Modbus RTU decoder pulling frames out of a live stream
The Modbus RTU decoder pulling frames out of a live stream

Modbus RTU, ASCII and TCP#

VariantFramingCheckDecoded by EM·LINK
RTUbinary, frames separated by a silent gap of at least 3.5 character timesCRC-16yes
ASCIItext: : start, two hex characters per byte, CR LF endLRCno, but readable in the terminal
TCP7-byte MBAP header (transaction, protocol, length, unit id), port 502none, TCP does itno

A web page cannot open a plain TCP connection, so EM·LINK cannot reach a Modbus TCP device directly. If a gateway forwards the RTU bytes over a WebSocket, connect with WebSocket and the decoder works as on a serial port. To check an ASCII frame's LRC by hand, use the CRC and checksum calculator.

Wiring a USB to RS-485 adapter#

Most Modbus RTU runs on RS-485 two-wire. A USB to RS-485 adapter appears as a serial port, and EM·LINK opens it like any other.

consistent between vendors: TIA-485 calls the inverting line A, many devices print it the other way round. The Modbus serial line spec avoids the letters and uses D0 and D1, with D1 positive in the idle state. If nothing decodes, swap the two wires. It does no harm.

(signal ground). A missing common is the classic cause of a link that works on the bench and fails on site.

tap into the middle of a bus, do not add a third terminator; keep your stub short.

450 to 650 Ω) so the idle line reads as a defined 1. Many adapters have switchable bias and termination; turn them on only if the bus has none.

The RS-485 termination and bias calculator works out the resistor values for your bus.

Serial settings#

Set these under PORT before you press CONNECT. They must match the bus exactly.

SettingTypical valueNotes
Baud9600 or 19200the spec makes 19200 the default; 9600 is the other required rate
Data bits8RTU always uses 8 data bits
Parityeventhe spec default
Stop bits1use 2 stop bits when parity is none (the spec requires it, many devices ignore it)

So the spec default is 19200 8E1. In the field you will meet 9600 8N1 just as often. AUTO DETECT does not help here, because RTU is binary and has no readable banner to lock onto.

Reading the decoder table#

Each row is one frame, newest at the top. The table keeps the last 600 frames.

ColumnMeaning
TIMEwhen the frame completed
SLAVEunit address, 1 to 247 (0 is broadcast)
FNfunction code in hex
FUNCTIONfunction name; a ⚠ marks an exception response
DECODEDthe fields: start address and quantity for a request, values for a response
CRCOK when the CRC-16 matches, BAD when it does not
RAWevery byte of the frame, CRC included

Addresses are shown as they travel on the wire, starting at 0. A device manual that says "holding register 40001" means address 0 for function 3; 40011 is address 10.

A worked example, a master reading two holding registers from unit 1:

01 03 00 00 00 02 C4 0B    request: unit 1, fn 3, start 0, qty 2, CRC C4 0B
01 03 04 40 48 F5 C3 68 E4 response: unit 1, fn 3, 4 bytes, 0x4048 0xF5C3, CRC 68 E4

EM·LINK shows the response as 4 bytes → 16456, 62915. Those two registers are the float 3.14 in ABCD word order; paste them into the Modbus register interpreter to see every word order side by side.

Function codes#

CodeHexFunctionDECODED shows
101Read Coilsstart, qty / bits
202Read Discrete Inputsstart, qty / bits
303Read Holding Registersstart, qty / register values
404Read Input Registersstart, qty / register values
505Write Single Coilcoil and ON or OFF (FF00 or 0000)
606Write Single Registerregister and value
707Read Exception Statusraw bytes
808Diagnosticssub-function and data
110BGet Comm Event Counterraw bytes
120CGet Comm Event Lograw bytes
150FWrite Multiple Coilsstart, qty, byte count
1610Write Multiple Registersstart, qty, byte count
1711Report Server ID (Report Slave ID)raw bytes
2014Read File Recordraw bytes
2115Write File Recordraw bytes
2216Mask Write Registerregister, AND mask, OR mask
2317Read/Write Multiple Registersread start/qty, write start/qty
432BRead Device Identificationraw bytes

Bit values from functions 1 and 2 are printed least significant bit first, the order the spec packs them in, so the first digit is the first coil requested.

Exception codes#

A server that cannot carry out a request replies with the function code plus 0x80 and one exception code. Unit 1 refusing a read of a register it does not have looks like 01 83 02 C0 F1, which EM·LINK shows as EXCEPTION 2 - ILLEGAL DATA ADDRESS.

CodeNameUsual cause
1Illegal Functionthe device does not support that function code
2Illegal Data Addressaddress or address + quantity is outside the device's map (check the 40001 offset)
3Illegal Data Valuea value or quantity the device will not accept, for example too many registers in one read
4Server Device Failurethe device hit an error while acting on the request
5Acknowledgeaccepted, still working on a long operation
6Server Device Busybusy, retry later
8Memory Parity Errorfile record access failed the memory check
10Gateway Path Unavailablea gateway has no route to the target
11Gateway Target Device Failed to Responda gateway got no answer from the target

How the decoder finds frames#

RTU has no start delimiter. Frames are separated only by an idle gap of at least 3.5 character times, which is why naive decoders produce garbage on a busy or mixed line. A USB adapter also delivers bytes in chunks (FTDI chips buffer for up to 16 ms by default), so the gaps the browser sees are not the gaps on the wire.

So this decoder does what a protocol analyser does:

  1. For each position in the buffer, work out which ADU lengths the function code permits - a

read-holding-registers request is 8 bytes, its response is 3 + byte_count + 2, an exception is 5.

  1. Test CRC-16 on each candidate length.
  2. On a match, emit the frame and jump past it. On no match, slide one byte and try again.

The result resyncs on a noisy bus and pulls valid frames out of a stream that also carries ASCII logging. Frames whose CRC fails are only reported if they at least look like an ADU - a valid slave address and a known function code - so random text does not fill the table.

MODBUS FRAME GAP is the idle time after which leftover bytes that did not pass the CRC are flushed, and shown as BAD if they look like a frame. Good frames are found by their CRC as soon as they complete, so a larger gap is harmless. Six milliseconds suits 19200 baud and above. At 9600 and below, or with an adapter that delivers bytes in bursts, use 20 ms; at 1200 to 4800 baud, 50 ms.

Troubleshooting Modbus#

RX counter does not move. No bytes are arriving: wrong port, adapter not on the bus, or a broken pair. Check the wiring first.

RX moves but the table stays empty. The bytes are not valid RTU. In order of likelihood: wrong baud or parity, A and B swapped, the bus is Modbus ASCII (switch to ASCII display: ASCII frames start with : and are readable), or it is not Modbus at all. Switch the display to HEX and look at the raw bytes.

Many BAD rows. Wrong parity or stop bits, missing termination or bias, no common, or noise. A single BAD row when you first connect is normal: you joined the bus in the middle of a frame.

BAD rows that look like half of a real frame. The frame gap is too short for the baud rate or the adapter. Raise MODBUS FRAME GAP.

Mixed traffic. Debug text and RTU frames on the same port are fine; the decoder skips anything that does not pass the CRC. Keep the display in HEX if the text view gets noisy.

Only requests, no responses. The device is not answering: wrong unit address, wrong serial settings on the device, or it is not powered. An exception response means it is answering, but not liking the request.


CAN bus and J1939#

EM·LINK decodes CAN frames that arrive as text, one frame per line. It shows each identifier and, for 29-bit identifiers, the SAE J1939 parameter group number (PGN) and source address. CAN itself is defined in ISO 11898 (ISO 11898-1 for the frame format, ISO 11898-2 for the high-speed physical layer). Tick CAN / J1939 under DECODERS, connect, and open the CAN / J1939 tab.

Set CAN INPUT FORMAT to AUTO-DETECT, or force one format:

t1238001122334455667788          SLCAN, 11-bit: t + 3 hex id + length + data
T0CF004008F07D7D1027000000       SLCAN, 29-bit: T + 8 hex id + length + data
  can0  18FEE500   [8]  10 27 00 00 50 C3 00 00
(1707.123) can0 0CF00400#F07D7D1027000000

timestamp after the data, which some adapters add, is ignored.

candump -L writes to log files.

EM·LINK shows identifiers, PGNs, source addresses and raw data bytes. It does not load signal definition files, so scaling a signal out of the data is up to you (see the worked example below).

USB to CAN adapter with SLCAN firmware. Many low-cost adapters (CANable with slcan firmware, Lawicel CANUSB, USBtin and similar) appear as a serial port and speak SLCAN. Choose USB SERIAL, connect to the port, then open the CAN channel from the transmit box:

  1. Set TX LINE ENDING to CR. SLCAN commands end with a carriage return.
  2. Send the bit rate command: S5 for 250 kbit/s (classic J1939), S6 for 500 kbit/s (newer J1939

and most passenger-car buses), S8 for 1 Mbit/s.

  1. Send O to open the channel. Frames start to arrive as t... and T... lines.
  2. Send C to close the channel when you are done.

Many adapters also accept L instead of O to open in listen-only mode, the safe choice on a live machine or vehicle. Check your adapter's manual. For adapters that are USB CDC devices the baud setting does not matter; for adapters with an FTDI chip, use the rate in their manual.

Gateway over WebSocket or MQTT. A Linux box or a Raspberry Pi with a SocketCAN interface can forward candump text:

websocketd --port=8080 candump -L can0          serve each line over WebSocket
candump -L can0 | mosquitto_pub -t plant/can0 -l   publish each line over MQTT

Then connect EM·LINK with WebSocket (ws://<gateway>:8080/) or MQTT (subscribe to plant/can0). With MQTT and SLCAN text, turn off PREFIX LINES WITH TOPIC, because SLCAN lines must start with t or T; candump lines decode either way.

Simulator. The SIMULATOR transport sends J1939 frames, so you can try the decoder with nothing plugged in.

11-bit and 29-bit identifiers#

ISO 11898-1 defines two identifier lengths:

FormatIdentifierRangeTypical use
Base frame (CAN 2.0A)11-bit0x000 to 0x7FFCANopen, many OEM buses
Extended frame (CAN 2.0B)29-bitup to 0x1FFFFFFFSAE J1939, NMEA 2000, ISOBUS

EM·LINK treats a frame as 29-bit when the input says so (T in SLCAN, an 8-digit identifier in candump) or when the identifier is above 0x7FF. The ID column shows 3 hex digits for 11-bit frames and 8 for 29-bit frames. PGN and SA are decoded for 29-bit frames only and show - otherwise.

J1939 PGN and source address#

SAE J1939-21 splits the 29-bit identifier into fields:

BitsFieldMeaning
28-26Priority0 is highest, 7 lowest
25EDPextended data page, 0 in J1939
24DPdata page
23-16PFPDU format
15-8PSPDU specific: destination address if PF < 240, group extension if PF ≥ 240
7-0SAsource address of the sender

If PF is below 240 (PDU1, addressed to one node) the PGN is DP, PF and 00, and PS is the destination address. If PF is 240 or more (PDU2, broadcast) the PGN is DP, PF and PS.

Worked example: 0CF00400#F07D7D1027000000

  1. Identifier 0x0CF00400 in binary: 011 0 0 11110000 00000100 00000000.
  2. Priority = 3, EDP = 0, DP = 0, PF = 0xF0 (240), PS = 0x04, SA = 0x00.
  3. PF is 240 or more, so this is PDU2 and PS is part of the PGN: PGN = 0x0F004 = 61444, which

SAE J1939-71 defines as EEC1, Electronic Engine Controller 1.

  1. SA 0 is the engine. EM·LINK shows PGN 61444 / 0xF004 and SA 0.
  2. Engine speed (SPN 190) is data bytes 4 and 5, least significant byte first, 0.125 rpm per bit:

bytes 10 27 give 0x2710 = 10000, so 10000 × 0.125 = 1250 rpm.

A PDU1 example: 18EA00F9 has PF = 0xEA (234), below 240, so PS = 0x00 is the destination and the PGN is 0xEA00 = 59904, the Request PGN, sent by SA 0xF9 (249, an off-board service tool) to the engine.

Group by ID and CSV export#

GROUP BY ID collapses the table to one row per identifier, sorted by identifier, with a COUNT of frames seen and the latest data. This is how you read a live bus: steady rows are periodic messages, a changing data column is a live signal. Click it again to switch to CHRONOLOGICAL, newest first, which is the view for one-off events and request and response pairs.

The CSV export button in the CAN tab (or EXPORT, then CAN FRAMES) saves the most recent 800 frames with the columns time, id_hex, extended, pgn, source_address, dlc, data_hex. CLEAR empties the table and the counters.

Troubleshooting CAN#

Nothing in the terminal at all. The adapter channel is not open. Send the bit rate command and O with CR line ending, as above.

Lines arrive but the CAN table is empty. Check the decoder is ticked, set CAN INPUT FORMAT to AUTO-DETECT, and look at the lines: they must be SLCAN or candump text. With MQTT, turn off the topic prefix for SLCAN.

The adapter does not appear in the port picker. It is not a serial device. Adapters with candleLight or gs_usb firmware, PCAN and Kvaser interfaces use their own drivers. Use them through a SocketCAN gateway instead.

Adapter reports errors, or frames stop after a moment. Wrong bus bit rate, or missing termination. A high-speed CAN bus (ISO 11898-2) needs 120 Ω at each end; with the power off you should measure about 60 Ω between CAN_H and CAN_L.

PGNs look wrong. The frames are 11-bit, or the identifier was cut short. J1939 needs the full 29-bit identifier.


Files#

The FILES tab is a small file store for things you send to a device or capture from one.

What is stored where#

DataWhere it lives
Files in the file storeIndexedDB in this browser, for tools.embedos.io only
Sessions, macros, theme, settingslocalStorage in this browser
Terminal scrollback, decoded frames, plot datamemory, gone when you close the tab

Nothing is uploaded. The store belongs to this browser profile on this computer: another browser or another computer has its own, and a private window loses it when it closes.

The store holds 10 files and 10 MB in total. When it is full, EM·LINK says Limit reached in this version (10 files, 10 MB in the file store); delete a file to make room.

Adding and opening files#

DELETE removes the file.

to .bin and save it straight into this store (same browser), ready to send.

Sending a file#

SEND on a file's row, or ▶ SEND FILE OVER LINK, streams the file down the open link exactly as stored: 512-byte chunks with a short pause between them, no protocol, nothing added. Use it for configuration files, scripts pasted into a device shell, or a fixed binary command. Connect first. The progress bar runs along the bottom edge.

There is no flow control or error check in a plain send. For firmware, or anything that must arrive intact, use XMODEM.

XMODEM#

EM·LINK implements XMODEM in both directions.

Sending a file to a device:

  1. Connect to the device at the baud rate its bootloader or shell uses.
  2. Start the receiver on the device first: rx firmware.bin on Linux, loadx in U-Boot, or your

bootloader's command.

  1. In FILES, click ◈ XMODEM SEND and pick the file, or click XMODEM on the file's row.
  2. EM·LINK waits for the receiver's handshake. A C selects CRC-16 mode, a NAK selects the

simple checksum.

  1. It sends 128-byte blocks, resends any block the receiver rejects, and sends EOT at the end. The

terminal reports each step.

XMODEM has no length field, so the last block is padded with 0x1A bytes; most bootloaders expect this. If nothing happens after step 3, the receiver is not running. Press DISCONNECT to cancel.

Receiving a file from a device:

  1. Connect.
  2. In FILES, click ◈ XMODEM RECEIVE and give the file a name.
  3. Start the sender on the device, for example sx log.bin.
  4. EM·LINK sends C every three seconds until the first block arrives. It accepts 128-byte and

1024-byte (XMODEM-1K) blocks, checks each CRC-16, acknowledges good blocks and asks again for bad ones.

  1. On EOT the file is saved to the store.

Receiving uses CRC-16 mode only, so the sender must support it (almost all do). The saved file includes the sender's padding at the end of the last block.

Capturing session logs#

AUTO-CAPTURE TO FILE STORE (under LOGGING) saves the session log as session_<date-time>.txt each time the link closes. ▼ SAVE LOG TO FILE STORE saves it now. SESSION LOG MODE decides what the log holds: all output, printable characters only, a raw hex dump, or nothing.

What goes into an export#

Every export starts with a line saying where it came from, so a file found later can be traced:

Exported from tools.embedos.io
# EM·LINK session log - 2026-10-10T14:02:11.512Z
# link: USB SERIAL · 115200 8N1
# RX 18234 B · TX 112 B · 402 lines · 3 warn · 0 err · 88 frames
# log mode: all

The CSV exports (plot data, Modbus frames, CAN frames) start with # Exported from tools.embedos.io and then the column header row. In a spreadsheet, skip the first row on import. In pandas, use pd.read_csv(path, comment="#").

Clearing data#

CLEAR in the MODBUS and CAN tabs empties those tables.

tools.embedos.io in your browser's settings.


Logging and export#

Log modes#

ModeCaptures
All session outputevery line, as displayed
Printable output onlystrips control characters
Raw hex dumpoffset, hex bytes, ASCII gutter
Nonenothing

AUTO-CAPTURE TO FILE STORE saves the log automatically when the link closes.

Exports#

EXPORT or Ctrl+S:

FormatContents
.txtsession log with a header of link details and counters
plot .csvwide table, one column per channel, forward-filled to a shared time axis
Modbus .csvevery decoded frame with CRC status and raw bytes
CAN .csvevery frame with ID, PGN, source address, DLC and data bytes

The plot CSV is deliberately a wide table - one row per timestamp, one column per channel, values forward-filled. That form drops straight into a spreadsheet or data-frame library without reshaping.


Sessions#

A named session profile stores every transport setting, decoder toggle, terminal option, theme and macro. SAVE AS creates one, LOAD restores it, ⚙ MANAGE SESSIONS lists, overwrites, deletes, exports and imports them.

Export produces a JSON file you can commit to a repo or hand to a colleague, so a whole team can share the exact settings for a given rig.

Passwords are not stored in session profiles.

Keyboard shortcuts#

ShortcutAction
Ctrl+Sexport session log
Ctrl+Lclear terminal
Ctrl+ + / Ctrl+ -font size
↑ / ↓command history in the transmit box

In raw keyboard mode Ctrl combinations go to the device instead, as they should.


Limits in this version#

ItemLimit
Saved sessions3
File store10 files, 10 MB in total
Plot viewports2
Plot channels8 at once
Plot history15 minutes
Scrollback20 000 lines

When you reach a limit, EM·LINK says which one, for example Limit reached in this version (3 saved sessions).


Tool methods and derivations#

The 17 calculators run on their own pages at tools.embedos.io. Every number is traceable to a published standard, and this section shows the derivation for each. The formula on the tool page is the one-liner; this is where the piecewise ranges, ancillary equations, and verified reference points live.

Number & Bit Inspector#

Bit-level view of any 8/16/32/64-bit value. Bases, IEEE-754 field breakdown, click-to-toggle bits, endian swap.

IEEE-754 float decomposition. A float bit pattern splits into sign, exponent and mantissa:

value = (-1)^s · (1 + m / 2^n_m) · 2^(e - bias)

For 32-bit floats: sign = bit 31, exponent = bits 30…23 (bias 127), mantissa = bits 22…0. For 64-bit: sign = bit 63, exponent = bits 62…52 (bias 1023), mantissa = bits 51…0.

Two's-complement signed interpretation flips the top bit's weight from positive to negative, so an N-bit value is:

signed = unsigned - 2^N   if the MSB is set, else unsigned

CRC & Checksum Suite#

13 preset polynomials plus a custom-poly mode. All match the published check values of the CRC catalogue for the standard test string 123456789.

General polynomial CRC. For a width-w CRC with polynomial p, initial value init, input reflection rin, output reflection rout, and final XOR xor:

crc = init
for each byte b:
    if rin: b = reflect(b, 8)
    crc = crc XOR (b << (w - 8))
    repeat 8 times:
        if MSB of crc set: crc = (crc << 1) XOR p
        else:              crc = (crc << 1)
    crc = crc AND ((1 << w) - 1)
if rout: crc = reflect(crc, w)
crc = crc XOR xor

Verified reference points - CRC of ASCII 123456789:

PresetExpected
CRC-16/MODBUS0x4B37
CRC-16/CCITT-FALSE0x29B1
CRC-16/XMODEM0x31C3
CRC-32 (zlib)0xCBF43926

Also computes the simpler checksums used in the same protocols: XOR-8 (as in the GNSS-sentence checksum), SUM-8, LRC (as in the Modbus-ASCII trailer), Fletcher-16.

Modbus Register Interpreter#

The word-order problem, solved. Modbus transports 16-bit registers, but 32-bit floats and integers have four possible byte arrangements depending on how the device firmware packed them. The tool shows all four side by side, so the correct one is immediately obvious.

The four orderings. Given two consecutive 16-bit registers R0 (bytes A B) and R1 (bytes C D):

OrderByte layout in memoryCommon name
ABCDA B C Dbig-endian, standard IEEE-754 network order
CDABC D A Bword-swapped
BADCB A D Cbyte-swapped
DCBAD C B Afully reversed, little-endian

The float is then decoded per IEEE-754 from those four bytes. If the reading is 1e-40 or 1e38, the word order is wrong - try CDAB, which is the most common mismatch.

Also decodes as int16, int32 both orderings, uint32 both orderings, and treats each register byte as ASCII.

Fixed-Point Q Converter#

Convert real values to and from Qm.n fixed-point integers.

Conversion. A Qm.n value has m integer bits and n fraction bits (plus a sign bit if signed):

raw        = round(x · 2^n)
back       = raw · 2^-n
resolution = 2^-n
range signed:   -2^m … 2^m - 2^-n
range unsigned: 0    … 2^(m+1) - 2^-n

If raw exceeds the range, the value saturates and quantisation error grows unboundedly - the tool flags this as SATURATED.

Example. Q15 (0 int, 15 fraction, signed, 16 bits total) is the most common DSP format for audio and control loops. 0.75 in Q15 is round(0.75 · 32768) = 24576 = 0x6000. Multiplying two Qm.n values gives Q2m.2n; shift right by n to get back to Qm.n.

C Struct Layout & Padding#

Paste a struct definition, get real byte offsets and inserted padding. Also reports the byte savings from reordering members widest-first.

Alignment rules. Each member aligns to its own natural size:

offset(m_i) = smallest offset ≥ sum(size(m_j) + pad_j) for j < i
              such that offset(m_i) mod align(m_i) = 0

The struct itself aligns to its widest member, so trailing padding may be added at the end to make the struct size a multiple of that alignment. This is why an array of the struct works correctly - each element's members land on their natural alignment.

Target ABI. 32-bit ARM: long and pointers are 4 bytes, aligned to 4. 64-bit x86-64 or AArch64: long and pointers are 8 bytes, aligned to 8.

Common example. A struct of uint8, uint32, uint8, float, uint16 on 32-bit ARM ends up 20 bytes with 8 bytes of padding. Reordering widest-first (uint32, float, uint16, uint8, uint8) gives 12 bytes with 0 padding. On a 1000-record log buffer that's 8 kB of RAM saved.

Intel HEX / SREC Inspector#

Parses Intel HEX and Motorola S-record firmware files. Validates every record's checksum, maps the contiguous segments, computes the image CRC-32, and converts to raw .bin with 0xFF gap fill (matching erased flash).

Intel HEX record structure. Each line is :LLAAAATTDD…DDCC where LL is data length, AAAA is the 16-bit address, TT is the record type (00 data, 01 EOF, 02 extended segment, 04 extended linear, 05 start linear), and CC is the two's-complement of the sum of every preceding byte. The checksum passes when the sum of all bytes on the line (including CC) mod 256 equals zero.

S-record checksum is the one's complement of the sum of the length, address and data bytes. Passes when the sum of all bytes mod 256 equals 0xFF.

Extended addressing. Record type 02 shifts the base address by 16; type 04 sets the upper 16 bits of a 32-bit address. Both are tracked so a firmware image that crosses a 64 KB boundary decodes to the correct absolute addresses.

MQTT Topic Matcher#

Test wildcard subscription filters against a list of topics before deploying to a fleet.

Match rules. Split filter and topic on /. Compare level-by-level:

The $ prefix on system topics is treated specially by most brokers - wildcards do not cross it. # alone subscribes to everything, which should never be used in production.

4–20 mA / 0–10 V Loop Scaling#

Full analogue-front-end arithmetic: sense-resistor voltage, ADC counts, engineering units, resolution per count, and wire-break detection.

Current-to-voltage. For a current loop with sense resistor R:

V      = I · R
counts = (V / V_ref) · (2^N - 1)
EU     = EU_min + ((I - I_min) / (I_max - I_min)) · (EU_max - EU_min)

Wire-break detection per NAMUR NE 43. For a 4-20 mA loop:

Sizing the sense resistor. For a 3.3 V ADC reference, a 165 Ω sense resistor makes 20 mA land exactly at V_ref (using the full ADC span cleanly). The traditional 250 Ω is intended for a 5 V system, where 20 mA gives 5 V; on a 3.3 V ADC that clips.

NTC Thermistor#

Resistance-to-temperature both directions, with divider counts and self-heating.

Beta model - two-point fit, reasonable across a narrow range around the reference point:

1/T = 1/T_0 + (1/B) · ln(R / R_0)

where T, T_0 are in kelvin

Steinhart-Hart - three-term fit, accurate over much wider ranges:

1/T = A + B · ln(R) + C · (ln(R))^3

To solve for R at a given T, iterate the cubic numerically (the tool uses a bisection over ln(R)). Beta drifts several degrees at the ends of a wide temperature range; use Steinhart-Hart beyond about −20…+80 °C.

Divider output. With the NTC on the low side, series resistor R_s to V_ref, ADC on the NTC:

V_out  = V_ref · R / (R + R_s)
counts = (V_out / V_ref) · (2^N - 1)

Self-heating. Current through the NTC dissipates power that raises its own temperature and biases the reading. Typical dissipation coefficient is ~1 mW/°C in still air, so a 3.3 V divider across 10 kΩ dissipating ~0.3 mW adds ~0.3 °C to the reading. Keep it under 1 mW for laboratory work.

RTD PT100 / PT1000#

Callendar-Van Dusen both directions, including the sub-zero cubic term that linear approximations get wrong.

Callendar-Van Dusen equation per the International Electrotechnical Commission's temperature-sensor standard (IEC 60751):

T ≥ 0 °C:  R = R_0 · (1 + A·T + B·T^2)
T < 0 °C:  R = R_0 · (1 + A·T + B·T^2 + C·T^3·(T - 100))

where R_0 = 100 Ω for PT100, 1000 Ω for PT1000
      A =  3.9083 × 10^-3
      B = -5.775  × 10^-7
      C = -4.183  × 10^-12

Inverse. Above 0 °C, the quadratic has a closed-form solution:

T = (-R_0·A + sqrt(R_0^2·A^2 - 4·R_0·B·(R_0 - R))) / (2·R_0·B)

Below 0 °C, the cubic term prevents a closed form; the tool uses the quadratic as a seed and refines with Newton's method to convergence.

Verified reference points per IEC 60751:

TemperaturePT100 resistance
−200 °C18.5201 Ω
0 °C100.0000 Ω
100 °C138.5055 Ω
850 °C390.481 Ω

Lead-wire error. A 2-wire configuration adds twice the one-way lead resistance directly to the reading. At 0.5 Ω/leg that's 1 Ω, which shifts a PT100 reading by ~2.5 °C. 3-wire cancels this provided all three legs match; 4-wire is immune.

Excitation self-heating. At 1 mA through a 100 Ω sensor, dissipation is 0.1 mW, which raises the sensor about 0.005 °C in still air. Above 1 mA the effect starts to matter for precision work.

Thermocouple K / J#

Full NIST ITS-90 polynomials both directions, with cold-junction compensation.

Direct (temperature to millivolts). The National Institute of Standards and Technology publishes piecewise polynomial coefficients for each thermocouple type:

emf(T) = sum(c_i · T^i) for i = 0…n

Type K above 0 °C adds an exponential correction:
    emf(T) += a_0 · exp(a_1 · (T - a_2)^2)

Type K is piecewise across −270…0 °C and 0…1372 °C. Type J across −210…760 °C and 760…1200 °C. Coefficients are the ITS-90 reference table values.

Inverse (millivolts to temperature). A separate set of piecewise polynomial coefficients maps EMF back to temperature, split at 0 mV and, for K, at 20.644 mV.

Cold-junction compensation. A thermocouple only measures the difference between its two junctions. If the measurement circuit sits at 25 °C, the reading is low by the EMF that a K junction would produce at 25 °C - about 1 mV, or ~25 °C worth.

emf_absolute = emf_measured + emf(T_cold_junction)
T_hot        = inverse(emf_absolute)

Skipping this step is the classic ~25 °C error people find in hand-rolled thermocouple code.

Verified reference points per NIST ITS-90:

TypeTemperatureEMF
K100 °C4.096 mV
K500 °C20.644 mV
K1000 °C41.276 mV
J100 °C5.269 mV
J500 °C27.393 mV

ADC Resolution & Noise#

LSB size, effective bits (ENOB), noise-free bits, and how much oversampling actually buys.

Ideal SNR of an N-bit converter:

SNR_ideal = 6.02 · N + 1.76 dB

Effective bits from measured noise. Given noise as RMS microvolts:

noise_LSB = noise / LSB_size
ENOB      = N - log2(noise_LSB · sqrt(12))

The sqrt(12) factor converts RMS noise to the equivalent peak-to-peak range for a Gaussian process, which matches the quantisation error convention.

Noise-free bits is the more conservative figure - the resolution you can quote in a datasheet without qualification:

NFB = floor(log2(2^N / (noise_LSB · 6.6)))

The 6.6 factor is the standard peak-to-peak-to-RMS ratio for a 99.9 % confidence bound.

Oversampling gain. Each 4× in sample rate adds 1 bit of resolution:

gain_bits = log2(oversample_ratio) / 2

This only works if the noise is at least 1 LSB - noise itself acts as the dither. A perfectly quiet input gains nothing from oversampling.

UART Baud Rate Error#

Divisor register, actual baud, and error percentage for common register formats. Reproduces the well-known bad combinations that explain why certain "odd" crystal frequencies exist.

Standard divisor. For a peripheral clock f_clk and target baud b:

divisor = round(f_clk / b)
actual  = f_clk / divisor
error   = (actual - b) / b

With 16× or 8× oversampling (the two major register formats):

16×: divisor = round(f_clk / (16·b)) - 1   (register value)
     actual  = f_clk / (16 · (divisor + 1))

8×:  divisor = round(f_clk / (8·b)) - 1
     actual  = f_clk / (8 · (divisor + 1))

Error budget. A UART resynchronises only on the start bit, then samples in the middle of each bit for the rest of the frame. By the stop bit, error has accumulated across ~10 bit times. Each end has its own error; the combined figure must stay under ~50 % of a bit period.

Verified reference point. At a 16 MHz clock with 115200 baud and 16× oversampling:

I²C Pull-Up Calculator#

Minimum and maximum pull-up resistor per the I²C specification, plus the E24 value closest to the geometric mean.

Minimum - set by sink current the low driver can pull:

R_p(min) = (V_DD - V_OL) / I_OL

Typical I²C receivers guarantee 3 mA sink at V_OL = 0.4 V, giving R_p(min) ≈ (3.3 - 0.4)/0.003 ≈ 970 Ω at 3.3 V.

Maximum - set by bus capacitance and required rise time:

R_p(max) = t_r / (0.8473 · C_b)

t_r limits:
    Standard mode (100 kHz):  1000 ns
    Fast mode      (400 kHz):  300 ns
    Fast mode plus (1 MHz):    120 ns

The 0.8473 factor is ln(0.7/0.3) - the number of RC time constants between the 30 % and 70 % of V_DD points that UM10204 uses to define I²C rise time.

When no pull-up works. If R_p(max) < R_p(min), the bus is over-capacitance for that speed - you must shorten the bus, split it with a repeater, or drop to a slower mode. Bus capacitance is roughly 10 pF per device plus 1 pF per cm of trace; the specification caps it at 400 pF for Standard and Fast mode and 550 pF for Fast-mode Plus.

RS-485 Termination & Bias#

Fail-safe bias resistor, cable-length limit, stub-length limit, unit-load budget.

Bias resistors. A pair of resistors from the differential pair to V_CC and ground respectively, providing enough current through the termination network to hold ≥ 200 mV differential when the bus is idle.

V_diff = V_CC · R_load / (2·R_bias + R_load)

R_load = parallel(R_term_effective, sum of receiver input impedances)
       = 1 / (1/(Z_0/n_terminators) + 1/(12 kΩ / UL / n_nodes))

Rearrange for R_bias:
R_bias = (V_CC · R_load / V_diff_min - R_load) / 2

Length-rate product - an empirical rule for the maximum reliable cable length at a given data rate:

length · rate ≤ 10^8  m · bps

Stub length - 20 % of the round-trip time at the data rate, conservatively:

stub_max = 0.2 · (2 · 10^8 / rate)  metres

Unit load budget. A standard transceiver presents 1 UL (12 kΩ) to the bus. The specification allows up to 32 UL. Reduced-load transceivers present ½, ¼ or ⅛ UL, allowing 64, 128 or 256 nodes.

Timer & PWM Register Calculator#

Ranked prescaler / period pairs for a target output frequency, with the PWM resolution each pair leaves you.

Frequency equation. A typical hardware timer has a prescaler PSC and an auto-reload period ARR:

f_out          = f_timer / ((PSC + 1) · (ARR + 1))
resolution     = log2(ARR + 1) bits
duty_register  = (ARR + 1) · duty%

Prefer the pair with the largest ARR - resolution is what you lose when the prescaler is too aggressive. At ARR = 4200 (~12 bits), duty steps in ~0.024 %. At ARR = 42, they step in 2.4 %.

Wire Gauge & Voltage Drop#

Loop voltage drop for field wiring and 4–20 mA compliance-voltage budgets.

Wire diameter. American Wire Gauge is defined logarithmically:

d_mm     = 0.127 · 92^((36 - AWG) / 39)
area_mm² = π/4 · d²

Copper resistance with temperature correction (α = 0.00393 per °C):

ρ           = 1.724 × 10^-8 · (1 + α · (T - 20))  Ω · m
R_per_metre = ρ / (area · 10^-6)
R_loop      = R_per_metre · length · 2   (out and back)
V_drop      = I · R_loop
P_loss      = I² · R_loop

4-20 mA compliance-voltage budget. For a supply V_S driving a loop with cable drop V_drop and a sense resistor R_sense:

V_transmitter = V_S - V_drop - I · R_sense

At 20 mA with V_S = 24 V, 100 m of AWG 22 (copper at 25 °C), and R_sense = 250 Ω:
R_loop         ≈ 10.8 Ω
V_drop         ≈ 0.22 V
V_available at transmitter ≈ 24 - 0.22 - 5 = 18.8 V

Most industrial transmitters need at least 12 V compliance, so 6.8 V of margin is comfortable.


Privacy#

Everything runs in the page. There is no backend, no telemetry and no account.

DataWhere it lives
Session logs, plot data, decoded framesmemory, until you clear or close the tab
Files, captured logsIndexedDB, in your browser
Sessions, macros, themelocalStorage, in your browser

Some features load files from the internet, only when you use them, so they need a connection: the MQTT and GPS map libraries come from unpkg.com, map tiles come from OpenStreetMap, and the fonts come from Google Fonts. Everything else runs without a network connection.


Troubleshooting#

Red banner about USB serial. USB serial needs desktop Chrome or Edge. Serve over http://localhost instead of opening the file directly. WebSocket, MQTT and the simulator work without it.

Port picker is empty. The device is not enumerating. Check the cable - many are charge-only - and confirm the USB-serial driver is present. On Linux, add yourself to dialout and log back in.

Connected but nothing arrives. Wrong baud rate is the usual cause; try AUTO DETECT. Then check TX and RX are not swapped, and that both ends share a ground.

Text is mojibake. Baud rate is close but wrong - the framing survives, the bits do not. AUTO DETECT resolves it.

Progress bars scroll instead of updating. ANSI is switched off, so \r is being ignored.

"No port chosen." The browser's port picker was closed without choosing a port. Click CONNECT and pick one. If your adapter is not in the list, see the next item.

Modbus table is empty. See Troubleshooting Modbus.

CAN table is empty. See Troubleshooting CAN.


Verification summary#

Every calculator is tested against published reference values, not eyeballed. The main ones:

CheckExpectedSource
Modbus CRC of 01 04 02 FF FFB8 80canonical test vector
CRC-16/MODBUS of 1234567890x4B37CRC catalogue
CRC-32 of 1234567890xCBF43926CRC catalogue
XMODEM CRC-16 of ABC0x3994XMODEM specification
J1939 ID 0x0CF00400PGN 61444 (EEC1)SAE J1939-71
PT100 at 0 / 100 / −200 °C100.0000 / 138.5055 / 18.5201 ΩIEC 60751
Type K at 100 / 500 / 1000 °C4.096 / 20.644 / 41.276 mVNIST ITS-90
UART baud at 16 MHz / 115200 (16× / 8×)−3.55 % / +2.12 %standard divisor equation

If any calculator ever produces a number that disagrees with its cited standard, that is a bug in the tool - please report it.