Skip to main content
Version: v3.2.1

OnBoard™ IoT Security FW Signing and Pushing CLI - v1.0.0

1. Revision Record​

VersionModified DateNotes
v1.0.02025/02/17Initial release

2. Overview​

OnBoard™ IoT Security (OBIS) FW Signing and Pushing CLI is a command-line tool built specifically for OBIS, dedicated to firmware signing and pushing. It integrates several core functions, including key configuration based on the PKI (Public Key Infrastructure) certificate signing, KMS (Key Management System) firmware signing, public key export, and firmware pushing to OBIS.

This article introduces the common commands of the OBIS FW Signing and Pushing CLI and provides parameter descriptions and usage examples to help you efficiently complete firmware signing and pushing operations.

3. Syntax​

snb [command] [subcommand] [parameters]

4. Command List​

4.1 Key Configuration Command​

Used to set the Access Key and Secret Key.

4.1.1 Command​

config

4.1.2 Parameters​

ParametersTypeMandatoryDescription
--accessKeystringYesSet the Access Key, which can be viewed in the user page in OBIS.
--secretKeystringYesSet the Secret Key, which can be viewed in the user page in OBIS.

4.1.3 Example​

snb config --accessKey <AK> --secretKey <SK>

4.2 Firmware Signing Command​

Used to perform a signing operation on input data with the specified key pair.

4.2.1 Command​

kms

4.2.2 Subcommand​

sign

4.2.3 Parameters​

ParametersTypeMandatoryDescription
--algorithmstringYesConfigure the signing algorithm, currently supporting ecdsa_sha_256.
--keyIdstringYesSpecify the key ID to use for the signing operation.
--inputFilestringNoSpecify the target file to be signed.
--inputDatastringNoInput the data to be signed, in hexadecimal string format.
--inputHashstringNoInput the pre-hashed data to be signed, in hexadecimal string format.
--outputFilestringNoSpecify the output file for the signature result, in the .der format. Defaults to standard output (stdout).
--resourcePackageIdstringNoSpecify the resource package ID for the product. This parameter is required when accessing the product keys.
tip
  • At least one of the parameters (inputFile, inputData, or inputHash) must be provided.
  • When outputting to standard output (stdout), the signature result in the .der format is represented as a hexadecimal string.

4.2.4 Example​

snb kms sign --algorithm ecdsa_sha_256 --keyId <keyID> --inputFile ./firmware.bin --outputFile ./signedResult.der

4.3 Public Key Export Command​

Used to export the public key of a specified key pair.

4.3.1 Command​

kms

4.3.2 Subcommand​

exportPubKey

4.3.3 Parameters​

ParametersTypeMandatoryDescription
--keyIdstringYesSpecify the key ID to export.
--outputFormatstringYesSpecify the output format for the exported key, options are PEM or DER. Default is DER.
--outputFilestringYesSpecify the output file for the exported key. Defaults to standard output (stdout).
--resourcePackageIdstringNoSpecify the resource package ID for the product. This parameter is required when the Access Key used belongs to a personal account.
tip

When outputting to standard output (stdout), the signature result in the .der format is represented as a hexadecimal string.

4.3.4 Example​

snb kms exportPubKey --keyId <keyID> --outputFormat PEM --outputFile pubKey.pem

4.4 Certificate Signing Command (such as Matter DAC)​

Used to sign a certificate signing request (CSR) file using the specified certificate template.

4.4.1 Command​

pki

4.4.2 Sub-command​

sign

4.4.3 Parameters​

ParametersTypeMandatoryDescription
--inputFormatstringYesSpecify the input format (PEM or DER). Default is PEM.
--certTemplateIdstringYesSpecify the certificate (such as Matter DAC) template ID.
--outputFormatstringYesSpecify the output file format(PEM or DER). Default is DER.
--csrFilestringNoSpecify the path of the CSR file.
--csrContentstringNoProvide the content of the CSR file.
--outputFilestringNoSpecify the output filename. Defaults to standard output (stdout).
tip
  • At least one of the parameters (csrFile or csrContent) must be provided.
  • When outputting to standard output (stdout), the signature result in the .der format is represented as a hexadecimal string.

4.4.4 Example​

snb pki sign --csrFile ./csr.der --inputFormat DER --certTemplateId 1F118749-EEB1-11EF-A430-B8CEF6C25058

4.5 Firmware Push Command​

Used to push the signed firmware file to OBIS.

4.5.1 Command​

obis

4.5.2 Subcommand​

push

4.5.3 Parameters​

ParametersTypeMandatoryDescription
--filestringYesSpecify the file to be pushed to OBIS.
--fileTypestringYesSpecify the type of the file being pushed: Application (default), Bootloader, or Others.
--resourcePackageIdstringYesSpecify the resource package ID under the target product in OBIS.
--envstringYesSpecify the target environment for pushing: TEST or PROD.
--startAddressstringNoSpecify the firmware programming start address, in hexadecimal format starting with 0x.
--versionstringNoSet the firmware file version, with a maximum length of 16 characters. Allowed characters include text, numbers (0-9), letters (a-z, A-Z), dot (.), underscore (_), and hyphen (-).
tip
  • When the file being pushed is in the .bin format, the startAddress parameter is required.
  • The combination of version, env, and file must be unique and can't be duplicated.

4.5.4 Example​

snb obis push --file ./lighting.s37 --fileType Application --resourcePackageId <id> --env TEST --version 1.0.0

5. Execution Flow Example​

Screenshot displays the execution flow example.

Footer Icon
Download IconDownload User Manual