Repository navigation
Firmware installation stores no ESI from a Jasper package #192
Description
What happens
The cache step of firmware-installation stores the ESI of a cached package in esis/ of the user cache, so a device on that firmware gets its parameter metadata at the next scan. readPackageEsi (libs/node/firmware_package.cc) finds the ESI only as an entry whose name ends in SOMANET_CiA_402.xml.zip (kEsiFileName, libs/node/firmware_package.h), and reads the XML inside that zip.
A Jasper package holds the ESI as SOMANET_CiA_402.xml, not zipped. readPackageEsi finds no entry and returns std::nullopt, which means "the package holds no ESI". So the install stores no ESI for a Jasper package, and logs nothing about it: the step neither logs stored its ESI as nor warns.
What should happen
The cache step stores the ESI of a Jasper package, as it does for a Circulo or an Integro package. A Jasper-based drive on that firmware gets its parameter metadata from the stored ESI at the next scan.
How to reproduce
Not run on a drive. The defect follows from the code and the package contents below.
- Install
package_NGC_4104-01_Jasper_v10.0.4+30.g335d92a94f.zipon a Jasper-based drive withcachePackagetrue, the default. - Read the server log of the
cachestep, and listesis/of the user cache.
Expected from the code: the package is in firmwares/, no ESI file for vendor 0x22D2 and v10.0.4+30.g335d92a94f is in esis/, and the log has no line about the ESI.
Environment
- Motion Master 6.0.0-alpha.120, from
GET /api/version. - Host: Fedora Linux 44, kernel 7.2.12-200.fc44.x86_64, x86_64, from
GET /api/system-info. - No drive and no fieldbus driver are involved: the defect is in reading the package, before the install touches the device.
Evidence
The entries of the Jasper package:
$ unzip -l package_NGC_4104-01_Jasper_v10.0.4+30.g335d92a94f.zip
Length Date Time Name
--------- ---------- ----- ----
443712 10-30-2026 15:44 app_jasper.bin
415108 10-30-2026 15:44 SOMANET_CiA_402.xml
32768 10-30-2026 15:44 com_pru_fw.bin
19600 10-30-2026 15:44 CHANGELOG.md
SOMANET_CiA_402.xml is an ESI:
<?xml version="1.0" encoding="utf-8"?>
<EtherCATInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="EtherCATInfo.xsd" Version="1.6">
<Vendor>
<Id>#x22D2</Id>
and declares ProductCode="#x00000501".
The lookup in readPackageEsi:
auto inner = readEntryEndingIn(zip, kEsiFileName);
...
if (!*inner) {
return std::nullopt;
}
auto xml = readEntryEndingIn(**inner, ".xml");with kEsiFileName = "SOMANET_CiA_402.xml.zip".
Notes
- A fix reads the ESI from an entry named
SOMANET_CiA_402.xmlas well as fromSOMANET_CiA_402.xml.zip. Which name a package uses is a fact of the package, so the fix must not key on the product or the hardware name. - Not checked: whether a Jasper drive gets its ESI some other way today, for example from the Console's ESI page or from a file already in
esis/. - Firmware installation writes extra files only when they are named #191 changes which entries an install writes to the drive. It mentions this defect and leaves it out of scope.
Activity
fix(node): read the ESI of a package that holds it as XML, not zipped