Files
pycom-documentation/content/tutorials/networks/lte/imei.md
gijsio 9a0602f9e5 Restructure, rev1
* Products
    -> updated with new products
    -> added accessories
* Getting started
   -> re-structured getting started guide
   -> removed some of the advanced stuff
* Tutorials / Examples
   -> added categories
   -> added new basic tutorials Sleep, GPIO and Pring
   -> added WiFi ap / sta tutorial
   -> added wifi Scan MAC tutorial
* Firmware API
   -> added pysense pytrack pygate categories here
* Datasheets
   -> added CE FCC and RoHS documents
   -> added pysense2 and pytrack 2 templates
* Update firmware
   -> new section, added all methods of updating the firmware
* License
   -> put license in its own section

general remarks:
-> updated the layout / theme
   no more red code text
   codeblocks actually work now
-> general layout updates, removed the old html structures (mostly)
2020-07-09 12:57:44 +02:00

872 B

title, aliases
title aliases
Module IMEI
tutorials/lte/imei.html
tutorials/lte/imei.md
chapter/tutorials/lte/imei

In order to retrieve the IMEI of your cellular enabled Pycom module you will firstly need to make sure you are on firmware version 1.17.0.b1 or higher. You can check your firmware version by running the following code on you device via the interactive REPL.


>>> import os
>>> os.uname()
(sysname='GPy', nodename='GPy', release='1.17.0.b1', version='v1.8.6-849-d0dc708 on 2018-02-27', machine='GPy with ESP32')

Once you have a compatible firmware, you can run the following code to get your modules IMEI number:


from network import LTE
lte = LTE()
lte.send_at_cmd('AT+CGSN=1')

You'll get a return string like this \r\n+CGSN: "354347xxxxxxxxx"\r\n\r\nOK. The value between the double quotes is your IMEI.