RoadTest: Microchip AVR-IoT Cellular Mini Dev Board for LTE-M and NB-IOT Prepaid SIM
Author: janholtzhausen
Creation date:
Evaluation Type: Development Boards & Tools
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: Renesas CAT-M1 Cloud Kit CK-RA6M5
What were the biggest problems encountered?: Truphone SIM activation
Detailed Review:
A well-engineered and capable device, with the complete experience marred by some unpolished processes.
RoadTest: AVR-IoT Cellular Mini
Author: Jan Holtzhausen
Creation date: 8 October 2022
Evaluation Type: IoT cellular Equipment
Did you receive all parts the manufacturer stated would be included in the package?: Yes
What other parts do you consider comparable to this product?: Any one of many of other Microcontroller / LTE combination solutions
What were the biggest problems encountered?: Registration of the partner SIM from my location was impossible, and ultimately pointless.
Since this is my first road-test I have (over) documented everything, so please feel free to skip over any bits that seem like TMI.
The device arrived properly packed with all the bits inside that I was led to expect, no problems there.
I won’t repeat the information that is freely available from:
https://www.microchip.com/en-us/development-tool/EV70N78A
Suffice to say the hardware reference is well detailed with excellent schematics and links to everything needed to get started.
With device connection via USB-C cable (not included), we immediately get a virtual storage device (more on this later) with useful links included:
Clicking on ‘CLICK-ME.HTM’, gets you to a device selector:
This leads to a very useful step by step guide on a path that SHOULD lead to AWS sandbox goodness:
So far so good, everything happens as expected.
A Sign-Up dialog with live password compliance indicators, always a nice touch
I encountered the first sign of issues to come at this point. ‘Something went wrong’ is not a useful error message, ever.
However, I decided to proceed as if my registration with Truphone has succeeded, and I guess it must have, since I got to the next step.
Yup, my email is registered on their system, and I have a profile to check.
OK, time to activate:
Now, time to check that my country is included, otherwise this would have been a waste of time:
(See that little hotjar dialog box in the bottom right corner? I wished for it later)
And finally, I need to activate this SIM I have registered, and I’m afraid that this is where the Truphone part of the solution fails:
( 3 Different browsers, VPN connections to 2 countries, and still a redirect loop between and istio.envoy instance and an nginx service)
A brief flurry of emails between myself, Randall from Element14 and a co-roadtester (I’m not sure if I’m allowed to mention him by name, so I won’t), resulted in the SIM getting activated for me remotely.
This was a bit jarring, considering how the rest of the road-test was progressing, and I hope that Truphone can get this sorted out.
NOTE:
That (VERY) briefly documents the frustrating part of the road test, please feel free to forget all about it (I am trying my very best to do the same)
The device has a built-in on-board programmer that links to the mass storage interface, meaning that new firmware can be deployed by simply copying a hex file to the FAT16 filesystem (very slick Microchip, lets hope other manufacturers learn and follow suite)
I went ahead and checked if the AWS sandbox via LTE registration works as advertised… it does:
I really wanted to road-test this device because I have an idea for a project that involves controlling mechanical relays via SMS.
This means that the sandbox example, and all that shiny AWS / MQTT / HTTP and other packet over LTE technology magic is pretty much overkill for what I need. This also means that all that malarky with the Truphone SIM was pointless, since the MSISDN is registered in the UK, and I have NO idea how to get it to work with my local mobile provider SMSC. In addition, my local mobile provider has a great pre-paid product that allows unlimited SMS sending (allegedly, I think I broke it), and truly unlimited SMS reception.
I bought and registered a pre-paid SIM, stuck it into the device, and everything just worked.
My preferred MCU development solution is Platformio on VSCode, but I gave up early on getting this to work, as the project is simply not complex enough to be worth the hassle.
(There is a better than 0% chance I was just doing something stupid here)
I switched to good (?) old Arduino, installed the libs as recommended in the getting started guide, and started writing some truly awful C++.
The html time example worked perfectly
All AT commands for the Monarch Cellular Modem required for SMS work as documented in: https://docs.pycom.io/gitbook/assets/Monarch-LR5110-ATCmdRefMan-rev6_noConfidential.pdf
Now the actual code for a demo:
(Please Note: This is not pretty, or even very good C++, it’s PoC code hacked together to see if the device works, please don’t judge me, and feel free to improve on it, as long as you share)
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /* SMSLED Selectively switch on AVR-IoT Cellular Mini LEDs by means of SMS by Jan Holtzhausen – 08/10/2022 This example code is free to use for non-commercial testing. */ #include <Arduino.h> #include <log.h> #include <led_ctrl.h> #include <sequans_controller.h> #define SerialDebug Serial3 unsigned int messageLength; char sendBuff[128]; char receiveBuff[384]; int i; String startMsg; String getSMS () { String SMSreceived = ""; String message = "AT+SQNSMSLIST\r\0"; messageLength = (message.length() + 1); message.toCharArray(sendBuff, messageLength); SequansController.writeBytes((const uint8_t*)sendBuff,messageLength,1); SequansController.readResponse((char*)receiveBuff,17); int smsSwitch = receiveBuff[15]; SerialDebug.println(smsSwitch); if (smsSwitch == 49) { delay(1000); SequansController.clearReceiveBuffer(); memset(receiveBuff, 0, sizeof(receiveBuff)); message = "AT+SQNSMSREAD=1\r\0"; messageLength = (message.length() + 1); message.toCharArray(sendBuff, messageLength); SequansController.writeBytes((const uint8_t*)sendBuff,messageLength,1); SequansController.readResponse((char*)receiveBuff,120); for (i=106; i<120; i++) { SerialDebug.write(receiveBuff[i]); SMSreceived.concat(receiveBuff[i]); } } for (i=1; i<10; i++) { message = "AT+SQNSMSDELETE="; message.concat(String(i)); message.concat("\r\0"); messageLength = (message.length() + 1); message.toCharArray(sendBuff, messageLength); SequansController.writeBytes((const uint8_t*)sendBuff,messageLength,1); delay(500); } SequansController.clearReceiveBuffer(); memset(receiveBuff, 0, sizeof(receiveBuff)); SerialDebug.println(SMSreceived); return SMSreceived; } void sendtoModem (String message) { SequansController.clearReceiveBuffer(); memset(receiveBuff, 0, sizeof(receiveBuff)); message.concat("\r\0"); messageLength = (message.length() + 1); message.toCharArray(sendBuff, messageLength); SequansController.writeBytes((const uint8_t*)sendBuff,messageLength,1); } void setup() { Log.begin(115200); LedCtrl.begin(); LedCtrl.startupCycle(); SequansController.begin(); delay(10000); sendtoModem("ATE0"); startMsg = "AT+SQNSMSSEND=\"+123NOSPAMFORME321\",\"SPiTE Activated\""; sendtoModem(startMsg); } void loop() { SequansController.clearReceiveBuffer(); memset(receiveBuff, 0, sizeof(receiveBuff)); String SMSmessage = getSMS(); SMSmessage.trim(); if (SMSmessage.startsWith("SPiTE")) { String currentLED = SMSmessage.substring(6); currentLED.trim(); SerialDebug.println(currentLED); LedCtrl.beginManual(); switch (tolower(currentLED[0])) { case 'b': SerialDebug.println("make it blue"); LedCtrl.toggle(Led::CELL, 0); break; case 'g': SerialDebug.println("make it green"); LedCtrl.toggle(Led::CON, 0); break; case 'y': SerialDebug.println("make it yellow"); LedCtrl.toggle(Led::DATA, 0); break; case 'r': SerialDebug.println("make it red"); LedCtrl.toggle(Led::ERROR, 0); break; default: SerialDebug.println("I dunno what to do!"); break; } } delay(5000); } // ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
A very capable device, with documentation and examples of a very high standard for a new product. With competitive volume pricing this could easily fit the requirements for various IoT projects that require mobile & miniaturized application