impOS 34 delivers support for the imp005 module, a new Murata-manufactured unit based on the Broadcom BCM43907 system-on-a-chip rather than the STMicro MCUs found in earlier imps. The imp005 introduces not only 802.11a/n WiFi in the 5GHz band and 10/100Mbps Ethernet to the Electric Imp Platform, but also USB connectivity. For a fuller discussion of the imp005’s capabilities, please see the preliminary version of the guide ‘Designing Hardware with the imp005’ and the imp005 pin mux.
The release of impOS 34 introduces a change in how version numbers are used: in the future we intend that odd-numbered major versions are used for pre-releases, and even-numbered major versions will signify production-quality releases.
Because the upgrade format has changed with impOS 34, any imp upgraded to release 34 or later cannot be downgraded to an earlier version of impOS.
Current release is 34.11
Note impOS™ 33 was an internal release shared with testers and early adopters. As such, the changes and improvements implemented in impOS 33 will gain their first public release with impOS 34 (see ‘Version Naming’, above).
impOS 34 includes host support for Universal Serial Bus (USB) on the imp005, which is the only imp module with support for this connectivity technology. Release 34 supports Full-Speed USB 2.0 (12Mb/s) operation. An object, hardware.usb, is instantiated automatically and provides the methods listed below for communicating with a single USB device connected to the imp005. Only a single device is currently supported; connections through USB hubs are not supported. A runtime error will be thrown if the USB object is called on any imp other than the imp005.
A squirrel helper library to ease implementation of USB host drivers will be provided in the near future.
impOS 34 incorporates changes to impOS’ existing UART functionality which enable support for half-duplex communications with external buffer hardware (for example, RS485) and for receive byte timing. UART objects can now be configured to keep track of the intervals between the receipt of two consecutive bytes and to return that interval.
To this end, the hardware.uart.configure() method gains a new control flag, TIMING_ENABLED, to initiate receive byte timing. Time intervals between bytes are subsequently reported via hardware.uart.read() in way that is fully compatible with all other UART uses.
This functionality allows optimal support for Modbus RTU, a communications protocol with strong usage in the industrial IoT, and other RS485-based techniques. A sample Modbus RTU implementation will be provided in due course through a free-to-use software library.
A new method, hardware.uart.settxactive(), configures an imp GPIO pin to indicate when UART transmission is occurring. This facility can be used to drive an external RS485 transceiver, for shared-medium (half-duplex) RS485 communications.
This feature is available on all imp modules.
impOS 34 adds support for setting static network configurations and connecting to the Internet via a proxy server. To facilitate both approaches, the existing imp API method imp.clearconfiguration() has been updated to support clearing all or some of the device’s stored network settings, including the device’s Electric Imp impCloud™ enrollment data. This latter feature is optional and has been implemented to allow, for example, customers to pre-enroll production devices in the factory in order that those devices then require only connection credentials to go online in end-user premises.
In addition, the imp API method server.connect() has been updated to accommodate two new codes that may be passed into the reason parameter of the callback function registered using server.connect(). These are NO_PROXY and NOT_AUTHORISED — either the proxy’s address/port are wrong, or incorrect access credentials have been supplied.
These features are available on all imp modules (Ethernet available on imp005 only).
HTTP Connect proxy server access can be configured using the new imp API method imp.setproxy(). A device’s first connection must be made directly, but once the above method is called in device code, all subsequent connections will be made through the proxy.
There are two addition BlinkUp LED codes arising from proxy usage, one signalling an incorrect server address or port, the other incorrect login credentials.
The new imp API method imp.setstaticnetworkconfiguration() allows code to fix the device’s IP address, subnet mask, gateway address and 1-2 DNS server addresses. The new settings will be applied whenever the device next connects to the server. If the device is already connected when the settings change, it will need to disconnect first for the settings to be applied at a subsequent connection.
impOS 34 features a new object, net. It is instantiated as a property of the imp object and has a single method, info(), which returns detailed network configuration information, including which WiFi channel the imp may be connected via or, in the case of the imp005, the speed of its Ethernet connection.
Some of this information is available through existing imp methods, though there are some caveats: for example, imp.getmacaddress() only returns an imp005’s WiFi MAC address, which may not be the active network connection.
The imp API now includes the method spi.chipselect() to allow code to control the Chip Select pins provided by the imp005’s two dedicated SPI buses. An error will be thrown if the method is called in code running on other imps.
The imp API’s SPI flash support has been extended with a new method, spiflash.info(). This returns detailed information stored about the imp005’s external SPI flash timings, which are stored by the device manufacturer within the ‘user info’ page within the flash.
Note On the imp005, the flash timings are set by a configuration page entry within the pre-programmed OS image.
The imp003 module now provides twice as much space for Squirrel bytecode than it did under previous versions of impOS. The imp003 now has 256KB program space, like the imp005, up from 128KB (as per the imp001 and imp002).
impOS 34 enables device-level support for Electric Imp Private impClouds — instances of the Electric Imp impCloud that are unique to a specific customer. Private impClouds require that devices be based either on the imp003 or the imp005 modules.
Private impCloud customers will be provided with a secure impOS 34 image to be pre-loaded into the SPI flash at time of manufacture which reassigns the device to the private servers.
"%10f"
).Please see the central Known Issues page.