Please enable JavaScript to view this website.

Skip to main content

Prerequisites & Manufacturing Setup

Who should read these docs?

Manufacturing engineers setting up or integrating with the assembly line, and firmware engineers configuring region-specific endpoints for a SKU. Read this before starting Phase 1.

Before starting the device provisioning process, ensure you have the following credentials, tools, and endpoint information, and that the manufacturing prerequisites are in place.

Required Credentials

Auth0 Client Credentials

To obtain bootstrap certificates via the REST API, you need Auth0 client credentials for machine-to-machine authentication:

CredentialDescription
client_idYour Auth0 application client ID
client_secretYour Auth0 application client secret
audienceThe API audience URL (environment-specific, see table below)
Obtaining Credentials

Contact the CPP Identity & Remote Comms team to request Auth0 client credentials for your manufacturing or development environment.

AWS IoT Root CA Certificate

For mTLS, the firmware must validate the server side of the TLS handshake. This requires the AWS IoT Root CA certificate to be bundled into the firmware or stored in non-volatile memory alongside the device certificates.

Use AmazonRootCA1 (RSA 2048-bit). Download it from the AWS CA certificates page. The file is approximately 1.2 KB in PEM format.

Do not skip server certificate validation

Some TLS stacks allow you to disable server certificate validation for development convenience. Never ship firmware with validation disabled. Without it, the device is vulnerable to man-in-the-middle attacks and cannot verify it is talking to the correct AWS IoT endpoint.

info

The Root CA certificate is the same across all CPP environments (dev, test, staging, prod) and all regions. Bundle one copy in your firmware image.

Tools and Libraries

The libraries listed below are used in the reference implementation. They are not requirements. Your product may use a different language, a bare-metal TLS stack, or a vendor-supplied SDK. What matters is meeting the protocol requirements described here, not which library you use to meet them.

CSR Generation

The CSR must be a valid PEM-encoded PKCS#10 Certificate Signing Request containing the subject fields listed below. How you generate it depends on your platform:

LibraryLanguageNotes
cryptographyPythonUsed in the reference implementation and code examples on this page
OpenSSLC/C++Common choice for Linux-based systems
mbedTLSCCommon choice for bare-metal embedded systems
Any X.509 / PKCS#10 libraryAnyAny library that produces a valid PEM-encoded CSR will work

CSR Subject Fields

The device must generate a CSR containing these X.509 subject fields exactly. The Common Name and Given Name fields are device-specific; all others are fixed values.

These requirements are the same for all CSRs regardless of type of certificate being requested.

FieldOIDValue
Common Name (CN)2.5.4.3Device type string (e.g., bridge). Contact the CPP team for your product's value.
Given Name (GN)2.5.4.42MPBID (10-character hex string) unique for each unit
Organization (O)2.5.4.10Milwaukee Tool
Organizational Unit (OU)2.5.4.11Connected Products
Country (C)2.5.4.6US
State (ST)2.5.4.8WI
Locality (L)2.5.4.7Brookfield

MQTT Client

Fleet Provisioning (Phase 2) requires an MQTT 3.1.1 client with mTLS support. The reference implementation uses the python AWS IoT Device SDK, but any compliant MQTT client works:

LibraryLanguageNotes
awsiotsdk + awscrtPythonUsed in the reference implementation
AWS IoT Device SDK for C++C++Good starting point for Linux-based devices
mbedTLS + a MQTT clientCCommon choice for bare-metal embedded systems
Any MQTT 3.1.1 client with mTLSAnyMust support mutual TLS and SNI
Protocol Requirements

These requirements apply regardless of library choice:

  • Key type: RSA only. ECDSA is not currently supported by the CPP Certificate Authority.
  • RSA key size: 2048 bits minimum
  • Signature algorithm: SHA-256
  • TLS: mutual authentication (mTLS) with SNI (Server Name Indication) enabled. SNI is a TLS extension that tells the server which hostname the client is connecting to during the handshake. The CPP MQTT endpoints require it. Most TLS stacks send it automatically, but some bare-metal implementations have it disabled by default and need it explicitly enabled.
  • MQTT port: 8883
  • Private keys must never leave the device. Generate keys on-device and only transmit the CSR.

Environment-Specific Endpoints

REST API Endpoints

When interacting with the REST API, you must provide a machine-to-machine JWT Bearer token. Use the following endpoints when requesting an auth token.

EnvironmentAPI Base URLAuth0 Token URL
DEVhttps://api.dev.iot.digital.milwaukeetool.comhttps://idtest.milwaukeetool.com/oauth/token
TESThttps://api.test.iot.digital.milwaukeetool.comhttps://idtest.milwaukeetool.com/oauth/token
STAGINGhttps://api.staging.iot.digital.milwaukeetool.comhttps://id.milwaukeetool.com/oauth/token
PRODhttps://api.prod.iot.digital.milwaukeetool.comhttps://id.milwaukeetool.com/oauth/token
Full API Docs

The full list of available endpoints and how to use them can be found within the HTTPS API documentation.

MQTT Endpoints (AWS IoT Core)

Use these endpoints for MQTT connections during Fleet Provisioning and Normal Operations over MQTT. The table below shows North America endpoints; see the regional table below for EU and Asia Pacific variants.

EnvironmentMQTT Endpoint (North America)Port
DEVmqtt.dev.iot.digital.milwaukeetool.com8883
TESTmqtt.test.iot.digital.milwaukeetool.com8883
STAGINGmqtt.staging.iot.digital.milwaukeetool.com8883
PRODmqtt.prod.iot.digital.milwaukeetool.com8883
The base domain varies by region

Firmware must be configured with the endpoint that matches the product's intended region of sale. A device connecting to the wrong regional endpoint will fail to provision.

RegionDomain SuffixExample MQTT Endpoint (prod)
North Americadigital.milwaukeetool.commqtt.prod.iot.digital.milwaukeetool.com
Europedigital.milwaukeetool.eumqtt.prod.iot.digital.milwaukeetool.eu
Asia Pacificdigital.milwaukeetool.com.aumqtt.prod.iot.digital.milwaukeetool.com.au

Confirm the target region with the CPP team before end-of-line programming so the correct endpoint is configured in firmware for the SKU being manufactured.

Full MQTT Topics Docs

The full list of available topics and how to use them can be found within the MQTT documentation.

Device Storage Requirements

Plan your NVM layout before starting firmware integration. The table below covers everything the firmware must persist across power cycles.

ItemFormatApprox. SizeMutability
AWS IoT Root CA certificatePEM or DER~1.2 KBWrite-once (bundled in firmware image or NVM)
Bootstrap private keyPEM or DER~1.6 KBWrite-once at Phase 1; never replaced
Bootstrap certificatePEM or DER~1.5 KBWrite-once at Phase 1; never replaced
Operational private keyPEM or DER~1.6 KBReplaced on each certificate rotation
Operational certificatePEM or DER~1.5 KBReplaced on each certificate rotation
Provisioning stateenum (1 byte)1 BUpdated at each provisioning phase
Rotation job IDstring~64 BWritten when a rotation job is claimed; cleared after reporting SUCCEEDED/FAILED
Rotation execution numberuint324 BWritten when a rotation job is claimed; cleared after reporting SUCCEEDED/FAILED

Total NVM budget: approximately 8–10 KB for certificates and keys, plus state variables.

Device Requirements

Before provisioning, each device must have:

  1. Unique MPBID: A 10-character hexadecimal Milwaukee Product Binary Identifier assigned during end-of-line programming
  2. Device Type: The device type string for your product (contact CPP team for the correct value)
  3. Secure Storage: Capability to securely store private keys and certificates
  4. Network Connectivity:
    • HTTP/HTTPS access for REST API calls (manufacturing)
    • MQTT over TLS (port 8883) for Fleet Provisioning (runtime)

Manufacturing Line Setup

Before the certificate REST API will accept a request for a given MPBID, a tool record for that device must already exist in the JEDI manufacturing records system. The certificate API validates the MPBID against this system on every call. A 404 error means the tool record hasn't been created yet, not that your request is malformed.

Tool Record Creation

The manufacturing line must submit a tool record to the JEDI manufacturing API. This is a separate step that happens at a different station on the assembly line, before IoT Device Provisioning.

The tool record links the device's MPBID to its product metadata (product ID embedded in MPBID, born-on date, passwords, firmware version, etc.) and propagates the registration to OneKey. Once a tool record exists, the certificate API will accept provisioning requests for that MPBID.

Tool Record Must Exist First

The Certificate API returns HTTP 404 if the MPBID is not found in the tool records system. Do not attempt certificate provisioning until the unit has gone through "OneKey end-of-line programming" to receive a unique unit-specific MPBID.

Get Help