AT Command NB-IoT

Can anyone share the coding for AT commands for NB-IoT shield?
And also how to determine the RX and TX pin for shield as it is connected directly to Arduino board?

Thanks in advance

There is sketch for testing AT commands here:

The AT command manual can be found here:

If you are using an Arduino board that only has a single UART/Serial (e.g. the UNO) you will have to use a software serial connection. Additionally, you will need to have the shield disconnected and use jumper wires between the required pins.

The schematic can be found here for reference:

You will need to, at minimum wire the 3.3V, GND, D7 pins, as well as the shields RX/TX pins (D0/D1) to the software serial pins on the board you are using.

There are a few other threads on this topic:

Same here with Leonardo board. Sketch upload done. No response on AT commands.

Are you sending both line endings (CR/LF)?

1 Like

The following steps I tried:

  • sketch provided on (same as above)
  • code as provided above
  • change of USB port
  • conmect pins 3.3V, GND, D7
    When submitting AT commands in Serial Monitor, I don’t get any response.

To be honest I don’t really undertstand what you are meaning with line endings? I tried to Google it, but without success. I’m a newbie to Arduino, the Sodaq NB-IoT shield is my first project. Thanks in advance!

At the base of the Serial Monitor dialog window there are a two drop down boxes and one button.

The first drop down box allows you to select what line endings to send. You need to choose the ‘Both NL & CR’ option. The second drop down box is for selecting the baud rate, and the button is to clear the output.

1 Like

What do you mean by this? The example should automatically detect the Leonardo board and use the correct Serial objects. Additionally, if you are using the Leonardo board you should be able to run that test sketch with the shield attached.

Thanks for the support. I succeeded in getting it up and running with the standard sketch provided on I didn’t had to wire 3.3V, GND, D7 pins. In the end it had to do with the drop down: ’ Both NL & CR’. Thanks again.

please ignore this one. I was just trying different things and assuming that it could help switching USB cable to another USB port.

Hi Roel, Can you please share picture of this wiring. Thank you

@Igor, this is the image I tried before. But for the Leonardo it was necessary for me. Please note, I’m a newbie on Arduino, based on the instructions this seemed to me as the most logical way to wire the pins.

1 Like

Thank you, unfortunately I keep failing to get any response from shield.
I did wireing, hope this is OK,

Sketch that I use:
#include <Sodaq_wdt.h>
#include <Arduino.h>
#include <Wire.h>
#include <SoftwareSerial.h> // Uno
#include <Sodaq_nbIOT.h>

#if defined(ARDUINO_AVR_UNO)
SoftwareSerial softSerial(10, 11); // RX, TX
// You can connect an uartsbee or other board (e.g. 2nd Uno) to connect the softserial.
#define SerialOut softSerial
#define UBLOX Serial

#error “Please select a Sodaq ExpLoRer, Arduino Leonardo or add your board.”

#define powerPin 7

void setup()
// Turn the nb-iot module on
pinMode(powerPin, OUTPUT);
digitalWrite(powerPin, HIGH);

// Start communication
SerialOut.println(“Setup Complete! NBIOT is Ready!”);

// Forward every message to the other serial
void loop()
while (SerialOut.available())
uint8_t c =;

while (UBLOX.available())

Why have you connected the 3.3V pin to GND?

I had tried one attempt to get the my arduino and shield working, based on my interpretation of the following quote earlier in this post. But in the end it turned out that my Leonardo was a ‘dead on arrival’, so I received a new aone. And now it works fine without wiring pins.

Those instructions were for a disconnected shield where none of the pins are connected.
Specifically you would need to connect these pins i.e.:

  • Connect the board’s 3.3v to the shield’s 3.3v pin.
  • Connect the board’s GND to the shield’s GND pin.
  • Connect the board’s D7 to the shield’s D7 pin.
  • Connect the assigned software serial assigned IO pins on the board to D0/D1 on the shield.


So in case we connect shield with board it will not work ?

It depends on the board and how you are using it.

If you don’t need to send anything to the serial monitor, it should work fine connected to most if not all boards.

If you are using a pass-through sketch from the serial monitor to the NB-IoT, you may have issues with some boards which only have one Seria/UART (such as the UNO). In such cases you will need to disconnect the shield and wire the NB-IoT via software serial.

I want to use Arduino Uno with one sensor (any sensor) and transfer data via NBIoT, just that. Use AT commands ofc. for seting the APN …

Have a look in the NB-IoT category on this forum. There are several threads already on this topic.