Skip to main content

The Connected Factory API

System Calls Used By Your Factory Firmware

The following API methods are reserved for the two key Connected Factory operations: BlinkUp™ and blessing. All of these methods are intended only to be included in your factory firmware: DUT firmware or Fixture firmware. If these methods are included in application firmware, they will throw exceptions that cause devices to restart.

  • If you are unfamiliar with the Electric Imp Connected Factory Process, please take a moment to read our brief overview, which includes a full glossary of the terminology you will encounter in this guide.

  • Please see Writing, Testing and Using Factory Firmware if you required more detailed guidance on preparing your Product’s factory firmware in impCentral™.

The first two factory API methods — server.bless() and server.factoryblinkup() — are mandatory; your factory firmware will not do its job correctly without them. The first of these is used only in your device under test (DUT) firmware, the second only in your BlinkUp fixture firmware.

The third method, imp.clearconfiguration(), is not mandatory, but is strongly recommended. It will prevent Production Devices from attempting to connect using their stored factory network and enrollment credentials when end-users power them up for the first time. Clearing the stored credentials with imp.clearconfiguration() ensures that each device’s BlinkUp status LED signals what should be the correct state for a new end-user device: that the unit is unconfigured. This is used only in the DUT firmware.

Also very useful for efficient factory firmware is the data stored in the imp.configparams property. Available to agents and devices, the property is a table which provides the URL of the agent of the fixture, allowing messages to be easily routed to it (see Using Agents In Factory Firmware: Examples for a typical use-case).

Note Please see When is imp.configparams Populated? in the imp.configparams documentation before you make use of the property in your factory firmware.

The remaining API methods are optional, but are intended for use in DUT firmware.

Essential Methods

Optional Methods