Deviceid of imp006c

If an imp006c variant is being considered (BG96 but no WiFi module), will imp.configparams.deviceid have a valid and unique value? The reason I ask is that the past ids have been based on MAC addresses and it wasn’t clear to me that a solely BG96 based unit will have one.

thanks!

Also, with each of the imp006 variants, will they return a distinct value (“imp006a” etc) when I use imp.info().type? Or will I just get “imp006” every time?

A device’s ID is always unique, and that’s true of the imp006 variants too, though there’s an identifying prefix: see https://developer.electricimp.com/hardware/imp/imp006_hardware_guide#imp006-variants

To answer your second question, no, the type value does not indicate the imp006 variant, so you’d have to use:

local impType = imp.info().type;
local devID = hardware.getdeviceid();
server.log("imp: " + impType.slice(3));
server.log("variant: " + (impType == "imp006" ? devID.slice(3,4): "imp has no variants"));

The MAC address on any imp006 doesn’t come from the wifi module - it’s a property assigned to the STM32.

Hence, an imp006c still has a mac address assigned, so it looks like imp006a/imp006b in that sense.

This topic was automatically closed after 60 days. New replies are no longer allowed.