Workshop 2: IMSI and IMEI
The next step is to load a sketch that allows you to send AT (attention) commands directly to the modem on the board.
Load the following sketch and upload it to your device.
// baud rate used for both Serial ports
unsigned long baud = 115200;
void setup() {
// reset the ublox module
pinMode(SARA_RESETN, OUTPUT);
digitalWrite(SARA_RESETN, HIGH);
delay(100);
digitalWrite(SARA_RESETN, LOW);
Serial.begin(baud);
SerialSARA.begin(baud);
}
void loop() {
if (Serial.available()) {
SerialSARA.write(Serial.read());
}
if (SerialSARA.available()) {
Serial.write(SerialSARA.read());
}
}
Open the serial monitor and type the following command to get the IMSI
and IMEI
numbers.
If you’re not getting any output, check that you have the correct baud
-rate and new line / carriage return
setting.
Leave the serial monitor open
You’ll need to copy these numbers when we provision the device in MIC.