I adapted the code for the Arduino UNO in use according the advice above.
I added an USB Serial adapter using pins 10, 11, GND to another USB port on the same PC, opened another Serial Monitor from a second IDE instance on the new serial port to watch the SoftwareSerial DEBUG_STREAM messages.
Testprogramma:
Download van: https://github.com/janvl1234/Sodaq_NBIoT_examples
HTS221_HumidityTemperature_nbiot.ino
uit: Sensors_NB-IoT
Added code:
#include <SoftwareSerial.h>
#elif defined(ARDUINO_AVR_UNO)
SoftwareSerial softSerial(10, 11); /// RX, TX
#define DEBUG_STREAM softSerial
#define MODEM_STREAM Serial
// while (!DEBUG_STREAM);// Wait for serial monitor
I cannot upload a new program to the Arduino Uno without first removing the Sodaq NB_IoT shield. Is that normal? Is that also true for other Arduino types?
I doubt my Sodaq will last long when I have to remove the shield before any software update. Is that really what I have to do all the time?
Error shown:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xba
2 The DEBUG_STREAM shows:
SODAQ HTS221 Arduino Example
AT+CFUN=0
AT+CGDCONT=1,"IP","oceanconnect.t-mobile.nl"
[rdResp]: OK
AT+NCDP=172.16.14.20
[rdResp]: OK
AT+NSMI=0
[rdResp]: OK
AT+NNMI=0
[rdResp]: OK
AT+CFUN=1
[rdResp]: OK
AT+COPS=1,2,"20416"
[rdResp]: OK
AT+CSQ
[rdResp]: +CSQ:99,99
[rdResp]: OK
AT+CSQ
[rdResp]: +CSQ:99,99
[rdResp]: OK
************* 14 keer in totaal ***************
Failed to connect!
Serial Monitor of MODEM_STREAM (after each other not on separate lines):
AT
AT
AT
AT+CFUN=0
AT+CGDCONT=1,"IP","oceanconnect.t-mobile.nl"
AT+NCDP=172.16.14.20
AT+NSMI=0
AT+NNMI=0
AT+CFUN=1
AT+COPS=1,2,"20416"
AT+CSQ
********** 14 keer ************
AT+CSQ
AT+CSQ
So looking at the meaning of the AT commands: the Sodaq NB_IoT board does not get a connection to the network. Signal strength stays on 99,99.
3 Should I be able to enter AT commands from the Command line box at the top of the Serial Monitor?
What is wrong:
1. on my setup using the Arduino Uno?
2. on the standard software installation?
3. on the hardware of the NB_IoT?
What is it I could try further?
Thanks in advance for your help. I know I am asking several questions in one message ...
Franz