5. Per-Device Flow
5.1 Flash and onboard the device
Flash the Factory Diagnostic Firmware with ROW support (Section 6.1) onto the device under test (DUT) and connect it to the line PC through the host interface the image was built for: the UART of the device, or a J-Link debug probe for RTT. Then run the command for that interface:
# UART
sid-mfg-tool device onboard \
--transport uart --address /dev/ttyUSB0 \
--dsn <DSN>
# RTT through a J-Link probe
sid-mfg-tool device onboard \
--transport rtt --address <J-Link probe serial number> \
--dsn <DSN>
--dsn is the Device Serial Number (DSN) of the unit. For UART, --address is the serial port of the device, for example /dev/ttyUSB0 on Linux or COM3 on Windows. For RTT, --address is the serial number of the J-Link probe (the on-board J-Link of a development kit or an external probe). The J-Link device name of the MCU must also be set in the tool configuration (Chapter 4). A J-Link probe serves one host program at a time: close J-Link RTT Viewer, J-Link Commander, RTT Logger and Simplicity Studio before running the tool. --transport can be omitted when the default transport was set with configure.
The optional --log-level info|warning|error argument controls the tool output. The stages can also be run separately: device provision ... prints the SMSN, and device register ... reads the stored SMSN back from the device.
The SMSN is derived from the DeviceTypeId, the DSN and the APID (SMSN = SHA-256(DeviceTypeId, DSN, APID)), and identifies the wireless device record in AWS IoT Core for Amazon Sidewalk. The device maker must not reuse an SMSN that has already been used. Because the DeviceTypeId and the APID are fixed for a product, every unit needs a DSN that has not been used before. A second unit with the same DSN fails at device creation, because a device with that SMSN already exists in the AWS account. Retrying the same unit is safe. Reset the device, then run device register. The tool reads the stored SMSN from the device and does not create the record again.
5.2 Verify registration
Gate the factory line on the tool message. Use the cloud check as a periodic spot check:
- Required for every unit: the tool reports
Device registered over the wire. - Periodic spot check: the following command returns
Sidewalk.Status: REGISTERED:
aws iotwireless get-wireless-device \
--identifier-type SidewalkManufacturingSn --identifier <SMSN>
5.3 After registration
After a device is registered, the device maker is responsible for the following:
- Flash production firmware that matches the registration configuration, meaning the SDK variant that corresponds to the configured security level (Section 7.1). At
security-level-high, the reflash must not erase the KV store (program-only flash). Atsecurity-level-low, a reflash that erases the KV store is supported at this point. - Re-register any device that failed registration before shipment. A device that failed registration does not perform field activation, and lite-variant firmware fails
sid_init()on an unregistered device (Section 6.2.2).
Never attempt mobile application or FFN registration on a factory-registered device.
Devices that are not factory-registered follow the existing mass production flow: they are provisioned only, and the end user registers them in the field through a mobile application, FFN or a Sidewalk gateway. These devices need full-variant firmware with a BLE or FSK registration path. Registration over LoRa is not supported (Section 7.1).