I am working on a project to send sensor data by NB-IoT SIM7020 chip connected to an Arduino UNO. Do you know if there is an existing library which works with Arduino UNO and NB-IoT?
I noticed that MKRNB library works with SAMD21 and is not compatible with AVR uCs. Should I switch to Arduino Zero?
Hi. I'll admit I don't have any experience with NB-IoT. I do know that the MKRNB library is written for Arduino's MKR NB 1500 board, which uses the UBLOX SARA-R410M-02B modem for NB connectivity. So the only way you could use that library is if the AT commands it uses to control the modem just happen to be the same. I took a quick look at the library and chose one command at random: AT+CMGS, which sends an SMS message. I searched the AT command set manual for the SIM7020 and there is no mention of this command. Maybe I happened to pick an unlucky command, but this seems like a bad sign to me. The MKRNB library doesn't seem to written in a manner that would allow you to easily convert it from one AT command set to another.
So this isn't a matter of SAMD vs. AVR. This is a matter of one NB modem vs. another. If you are considering getting a board to try to fix your problem, you might consider just getting a MKR NB 1500. However, it's certainly possible to use your current hardware. I did a quick search and didn't find a library for the SIM7020, but you can control the modem directly from your sketch by simply sending the correct AT commands over a serial connection. I saw there are some tutorials from people who have done projects with the SIM7020 and Arduino so those would be helpful to you.