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 — if included in application firmware, they will generate runtime errors causing devices to restart.

The first two methods — server.bless() and server.factoryblinkup() — are mandatory; your factory firmware will not do its job correctly without them.

The third, imp.clearconfiguration(), is not required, 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.

Also useful to writing efficient factory firmware is the data stored in the imp.configparams property. The remaining API methods are optional.

Required Methods

Optional Methods

The FactoryTools Library

Electric Imp provides a free-to-use code library, FactoryTools, to help you construct your factory firmware by providing simple functions for determining the type of device on which your factory firmware is running.

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