ASMTool is a minimal Windows-only .NET 8 command-line utility for PCI-based ASMedia USB controllers. It supports only three read operations: reading live firmware version information, dumping controller flash, and dumping controller memory.
This fork focuses on reading firmware information directly from ASMedia flash data without hardcoding firmware values. Fixed offsets, signatures, and format rules may be used, but firmware version/date/marker values are read from device data.
Original upstream project: https://github.com/smx-smx/ASMTool
- Detects supported ASMedia PCI devices by product ID:
0x2142/ ASM21420x3142/ ASM3142
- Supports only these switches:
read_fw_infomem_readflash_read
- Dumps the controller flash ROM to
dump.bin. - Dumps controller memory to
mem.bin. - Reads MPTOOL-style firmware version candidates directly from controller flash data and prints the selected match.
Removed features from the original ASMTool include firmware file inspection, firmware patching, Linux support, and unused memory-map/write helpers.
ASMedia MPTOOL-style firmware versions are parsed as a 12-digit value:
YYMMDDMMVVVV
Example:
210225700240
Meaning:
21 02 25 70 02 40
│ │ │ │ └──── firmware version: 0240
│ │ │ └─────── firmware generation/update marker: 70
└──┴──┴────────── build date: 2021-02-25
The parser scans flash data for valid binary-BCD and ASCII version candidates using marker values 50 and 70. It prints the selected version, its offset, and storage format. Firmware values are not hardcoded.
- .NET 8 SDK
- Visual Studio 2026 or another .NET 8-compatible build environment
The Windows build targets x86 because the native ASMedia I/O DLL uses 32-bit interop.
The tool requires ASMedia I/O driver components at runtime:
asmiodll.dll- ASMedia I/O driver files such as
AsmIo.sysorAsmIo64.sys, depending on the environment
Place the required native files next to the built AsmTool.exe.
Administrator privileges may be required because the tool loads a driver and accesses PCI configuration/device registers.
From the repository root:
dotnet build AsmTool.slnThe Windows output is produced as an x86 executable because of the project configuration.
Run commands from the directory containing the built executable and required native I/O files.
AsmTool.exe <read_fw_info|mem_read|flash_read>Running without a switch or with an unknown switch prints usage.
AsmTool.exe read_fw_infoThis reads the controller flash into memory, scans it for MPTOOL-style firmware version candidates, and prints the detected firmware version information without creating dump.bin.
Example output:
==== Reading Firmware Info ====
FW Version: 210225700240
FW Version Info: 2021-02-25, marker: 70, version: 0240, offset: 0xC9, format: binary BCD
AsmTool.exe flash_readThis reads the controller flash in 8-byte chunks and writes a 128 KiB dump to:
dump.bin
AsmTool.exe mem_readThis writes a memory dump to:
mem.bin
- Firmware dump files such as
dump.binandmem.binare ignored by Git through.gitignore. - Use this tool only with hardware and firmware you are authorized to inspect.
- Low-level PCI/device access can hang hardware or the operating system if used incorrectly.
ASMedia controller firmware interfaces can potentially write code to the device. A PCIe device with malicious firmware may be able to perform unsafe DMA or other privileged operations. Treat firmware images and flashing/debug tooling as security-sensitive.
This fork is based on the original upstream ASMTool project, which was distributed under MPL-2.0 licensing terms.