Getting up to speed on the Arduino MKR 1400. It’s an acceptable substitute right now for the Dash, and hopefully will allow a smooth transition to the MKR 1500 and its CAT M1 modem.
So far, I’ve managed to establish two-way communication between the board and the Hologram cloud.
However, on the Dash it was possible to use a common code base for multiple devices, since no key was required to connect to Hologram. Using the MKR 1400, the GPRS credentials require a device key, so a common code base is not immediately possible, it seems, since each device needs to have the device key hardcoded in.
Does anyone have any thoughts on how I might get around this, i.e., use a common code set so I can use the same software for multiple Arduino units?
You can SMS the device id and device key to your MKR 1400/1500. Your common code will have to look for an SMS and save the required parameters to non-volatile memory but then you have a common code base that only requires configuration. Alternatively you can send it the information over serial during device boot (again writing to non volatile memory after receipt).
I prefer the SMS since you you don’t need the device in hand to set / reset / update the configuration information. You can use the hologram api or dashboard to lookup the device ID and device key and to send a text, something like “deviceid=XXXXXX,devicekey=YYYYYYY”. Your code would then parse the string and if it it has the correct format, update the configuration and if it doesn’t, then ignore . You could immediately send a cloud message after receipt of a valid text message to know it all worked (just as an example, many ways to do this).
I believe the dash used Hologram’s multi factor authentication to communicate with the cloud. This eliminates the “text device credentials” step but is definitely more complex to implement in the software.