SODAQ SARA AFF R410M

SODAQ SARA AFF R410M

The SODAQ SARA is a developers board in the standard Arduino formfactor. It comes with a powerful 32 bits microcontroller, two grove sockets to easily connect any sensor, two jst connectors to connect your battery and solar panel, onboard charge circuit, accelerometer, GPS and NB-IoT or Cat M1.

Menu
Getting Started
Features
Pinout
Pin definitions
Schematics
Examples
Passthrough
KPN AT Commands
T-Mobile AT Commands
Vodafone AT Commands
Firmware upgrade ublox R4

Install the latest SODAQ SAMD boardfiles.
See Arduino setup page

Overview Features

Microcontroller ATSAMD21J18, 32-Bit ARM Cortex M0+
Compatibility Arduino M0 Compatible
Size Arduino Uno formfactor, 53.4 x 68.6 mm
Operating Voltage 3.3V
I/O Pins 23
Analog Output Pin 10-bit DAC
External Interrupts Available on all pins
DC Current per I/O pin 7 mA
Flash Memory 256 KB
SRAM 32KB
EEPROM Up to 16KB by emulation
Clock Speed 48 MHz
Power 5V USB power and/or 3.7 LiPo battery
Charging Solar charge controller, up to 500mA charge current
LED RGB LED, LED on D13
NB-IoT uBlox SARA N2XX, R4XX Series
GPS uBlox SAM M8Q
Accelerometer/Magneto LSM303AGR
USB MicroUSB Port

Some things like the onboard LED and the RGB LED are used on multiple boards. To make it more easy you can use the definition name.

Example:
pinMode(13, OUTPUT) and pinMode(LED_BUILTIN, OUTPUT) will do the same.

Pin description Pin number Definition
Red LED D16 LED_RED
Green LED D17 LED_GREEN
Blue LED D18 LED_BLUE
Onboard LED D13 LED_BUILTIN
GPS Enable D26 GPS_ENABLE
Power Pin SARA D27 SARA_ENABLE
Enable Pin SARA D29 SARA_TX_ENABLE
Reset Pin SARA D28 SARA_RESET
GPS Timepulse D25 GPS_TIMEPULSE
MISO (SPI)  D12 MISO
SS (SPI)  D10 SS
MOSI (SPI)  D11 MOSI
SCK (SPI)  D13 SCK
Accelrometer Interrupt 1 D19 ACCEL_INT1
Accelrometer Interrupt 2 D20 ACCEL_INT2
Magnetometer Interrupt D21 MAG_INT
USB Detect D22 USB_DETECT
Status pin Sara D23 SARA_STATUS
Charge Status D24 CHG_STAT

SARA-R3-schematic PDF

        

SARA-R2-schematic PDF

        
SARA-R1-schematic PDF

       

With the passthrough sketch you can send AT commands (NB-IoT) to the ublox module on the Sodaq Sara.

Note that the SARA R410M module has a default baud rate of 115200 bps.

This example doesn’t require any additional libraries.

#if defined(ARDUINO_SODAQ_SARA)
/* SODAQ SARA */
#define DEBUG_STREAM SerialUSB
#define MODEM_STREAM Serial1


#else
#error "Please select the SODAQ SARA as your board"
#endif

unsigned long baud = 115200;

void setup() 
{
pinMode(SARA_ENABLE, OUTPUT);
pinMode(SARA_TX_ENABLE, OUTPUT);
pinMode(SARA_R4XX_TOGGLE,OUTPUT);

digitalWrite(SARA_ENABLE,HIGH);
digitalWrite(SARA_TX_ENABLE,HIGH);
digitalWrite(SARA_R4XX_TOGGLE,LOW);


  // Start communication
  DEBUG_STREAM.begin(baud);
  MODEM_STREAM.begin(baud);
}


// Forward every message to the other serial
void loop() 
{
  while (DEBUG_STREAM.available())
  {
    MODEM_STREAM.write(DEBUG_STREAM.read());
  }

  while (MODEM_STREAM.available())
  {     
    DEBUG_STREAM.write(MODEM_STREAM.read());
  }
}


After uploading the passthrough sketch use the following commands to send a message
These commands communicate on the LTE-M Network of KPN NL

AT+CFUN=15
ATE0
AT+URAT=7
AT+CEREG=3
AT+CMEE=2
AT+CGDCONT=1,"IP","internet.m2m"
AT+COPS=1,2,"20408"
AT+CSQ (Wait for CSQ 99,99 means no signal)
AT+CGATT? (Wait for attach, 1 = attached)
AT+USOCR=17
AT+USOST=0,"YOURUDPSERVERIP",YOURUDPSERVERPORT,4,"Yes!"

After uploading the passthrough sketch use the following commands to send a message
These commands communicate on the LTE-M Network of Vodafone

AT+CFUN=15
ATE0
AT+URAT=7
AT+CEREG=3
AT+CMEE=2
AT+CGDCONT=1,"IP","live.vodafone.com"
AT+COPS=1,2,"20404"
AT+CSQ (Wait for CSQ 99,99 means no signal)
AT+CGATT? (Wait for attach, 1 = attached)
AT+USOCR=17
AT+USOST=0,"YOURUDPSERVERIP",YOURUDPSERVERPORT,4,"Yes!"

After uploading the passthrough sketch use the following commands to send a message
These commands communicate on the NB-IoT UDP Network of T-Mobile NL
Note: Your device must be registered as a UDP device and not as CoAP.

AT+URAT=8
AT+URAT?
AT+CMEE=2
AT+CGDCONT=1,"IP","cdp.iot.t-mobile.nl"
AT+CGDCONT?
AT+CFUN=1
AT+COPS=1,2,"20416"
AT+CSQ
AT+CEREG=2
AT+CEREG?
AT+CGPADDR
AT+USOCR=17
AT+USOST=0,"172.27.131.100",15683,4,"Data"
AT+USOCL=0

After uploading the passthrough sketch use the following commands to send a message
These commands communicate on the NB-IoT Network of Vodafone NL

For Vodafone we have multiple APNs, use the correct APN!
nb.inetd.gdsp –> default external APN
dev.sodaq.com –> early access APN

AT+URAT=8
AT+URAT?
AT+CMEE=2
AT+CGDCONT=1,"IP","nb.inetd.gdsp"
AT+CGDCONT?
AT+CFUN=1
AT+COPS=1,2,"20404"
AT+CSQ
AT+CEREG=2
AT+CEREG?
AT+CGPADDR
AT+USOCR=17
AT+USOST=0,"37.97.216.22",3000,4,"Data"
AT+USOCL=0

Two steps
1. Solder USB cable to SODAQ SARA
2. Update firmware on SARA R410 module

You need:

  • SODAQ SARA Rev2 board
  • 2 USB cables
  • soldering skills
  • Microsoft Windows PC

This was tested with Windows10 and a SODAQ SARA programmed with Factory Test code.

Step 1 Solder USB cable to SODAQ SARA

USB cable PCB Test point name Signal
BLACK GND Ground
GREEN D+ SARA module USB data +
WHITE D- SARA module USB data –
RED SARA USB_DET Applying +5V to this pin enables the SARA module USB interface. NOTE: SARA module uart communication to the microcontroller is disabled while +5V is applied.

Connect both USB interfaces to a PC.

One is to power the SARA module and the other is for firmware update of the SARA module.
In Windows Device Manager the SARA module shows up 4 times as Qualcomm CDMA Technologies MSM
This means that soldering was successful and Windows detected a USB device.

Step 2 Update firmware on SARA R410 module

The USB driver, the firmware update tool (EasyFlash) and the firmware are not publicly available.

To get the latest firmware either contact your u-blox representative directly, or send us an e-mail and we will provide you the download details.

Need Help?

Ask your question on our forum.