Skip to main content

isdttool

This is a fork of maxried/isdttool, published on PyPI as isdttool-pal. It adds a network bridge (serve, --host), selecting chargers by USB serial number, and ISDT N24 support. Everything is offered upstream as pull requests; once they are merged, use isdttool instead. The command, and the import name stay isdttool.

pip install isdttool-pal

Important Notes

This software is not sponsored by ISDT, or anyone else. It was created by observing the protocol between the updater, then the charger, and fuzzing the charger, and observing its behavior. Chargers are dangerous tools. You should never use them unattended. Batteries can leak, catch fire, etc. This tool comes with no warranties whatsoever. If bad things happen, I'm not responsible.

Summary

isdttool is a utility to retrieve information such as the current charging status from ISDT chargers. It can output it as plain text, json, and csv, so it should be suitable for automation. Tested models are

  • ISDT C4
  • ISDT A4
  • DNT Smart PRO (which just is a rebranded ISDT C4 with old firmware)
  • ISDT C4EVO
  • ISDT Q8 (minimal support)
  • ISDT N24 (reports itself as "NXHOSTP"; metrics only, it does not answer serial)

It should be compatible with other chargers by ISDT, at least the ones that are not primarily for charging LiPo. E.g. N8 should be compatible, but it's unknown if models like P20, or D1 work. It requires a USB connection. ISDT chargers with firmware upgrade capability should at least be detectable by this tool.

Installation

The only dependency is hidapi, which should be automatically installed if you use pip to install isdttool.

pip install isdttool-pal

Not every user is allowed to access human interface devices on every platform. If you're on some Linux, you likely have to add some udev rules if you want to run isdttool as an unprivileged user. A quick fix would be to save the following file in /etc/udev/rules.d/99-isdt.rules, and run udev trigger:

ATTRS{idVendor}=="28e9", MODE="0666"

Network bridge

isdttool serve exposes a charger on a local USB port to the network, so that isdttool, or any other program, can use it from another machine. It runs in the foreground until the charger is unplugged, and is meant to run as a service. contrib/isdttool@.service is a systemd template for it.

# On the machine with the charger. --serial picks the charger, and does not change
# when it moves to another USB port.
$ isdttool list
Model "SMART Device" with serial "00000000011C" at "1-1.3:1.0"
$ isdttool --serial 00000000011C serve --port 24000

# Anywhere else
$ isdttool --host charger-pi version
$ isdttool -H charger-pi:24000 metrics
$ isdttool -H [2001:db8::1]:24000 metrics

Each bridge serves one charger on one TCP port. The default port is 24000, so more chargers can use 24001, 24002, and so on. Only one client is served at a time, and a new client replaces the current one.

The wire format is deliberately simple, so that other programs can talk to a bridge without isdttool: in both directions, every message is one packet, preceded by its length as two bytes, big-endian. A packet is a command or a response, starting with its opcode, e.g. 00 01 e0 asks for the version. The link-specific framing, like the USB framing in protocol.md, stays between the bridge and the charger. There is no handshake, and no other message type.

One exception: some chargers, like the N24, don't answer the serial command. For those, the bridge answers it with the charger's USB serial number, so that clients can still tell chargers apart.

Usage

Most options are self-explanatory, and you should not be able to break your charger with this tool unless you voluntarily use the raw-command sub-command. Firmware upgrades are not supported right now, but you can have a look at firmware files, and test if a certain image is flashed to your charger.

Usage examples:

# The metrics command shows you the status of the channels. If you call it with --output json, the output is much more verbose.
$ isdttool metrics
CH 0      charging:    NiMH    AA at  90 %, 27 °C,  1.430 V *  0.999 A,  80 Ohm, 13 s
CH 1        idling:    auto empty at   0 %, 28 °C,  0.000 V *  0.000 A,   0 Ohm, 0 s
CH 2        idling:    auto empty at   0 %, 28 °C,  0.000 V *  0.000 A,   0 Ohm, 0 s
CH 3      charging:    NiMH    AA at  99 %, 27 °C,  1.425 V *  1.003 A,  43 Ohm, 2 s

$ isdttool --output json metrics --channel 0
[{"_type": "metrics", "_channel exists": true, "channel": 0, "mode id": 3, "mode string": "charging", "chemistry id": 9, "chemistry string": "NiMH", "dimensions id": 1, "dimensions string": "AA", "temperature": 29, "internal_temperature": 0, "progress": 96, "charging voltage": 1383, "charging current": 799, "resistance": 83, "power": 1228, "energy": 31, "capacity or peak voltage": 4985, "time": 62, "_malformed": false, "_measurement": 1}]

# If you happen to run a command that is not supported by the charger in its current mode,
# you get a message about that. You can disable this check with the `--debug`, `-d` flag.
$ isdttool sensors                                                                                                                       [12:03:43]
This command is currently not supported by the model "A4" in app mode.
The command is supported in the following modes:
Model "C4" in app mode


$ isdttool version
Model name: C4
Hardware version 1.0.0.4
Boot loader version 1.0.0.3
OS/App version 1.1.0.16

$ isdttool rename Test
Device renamed, rebooting.

$ isdttool fw-info -f Firmware.fwd
Firmware Image Summary
----------------------
Embedded Checksum:   0xe063dcf7
Calculated Checksum: 0xe063dcf7
Checksum OK

$ isdttool boot-loader
Rebooting to boot loader.
$ isdttool verify-fw --file A4.bin
The checksum matches the checksum of the image in flash.

$ isdttool boot-app
Rebooting to app.

# This one might not be obvious. It runs the supplied command whenever a change in the charging status happens.
# It sets some informative environment variables. If you call it without `--command`, `-c` parameter,
# it defaults to `env` to show you what's going on.
$ isdttool monitor --command '[ "$_REASON" = "mode id" -o "$_REASON" = "periodic" ] && telegram "$HUMAN_READABLE"'
[...]

# Serial returns the factory programmed serial number of the processor.
# This is different from the serial number shown in the GUI of the C4, which is most likely a date code, while the
# serial number of the processor is supposed to be random.
$ isdttool serial
Serial Number: 33c0011816666b0410324d3d


# If you have multiple chargers attached you can specify the one you like to query using the `--path` parameter.
$ isdttool --path "IOService:/AppleACPIPlatformExpert/PCI0@0/[...]" version
Model name: A4
Hardware version 1.2.0.0
Boot loader version 1.0.0.1
OS/App version 1.0.0.20

Metadata

Release files for isdttool-pal 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for isdttool-pal 2.0.0
File Size Uploaded Provenance Actions
isdttool_pal-2.0.0.tar.gz 51.0 kB With provenance Details for isdttool_pal-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for isdttool-pal 2.0.0
File Interpreter ABI Platform Actions
isdttool_pal-2.0.0-py3-none-any.whl Python 3 none any Details for isdttool_pal-2.0.0-py3-none-any.whl

Total release size: 103.4 kB

Release files / isdttool_pal-2.0.0.tar.gz

Download URL isdttool_pal-2.0.0.tar.gz
Size 51.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c88619ae78bdba52b2766048499f8eedfd2c40728b26943eb34698a9df340426
BLAKE2b-256 checksum
How to use checksums
ad61485fe954ffcd1032a32f1e0d931242d4196886b74e304387ebc6433b4f73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / isdttool_pal-2.0.0-py3-none-any.whl

Download URL isdttool_pal-2.0.0-py3-none-any.whl
Size 52.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a58ae1836e45eda6fc22c7ca78378c42004d6125d8e83ef4de7bea912c650efa
BLAKE2b-256 checksum
How to use checksums
6030d8ad25c568b76ed89ed14c74cc1fe31819e76a9e5343806d308be9150742
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for isdttool-pal 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for isdttool_pal-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page