Sets the NVRAM image of certain imps at blessing
Available for use in Factory Firmware only
Available for the imp003, imp004m, imp005 and imp006 only
The module’s WiFi/Bluetooth controller settings
String — a hash of the NVRAM image
This method writes a WiFi controller settings page, provided as a string, into the device’s non-volatile storage. In the case of the imp004m and imp006, it can also be used to apply Bluetooth settings, as Bluetooth and WiFi share a common (integrated) antenna on this module.
This is a process which can only take place within the factory environment when the target device is being blessed for shipment and sale. Indeed, the method should only be called from factory firmware: it will generate a Squirrel error if it is used on a device running any other firmware.
It is also only available for use on the imp003 (Murata LBWA1ZV1CD), imp004m (Murata Type1MD), the imp005 (Murata Type1GC) and the imp006 modules.
Determining the correct settings for this call will be part of the process by which the manufacturer tunes the device and gains formal wireless approval. If you require assistance determining the correct settings for your application and its hardware, please visit Electric Imp Customer Support.
The settings applied via imp.setnvramimage() will only take effect after an imp restart, eg. by calling imp.reset() or physically power-cycling the device (other imps will continue to enable the new settings on the next connection attempt).
imp.setnvramimage() can be used to prevent an imp005 from connecting via WiFi if your product is intended solely to connect via Ethernet. This has the benefit of preventing WiFi connection attempts from being initiated if no Ethernet link is detected (which is the default behavior). It will also eliminate WiFi radio emissions (necessary to avoid RF certification), and may improve device boot speed and power consumption.
WiFi is disabled by passing the string
"unavailable" into imp.setnvramimage(). This will make the following methods unavailable:
Calling these methods on a suitably configured imp005 will result in the error
"index does not exist" being thrown.
Note Methods marked * have now been deprecated — imp.net.info() is now the recommended means to retrieve networking information and is not affected by disabling WiFi.
If this command is sent accidentally, the imp can be recovered by connecting via Ethernet, and running factory firmware that calls imp.setnvramimage() and passes in a valid WiFi controller settings page NVRAM image.
If this command is sent to a device with no Ethernet PHY fitted, the imp will retry after a failed connection attempt, this time using the default WiFi controller settings page NVRAM image.
The impC001 does not currently implement imp.setnvramimage().