Sorry, you need to enable JavaScript to visit this website.

You are here

Arduino MKR 1500 taking too much time to connect

7 posts / 0 new
Last post

Fernando's picture
by Fernando

Arduino MKR 1500 taking too much time to connect
Hi, I am facing an issue here with MKR 1500 and NB-IOT network.  I have a device which needs to check for internet connection very often, but NBAccess.begin takes way too much time to connect. I've been using multiple ways to connect, like:   if ((nbAccess.begin(PINNUMBER,"telstra.m2m") == NB_READY))  {   if ((nbAccess.begin(PINNUMBER,"telstra.m2m") == NB_READY) && (gprs.attachGPRS() == GPRS_READY)) {   if ((nbAccess.begin() == NB_READY))  {   Sometimes I get connection, but very often I am not able to connect and log keeps sending: AT OK AT+CMEE=0 OK AT+CFUN=0 OK AT+CPIN? +CPIN: READY OK AT+CMGF=1 OK AT+UDCONF=1,1 OK AT+CTZU=1 OK AT+CGDCONT=1,"IP","" OK AT+UAUTHREQ=1,0 OK AT+CFUN=1 OK AT+CEREG? +CEREG: 0,0 OK AT+CEREG? +CEREG: 0,2 OK AT+CEREG? +CEREG: 0,2 OK AT+CEREG? +CEREG: 0,2 OK AT+CEREG? +CEREG: 0,2 OK AT+CEREG? +CEREG: 0,2 OK AT+CEREG? +CEREG: 0,2 OK AT+CEREG? +CEREG: 0,2 OK AT+CEREG? +CEREG: 0,2 OK AT+CEREG? +CEREG: 0,2 OK AT+CEREG?   Can someone please help?     

Michelle's picture
by Michelle

FAQ: Arduino MKR 1500 Issues
Hi fernando.miranda, Thanks for reaching out!  If you've got a question on the Arduino MKR NB 1500, check out our FAQ first; https://dev.telstra.com/support/frequently-asked-questions , or join the community with our good friends at Arduino; https://forum.arduino.cc/index.php?board=107.0. Let me know if you can't find what you're looking for there.  thanks, The TelstraDev Team

Nicholas's picture
by Nicholas

Arduino MKR 1500 Debugging

Please run the following script and enter the commands 0-8, a-e in the Serial Console sequentially after the previous command has finished.

Please note: commands "8" and "a" in particular usually take a while to run.

Then send the response you get to telstradev@team.telstra.com, as some of the data returned is semi-sensitive.

This will help us work out what part is not working (e.g. SIM, Hardware, Network, etc).

 

/*
   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:
   https://www.u-blox.com/sites/default/files/u-blox-CEL_ATCommands_%28UBX-13002752%29.pdf

   Circuit:
   - 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() {
  // enable the POW_ON pin
  pinMode(SARA_PWR_ON, OUTPUT);
  digitalWrite(SARA_PWR_ON, HIGH);
  
  // reset the ublox module
  pinMode(SARA_RESETN, OUTPUT);
  digitalWrite(SARA_RESETN, HIGH);
  delay(100);
  digitalWrite(SARA_RESETN, LOW);

  Serial.begin(baud);
  SerialSARA.begin(baud);
}

void loop() {
  if (Serial.available()) {
    command = Serial.read();
    switch (command)
    {
      case '0':
        Serial.println("m: Set verbose error resultcodes");
        SerialSARA.println("AT+CMEE=2");
        break;
      case '1':
        Serial.println("1: Check IMEI");
        SerialSARA.println("AT+GSN");
        break;
      case '2':
        Serial.println("2: Check IMSI");
        SerialSARA.println("AT+CIMI");
        break;
      case '3':
        Serial.println("3: Check RAT type config");
        SerialSARA.println("AT+URAT?");
        break;
      case '4':
        Serial.println("4: Check band configuration");
        SerialSARA.println("AT+UBANDMASK?");
        break;
      case '5':
        Serial.println("5: Check signal");
        SerialSARA.println("AT+CSQ");
        break;
      case '6':
        Serial.println("6: Check APN configuration");
        SerialSARA.println("AT+CGDCONT?");
        break;
      case '7':
        Serial.println("7: Check network");
        SerialSARA.println("AT+COPS?");
        break;
      case '8':
        Serial.println("8: Check all available networks (takes long time)");
        SerialSARA.println("AT+COPS=?");
        break;
      case 'a':
        Serial.println("a: Reset HTTP profile #0");
        SerialSARA.println("AT+UHTTP=0");
        break;
      case 'b':
        Serial.println("b: Set server domain name");
        SerialSARA.println("AT+UHTTP=0,1,\"jsonplaceholder.typicode.com\"");
        break;
      case 'c':
        Serial.println("c: Set to server port 80");
        SerialSARA.println("AT+UHTTP=0,5,80");
        break;
      case 'd':
        Serial.println("d: GET request");
        SerialSARA.println("AT+UHTTPC=0,1,\"/posts/1\",\"get.ffs\"");
        break;
      case 'e':
        Serial.println("e: Read response");
        SerialSARA.println("AT+URDFILE=\"get.ffs\"");
        break;

    }

  }

  if (SerialSARA.available()) {
    Serial.write(SerialSARA.read());
  }

}

 

Zhenglin's picture
by Zhenglin

Hi there,

Hi there,

I came to the same issue. I ran the script and got the following log:

11:08:10.808 -> m: Set verbose error resultcodes
11:08:10.808 -> AT+CMEE=2

11:08:10.808 -> OK
11:08:15.324 -> 1: Check IMEI
11:08:15.324 -> AT+GSN

11:08:15.359 -> 352753096141138
11:08:15.359 -> 
11:08:15.359 -> OK
11:08:24.437 -> 2: Check IMSI
11:08:24.437 -> AT+CIMI

11:08:24.437 -> 505016200112945
11:08:24.437 -> 
11:08:24.437 -> OK
11:08:29.017 -> 3: Check RAT type config
11:08:29.017 -> AT+URAT?

11:08:29.017 -> +URAT: 8
11:08:29.017 -> 
11:08:29.017 -> OK
11:08:34.292 -> 4: Check band configuration
11:08:34.292 -> AT+UBANDMASK?

11:08:34.292 -> +UBANDMASK: 0,275063445663,1,185538719
11:08:34.292 -> 
11:08:34.292 -> OK
11:08:38.728 -> 5: Check signal
11:08:38.728 -> AT+CSQ

11:08:38.728 -> +CSQ: 99,99
11:08:38.728 -> 
11:08:38.728 -> OK
11:08:47.177 -> 6: Check APN configuration
11:08:47.177 -> AT+CGDCONT?

11:08:47.177 -> +CGDCONT: 1,"IP","telstra.iot","0.0.0.0",0,0,0,0
11:08:47.177 -> 
11:08:47.177 -> OK
11:08:59.279 -> 7: Check network
11:08:59.279 -> AT+COPS?

11:08:59.279 -> +COPS: 0,0,"Telstra #StaySafe Telstra",9
11:08:59.279 -> 
11:08:59.279 -> OK
11:09:07.648 -> 8: Check all available networks (takes long time)
11:09:07.682 -> AT+COPS=?

 

-------------------

Then the program was stuck here at step 8, and I waited for more than 10 minutes but no reponse.

Note that I chose NB IoT network only.

If I choose CAT M1, the board works fine. Any suggestion please?

 

Michelle's picture
by Michelle

Selecting the correct Radio Access Technology (RAT)

Hi ZHENGLIN WANG,

The Arduino MKR NB 1500 boards sold on TelstraDev come with Cat-M1 only SIMs, so you will not get a successful connection if you select NB-IoT only as the RAT.

The UBLOX module and Arduino board itself IS compatible for NB-IoT but Telstra has officially certified this device for Cat-M1 only, so we only provide Cat-M1 as default.

 

Does your use case require NB-IoT specifically?

Zhenglin's picture
by Zhenglin

Thanks for reply, Michelle.

Thanks for reply, Michelle. According to my test, I didn't see CAT-M1 has better coverage than general 3G/4G mobile network.

CAT-M1 can't be conncected as well where my phone with Telstra sim card has no reception.

Our application focuses on remote farms, so the network coverage is important.

Any suggestion please?

 

Michelle's picture
by Michelle

NBIoT on Telstra Arduino kits

Absolutely, NB-IOT has a greater coverage area than CatM1 (about 4mill sq km vs 3.5mill) and is well suited to remote, stationary iot deployments. Agritech is a very common use case.

Please send me the details of your SIM card via email and I will get nb-iot activated for you. Please keep in mind that this device is not optimised for nb-iot and we are unable to guarantee support for this case as the device is not certified with Telstra on nb-iot. You may also need to perform a firmware upgrade but you will need to liaise with the u-blox modem support directly as this is not something Telstra can support

Log in or register to post comments