NB MKR 1500 - modem testing


I am trying to test NB MKR 1500. I am using https://www.arduino.cc/en/Tutorial/MKRNBToolsTestModem test code.

This is what I get:

"Starting modem test...ERROR, no modem answer.
Checking IMEI...Error: Could not get IMEI

I have a working NB SIM card inside and also external antenna.

Do I have to program the modem also some way or am I missing something?

Just got my MKR NB 1500 board and getting the same printout as stepone...

1 Like

I’m still waiting to get mine (due to arrive Tuesday), but do you have a battery plugged in, or trying to run strictly on USB power? If not, try with battery also.

I’m still waiting to get mine (due to arrive Tuesday), but do you have a battery plugged in, or trying to run strictly on USB power? If not, try with battery also.

How and where do I put the battery?


Battery (5V-6V) is to GND+VIN pins. But then you loose serial, right? How to get Serial then? :slight_smile: As it seems USB+VIN power both is not supported for the board to keep using the USB for Serial...

the Documentation tab on this product page describes this powering with pins:

4xAA batteries though may produce 6,3V, so that sounds to me a bit risky when 6V is max the board tolerates... Not sure if that's ok or not (would be nice if Arduino team could confirm if 4xAA is ok), did not dare to test.

But really, the USB should be working for this, just does not seem to be very stable with those tutorial examples at least. And I got the IMEI with another computer now finally, and with Desktop IDE. Did not get it at home computer during the weekend. Will comment later more, when I get more experience. Some room for improvement for the board it seems to get it more stable.

Now got it working! With different computer and still with USB (making also sure no USB hubs used). Used Desktop IDE (used Boards manager to have MKR1500 and installed MKRNB library).

Then used this tutorial: https://www.arduino.cc/en/Tutorials/NBRATConfig.

And got it working! But man it was a long road. Experience from my friednw ho got it working few days before, that it's sometimes not working at all and when get to work again, then it runs in stable way when not switched off.

Next need to try with the original computer again. In dev mode and for debugging, would need USB for serial, even in long term probably with battery will be the way forward powering it when it has network connectivity.

Now got it working! With different computer and still with USB (making also sure no USB hubs used). Used Desktop IDE (used Boards manager to have MKR1500 and installed MKRNB library).

Then used this tutorial: https://www.arduino.cc/en/Tutorials/NBRATConfig.

And got it working! But man it was a long road. Experience from my friednw ho got it working few days before, that it's sometimes not working at all and when get to work again, then it runs in stable way when not switched off.

Next need to try with the original computer again. In dev mode and for debugging, would need USB for serial, even in long term probably with battery will be the way forward powering it when it has network connectivity.

I get it to working also. Changed to MacBook and clean install of Arduino.

I ran the modem testing and it works now.

But I get this with https://www.arduino.cc/en/Tutorial/MKRNBToolsTestGPRS That "AT+CEREG? +CEREG: 0,2" is repeating and not changing. Any ideas?

18:14:00.324 -> NB IoT/LTE Cat M1 networks scanner
18:14:03.259 -> AT

18:14:03.259 -> OK
18:14:03.364 -> AT+CPIN?

18:14:03.364 -> +CPIN: READY
18:14:03.364 ->
18:14:03.364 -> OK
18:14:03.583 -> AT+UDCONF=1,1

18:14:03.583 -> OK
18:14:03.761 -> AT+CTZU=1

18:14:03.761 -> OK
18:14:03.970 -> AT+CEREG?

18:14:03.970 -> +CEREG: 0,2

How and where do I put the battery?

Using the JST PHR2 type connector as specified here.... https://store.arduino.cc/usa/arduino-mkr-nb-1500

"Battery connector: If you want to connect a battery to your board be sure to search one with female 2 pin JST PHR2 Type connector.Polarity : looking at the board connector pins, polarity is Left = Positive, Right = GNDDownload here the Connector datasheet. On the board, connector is a Male 2pin JST PH Type."

I have finally receive my MKR NB 1500 and cannot seem to get everything working. Plugged into a Windows 10 pc, when I load the TestModem sketch, it gives me an error message that...
"Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload." However, when I click on the Serial Monitor, the sketch runs and reports that Modem is "Functioning properly"
Same deal on the ChooseRadioAccess Technology. Says it cannot find the board, but the sketch seems to run properly and accepts my 0-4 selection. (I'm selecting 3)
However, when I run the NBScanNetworks, or TestGPRS, the sketch seems to start with "NB IoT/LTE Cat M1 networks scanner" or "Connecting NB IoT / LTE Cat M1 network...", but then nothing else after that.
Edited to Add:
I purchased two boards, so I switched to the 2nd board, and am no longer getting the cannot find board error. But still no results after the modem test and RAT choice. I did check on the Hologram web site, and can see where my SIM was live for a moment.
Edited again to Add: Don't know what I did, but things started working.....
Current carrier: AT&T Hologram
Signal Strength: 99 [0-31]
Scanning available networks. May take some seconds.

313 100
311 480

Thanks, Steve.

Hi... Doing the NBScanNetworks on my PC It works occasionally. its very unstabil...

13:12:25.267 ->
13:12:25.267 -> OK
13:12:25.473 -> AT+CEREG?

13:12:25.473 -> +CEREG: 0,2
13:12:25.473 ->
13:12:25.473 -> OK
13:12:25.677 -> AT+CEREG?

13:12:25.677 -> +CEREG: 0,2
13:12:25.677 ->
13:12:25.677 -> OK
13:12:25.883 -> AT+CEREG?

13:12:25.883 -> +CEREG: 0,1
13:12:25.883 ->
13:12:25.883 -> OK
13:12:25.883 -> Modem IMEI: AT+CGSN

13:12:25.917 -> 352753090888536
13:12:25.917 ->
13:12:25.917 -> OK
13:12:25.917 -> 352753090888536
13:12:25.917 -> Current carrier: AT+COPS?

13:12:25.917 -> +COPS: 0,0,"Telia Telia",9
13:12:25.951 ->
13:12:25.951 -> OK
13:12:25.951 -> Telia Telia
13:12:25.951 -> Signal Strength: AT+CSQ

13:12:25.951 -> +CSQ: 26,99
13:12:25.951 ->
13:12:25.951 -> OK
13:12:25.951 -> 26 [0-31]

CEREG: 0,1 indicated

EPS registration status:
• 0: not registered, the MT is not currently searching an operator to register to
• 1: registered, home network
• 2: not registered, but the MT is currently trying to attach or searching an operator to register to
• 3: registration denied
• 4: unknown (e.g. out of E-UTRAN coverage)
• 5: registered, roaming

It seems that the Tool example codes are not quite well fit to the MKR1500, at least for my MKR1500 board. It helps when adding 10 second delay in the beginning of the loop e.g. to the modemtest code example. the IMEI does not seem come up otherwise.

Hi, this board seems quite frustrating.
Tried to get the basic tests working without any success.

For a hardware which should run for years in the field this does not look good.

Can someone verify this simple sketch is working ?

void setup() {
digitalWrite(SARA_RESETN, HIGH);
digitalWrite(SARA_RESETN, LOW);


void loop() {
if (Serial.available()) {

if (SerialSARA.available()) {

I found it here:
Entering an AT command should get an response from the ublox modem.

Thanks !

Hi Jausenbrett,

I tried, and cannot get either any response. did get the NTP example running sometimes though, but that is also stopping to react, sometimes after 3 packets, sometimes after 10 minutes. And my other testing has been also with similar outcome.

** Seems like if the interaction between the Arduino and the uBlox chip would not be stable. Sometimes it works, sometimes it doesn't. **

The Arduino part itself works flawlessly, but when trying to communicate with the uBlox chip, it's not consistent. E.g. on Saturday I could get it working only one specific Laptop (USB with power-output for charging), but not on another computer (both running Win10) and neither when running power with pin power (VIN+GND), nor over usb powerbank. Then when changing to this same one laptop again, then it was working like fully normal again. Then disabled all serial printouts and complied again - then it (code with communication with uBlox) started to work fine. But only for some time, now again having some issues.

How is it going with @Stepone? And actually the battery is to the 2-pin whitebrown adapter (next to AREF pin), though power can be given from VIN+GND, but then after 20minutes the CHRG starts to blink to complain. but running with USB all should be working fine, but seems not to be doing so in stable way...


I have been trying all kinds of different samples and code for the MKR 1500 with very poor results. So far I have tried (using Arduino IDE 1.8.8):

A new MKR 1500 with antenna and a connected Li-Po (LI-PO 503562 1200mAh 3.7V 4.44Wh). With this I was able to run ChooseRadioAccessTechnology. Here I choose 1 for NB-IoT only. This worked with success but afterwards I was not able to talk with the modem (can’t get past "while (!MODEM.noop()); - I think the problem is SerialSARA.flush() hangs”). I tried writing to support and after a couple of days they decided to send me a replacement MKR 1500.

I have now tested the new replacement MKR 1500 that they sent me, but unfortunately I have the same problems :frowning: This time I tested without the Li-Po connected (just USB), but still with an antenna. Like the first time I was able to run ChooseRadioAccessTechnology and select 1 for NB-IoT only. After this I tried the TestModem sketch and it returned completely random results. A couple of times it all worked (got the correct IMEM) and then it all failed (e.g. could not talk to modem) - no pattern. I have tried to add delay()’s of 10-20 s before modem calls, but have not found a way that makes it work every time. Then I tried to remove the SIM and insert it again (just testing). Now nothing is working (can’t run the ChooseRadioAccessTechnology sketch) :frowning: Exactly as with the first MKR 1500 board.

(Arduino sketches that does not talk to the modem works without problems.)

I really do not know what to do now… anyone?

Kind regards,

Anders Sejersbøl


Actually, this may be useful to debug, e.g. if you use the NTP example (https://www.arduino.cc/en/Tutorial/MKRNBExamplesGPRSUdpNtpClient):

NB nbAccess(true);

I.e. you set true parameter, then you should see the AT commands.


Just another update. Sometimes the modem is working and I'm able to shoot AT commands at it. Right now I can do the following (using the SerialSARAPassthrough example):

14:47:04.168 -> AT

14:47:04.168 -> OK
14:47:27.582 -> AT+CGMI

14:47:27.582 -> u-blox
14:47:27.582 ->
14:47:27.582 -> OK
14:47:42.427 -> AT+CGMM

14:47:42.427 -> SARA-R410M-02B
14:47:42.427 ->
14:47:42.427 -> OK
14:47:56.218 -> AT+CFUN=1

14:47:56.218 -> OK
14:48:06.603 -> AT+CFUN?

14:48:06.603 -> +CFUN: 1
14:48:06.603 ->
14:48:06.603 -> OK
14:48:49.375 -> AT+CEREG?

14:48:49.375 -> +CEREG: 0,0
14:48:49.375 ->
14:48:49.375 -> OK
14:49:00.441 -> AT+CEREG?

14:49:00.441 -> +CEREG: 0,0
14:49:00.441 ->
14:49:00.441 -> OK
14:49:28.456 -> AT+CGSN

14:49:28.456 ->
14:49:28.456 ->
14:49:28.456 -> OK
14:49:49.656 -> AT+COPS?

14:49:49.656 -> +CME ERROR: SIM failure
14:51:36.581 -> AT+CIMI

14:51:36.581 -> +CME ERROR: SIM failure
14:51:47.494 -> AT+CGMI

14:51:47.494 -> u-blox
14:51:47.494 ->
14:51:47.494 -> OK
14:53:17.223 -> AT+COPS=?

14:53:17.223 -> +CME ERROR: SIM failure

It looks like a SIM cards failure. However I have inserted the SIM correctly AFAIK. I have a Nano SIM inserted in a Micro SIM converter - chip connectors facing the board and the cut corner towards IO pin 6/7.

I have tried to remove and reinsert the the SIM with no luck.

Kind regards,

Anders Sejersbøl.

I just tried the NTP example with "NB nbAccess(true);" and I got some AT output. I said that there was a SIM card failure... hmmm. However I did not catch the output log at first try and when I tried again it had stoped working (no output at all). This is so frustrating...

UPDATE: Got it working again after some tries. Now I get:

15:14:23.084 -> Starting Arduino GPRS NTP client.
15:14:33.407 -> Not connected
15:14:44.695 -> Not connected
15:14:45.781 -> AT

15:14:45.781 -> OK
15:14:45.923 -> AT+CPIN?

15:14:45.923 -> +CME ERROR: SIM not inserted
15:14:46.101 -> AT+CPIN?

15:14:46.101 -> +CME ERROR: SIM not inserted
15:14:46.318 -> AT+CPIN?

15:14:46.318 -> +CME ERROR: SIM not inserted
15:14:46.525 -> AT+CPIN?

15:14:46.525 -> +CME ERROR: SIM not inserted

Hi guys !

@jamessh, thanks for trying the code.

At least its good to share the pain, i was starting getting paranoid...

I will also give the NTP and SerialSARAPassthrough example a try.

If i remember correctly, the boards are available only since around November 2018, are we having some early adopter issues here ?
Mouser has it only for some weeks now.
I found something more at the Hologram community relating to the buginess of the board and some hints about power consumption/the board only running correctly with additional battery attached.

Hi all,

I also had some problems with the example sketches. I found some challenges with my APN and band configurations by using SerialSARAPassthrough example sketch. I edited the sketch a bit by adding some useful AT commands. Below you can find my debugging tool ->

   DebugATCommandsSARA sketch

   This sketch is modified from SerialSARAPassthrough.

   The sketch allows you to send 15 basic AT commands from the USB CDC serial port
   of the MKR NB 1500 board to the onboard ublox SARA-R410 celluar module.

   If you want to add more commands the list of supported AT commands are found here:

   - MKR NB 1500 board
   - Antenna
   - 1500 mAh or higher lipo battery connected recommended
       - USB seems to have enough power (tested with my PC)
   - SIM card

   Make sure the Serial Monitor's line ending is set to "Both NL and CR"

   create 26 February 2019
   Tomi Sarajisto

// baud rate used for both Serial ports
unsigned long baud = 115200;
char command;

void setup() {
  // reset the ublox module
  digitalWrite(SARA_RESETN, HIGH);
  digitalWrite(SARA_RESETN, LOW);


void loop() {
  if (Serial.available()) {
    command = Serial.read();
    switch (command)
      case '0':
        Serial.println("m: Set verbose error resultcodes");
      case '1':
        Serial.println("1: Check IMEI");
      case '2':
        Serial.println("2: Check IMSI");
      case '3':
        Serial.println("3: Check RAT type config");
      case '4':
        Serial.println("4: Check band configuration");
      case '5':
        Serial.println("5: Check signal");
      case '6':
        Serial.println("6: Check APN configuration");
      case '7':
        Serial.println("0: Check network");
      case '8':
        Serial.println("a: Check all available networks (takes long time)");
      case '9':
        Serial.println("j: Define PDP context");
      case 'a':
        Serial.println("k: Activate PDP context 1");
      case 'b':
        Serial.println("i: Show address of the PDP contexts");
      case 'c':
        Serial.println("n: Open UDP socket");
      case 'd':
        Serial.println("o: Send packet to Ublox's echo server ");
        SerialSARA.println("AT+USOST=0,\"echo.u-blox.com\",13,16,\"16 bytes of data\"");
      case 'e':
        Serial.println("p: Read data from UDP socket");
      case 'f':
        Serial.println("g: Display current configuration");

        // add your own AT commands



  if (SerialSARA.available()) {


Below you can see my configurations ->

13:28:34.754 -> 1: Check IMEI
13:28:34.754 -> AT+GSN

13:28:34.754 -> 35275...... //edited
13:28:34.754 ->
13:28:34.754 -> OK
13:28:35.569 -> 2: Check IMSI
13:28:35.569 -> AT+CIMI

13:28:35.569 -> 23820..... //edited
13:28:35.569 ->
13:28:35.569 -> OK
13:28:36.346 -> 3: Check RAT type config
13:28:36.346 -> AT+URAT?

13:28:36.346 -> +URAT: 8
13:28:36.346 ->
13:28:36.346 -> OK
13:28:37.432 -> 4: Check band configuration
13:28:37.432 -> AT+UBANDMASK?

13:28:37.432 -> +UBANDMASK: 0,132,1,132
13:28:37.466 ->
13:28:37.466 -> OK
13:28:38.217 -> 5: Check signal
13:28:38.217 -> AT+CSQ

13:28:38.217 -> +CSQ: 16,99
13:28:38.217 ->
13:28:38.217 -> OK
13:28:38.895 -> 6: Check APN configuration
13:28:38.928 -> AT+CGDCONT?

13:28:38.928 -> +CGDCONT: 1,"IP","lpwa.telia.iot","",0,0,0,0
13:28:38.928 -> +CGDCONT: 2,"IP","lpwa.telia.iot","",0,0,0,0
13:28:38.928 ->
13:28:38.928 -> OK
13:28:40.995 -> 0: Check network
13:28:41.030 -> AT+COPS?

13:28:41.030 -> +COPS: 0,0,"Sonera Telia",9
13:28:41.030 ->
13:28:41.030 -> OK
13:28:52.785 -> j: Define PDP context
13:28:52.785 -> AT+CGDCONT=1,"IP","lpwa.telia.iot"

13:28:52.819 -> OK
13:28:56.311 -> k: Activate PDP context 1
13:28:56.311 -> AT+CGACT=1,1

13:28:56.311 -> OK
13:28:59.397 -> i: Show address of the PDP contexts
13:28:59.397 -> AT+CGPADDR

13:28:59.397 -> +CGPADDR: 1,
13:28:59.397 -> +CGPADDR: 2,
13:28:59.397 ->
13:28:59.397 -> OK
13:29:01.643 -> n: Open UDP socket
13:29:01.677 -> AT+USOCR=17

13:29:01.677 -> +USOCR: 0
13:29:01.677 ->
13:29:01.677 -> OK
13:29:03.435 -> o: Send packet to Ublox's echo server
13:29:03.469 -> AT+USOST=0,"echo.u-blox.com",13,16,"16 bytes of data"

13:29:04.619 -> +USOST: 0,16
13:29:04.619 ->
13:29:04.619 -> OK
13:29:04.855 ->
13:29:04.855 -> +UUSORF: 0,26
13:29:09.081 -> p: Read data from UDP socket
13:29:09.081 -> AT+USORF=0,26

13:29:09.081 ->
13:29:09.081 -> +USORF: 0,"",13,26,"26 FEB 2019 12:29:04 CET
13:29:09.115 -> "
13:29:09.115 ->
13:29:09.115 -> OK

You can add your own AT commands easily...


I have now tested both with and without a battery connected (LI-PO 503562 1200 mAh) and I definitely see much better stability with a battery connected. However, there is still problems. When I run the TestModem example sketch the IMEI is correctly returned about 80-90% of the time. I do not understand why it does not always work. I have tried adding delay()'s, but can't find a solution that makes it work 100% of the time.

Also, I have SIM card issues that I can't explain:

10:46:59.160 -> AT+COPS?

10:46:59.160 -> +CME ERROR: SIM failure

The SIM card (Nano SIM in Micro SIM converter) is working without any problems in another NB-IoT modem.