SMS send but no receive.. the available() function takes forever

I am able to send sms messages with the 1500. I am using speedtalk SIM. The available() function just takes forever and never returns any results...not even a value. I am using the examples.. again send works fine, but the available does not get any messages.

Is there a trick to this? I simply have the 1500, a 3.7v battery, the antenna.

Are there some commands I can run to ensure it is listening?

Please post your full sketch following the advice in How to get the best out of this forum regarding code tags

Sure. its just the sample. I added my arn and that's it. The available call takes minutes to return and always returns zero.. even though there are messages sent to the number from my regular phone. The send example works fine and I can get messages on my regular phone from the NB.

Any suggestions appreciated.

Also this board freezes a lot.. just hangs.. a lot.. like it gets stuck or something. I Read in the forum it is a common issue and the fix is to do some set of steps to up date the firmware.. but I assume since this board is like 1 week old it has the latest.

Any suggestions are apprecaited.

/*
 SMS receiver

 This sketch, for the MKR NB 1500 board, waits for a SMS message
 and displays it through the Serial port.

 Circuit:
 * MKR NB 1500 board
 * Antenna
 * SIM card that can receive SMS messages

 created 25 Feb 2012
 by Javier Zorzano / TD
*/

// include the NB library
#include <MKRNB.h>

#include "arduino_secrets.h" 
// Please enter your sensitive data in the Secret tab or arduino_secrets.h
// PIN Number
const char PINNUMBER[] = SECRET_PINNUMBER;
const char APN[] = "mobilenet";
// initialize the library instances
NB nbAccess;
NB_SMS sms;

// Array to hold the number an SMS is retrieved from
char senderNumber[20];

void setup() {
  // initialize serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  Serial.println("SMS Messages Receiver");

  // connection state
  bool connected = false;

  // Start GSM connection
  while (!connected) {
   if (nbAccess.begin(NULL, APN, true, true) == NB_READY) {
      connected = true;
    } else {
      Serial.println("Not connected");
      delay(1000);
    }
  }

  Serial.println("NB initialized");
  Serial.println("Waiting for messages");
}

void loop() {
  int c;

  // If there are any SMSs available()
  if (sms.available()) {
    Serial.println("Message received from:");

    // Get remote number
    sms.remoteNumber(senderNumber, 20);
    Serial.println(senderNumber);

    // An example of message disposal
    // Any messages starting with # should be discarded
    if (sms.peek() == '#') {
      Serial.println("Discarded SMS");
      sms.flush();
    }

    // Read message bytes and print them
    while ((c = sms.read()) != -1) {
      Serial.print((char)c);
    }

    Serial.println("\nEND OF MESSAGE");

    // Delete message from modem memory
    sms.flush();
    Serial.println("MESSAGE DELETED");
  }

  delay(1000);

}

Try out with downgrade the board core to 1.8.9. SMS sketch is not working with 1.8.11

man you expect me to know how to do that?? :slight_smile: .. haha.. I will google and see

:sunglasses: Sure i do! Just ->tools -> board -> board manager (or so, im not english) and then Arduino SAMD 21 and choose the version. Easy as a summer breeze.
It takes a while to change the core(up to 10 min) BE PATIENT, don't stop that procedure.
Then recompile your sketch and i think it will work.

I have the same problem, did you have any success?

Modem firmware is up to date?

See

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.