Go Down

Topic: MKR NB 1500 Serial1 stops working when Sara R410 modem is activated (Read 456 times) previous topic - next topic

arneme

While trying to measure the power consumption of the MKR NB 1500 with Quoitech Otii (https://www.qoitech.com/) I have noticed that when using the MKRNB library Serial1 (on pin 13/14) stops working. My plan was to send debug output to OTII while testing different power reduction methods (SAMD21 LowPower library, PSM options for the Sara modem, etc). Is this by design (i.e. does the serial connection to the Sara modem use pin 13/14) or is it a bug? Anyone else that has experienced something similar?


pert

#1
Mar 25, 2019, 10:55 pm Last Edit: Mar 27, 2019, 09:38 am by pert Reason: Fix code tags markup
Please provide a minimal sketch that demonstrates the issue. I tried this super minimal code:
Code: [Select]
#include <MKRNB.h>
void setup() {
  Serial1.begin(9600);
}
void loop() {
  Serial1.println("hello");
  delay(1000);
}

and Serial1 is still working fine. Unfortunately, I don't have a SIM card for my MKR NB 1500 yet so I'm a bit limited in what I can do with the communication aspects of the board.

does the serial connection to the Sara modem use pin 13/14
No, nothing else is connected to those pins. The SAMD chip has enough extra pins that it doesn't much need to use the ones broken out to the headers for other purposes.

arneme

Hm, hope you are right. The problem with no output to Serial1 only happens after nbAccess.begin() has been called so without a SIM card you will not be able to test to see if you experience the same problem.

The other option is that the call to nbAccess.begin() never returns but the same code is running fine if I power the MKR1500 from the 5V USB port on my MAC (as opposed to powering it on the battery + PIN and ground with the OTII) and also do serial output to Serial (i.e. I can see the output of Serial.println() statements in the serial monitor).

pert

That's unfortunate. I've been meaning to figure out what a good option is for getting my MKR NB 1500 and my MKR GSM 1400 on the network but haven't gotten around to it yet.

Would this work as a minimal demonstration sketch?:
Code: [Select]
#include <MKRNB.h>
const char PINNUMBER[] = "";
NB nbAccess;

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  Serial1.begin(9600);
  nbAccess.begin(PINNUMBER)
}

void loop() {
  Serial1.println("hello");
  digitalWrite(LED_BUILTIN, HIGH);
  delay(500);
  digitalWrite(LED_BUILTIN, LOW);
  delay(500);
}


If so, a blinking LED will tell you that nbAccess.begin() did return.

Go Up