Read IMEI

From openPicus Wiki
Jump to: navigation, search

Contents

What you are going to learn

This tutorial shows how to read GPRS Modem IMEI on taskFlyport.c file.

Introduction

Each Flyport GPRS module has a unique and univocal IMEI number. You can read this number using the function GSMGetIMEI

How to use it

You simply have to create a new project, and add the few lines shown above in the code example. Compile and download firmware on Flyport, and you will see IMEI number printed on serial monitor of IDE.
NOTE: Remember to open the Serial Monitor utility on the IDE to have a feedback. On the Serial Monitor you will see also other debug messages. Those messages can be disabled using the Wizard of the IDE (unchecking "Debug messages on UART1").

Code example

Code changes for taskFlyport.c:

Add this line of code in your taskFlyport.c file. It is suggested to add this code before while(1) loop.

	char* myIMEI;
	myIMEI = GSMGetIMEI();
	UARTWrite(1, "MY IMEI: ");
	UARTWrite(1, myIMEI);
	UARTWrite(1, "\r\n");
 
	while(1)...
Personal tools
Namespaces

Variants
Actions
START HERE
DEVELOPMENT
HARDWARE INFO
RESOURCES
PHASED OUT
Toolbox