Skip to content

Instantly share code, notes, and snippets.

@TurBoss
Created April 17, 2017 13:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save TurBoss/4fb6c6890399e39db0dae65312b3028f to your computer and use it in GitHub Desktop.
Save TurBoss/4fb6c6890399e39db0dae65312b3028f to your computer and use it in GitHub Desktop.
How to use AT+CNUM to query own number from

According to the ATC, the own number can be displayed with the command AT+CNUM,

but only in case ithe number s stored on the SIM card by operator.

It is possible also to save your own number on the SIM card, however such functionality sometimes is blocked by MNO.

For most cases the query is not working, for most MNO prefer not to store phone number on the SIM;

if your MNO doesn't block this function, you can write on your own.

Here is an example about how to do it:

at+cnum?

+CME ERROR: unknown

at+cpbs?                                   - display the active phonebook storage

+CPBS: "SM",250,250

OK

at+cpbs=ON                            - select the active phonebook storage to MSISDN list

OK

at+cpbs?                                 -  display the active phonebook storage,

+CPBS: "ON",0,3                    - MSISDN list is empty

OK

at+cpbw=,"+48723976327"    - enter your own MSISDN

OK

at+cpbs?                                  -  display the active phonebook storage,

+CPBS: "ON",1,3                    - MSISDN list has one item

OK

at+cpbr=1                                 - reading MSISDN list, position 1

+CPBR: 1,"+48723976327",145,""  - own MSISDN

OK

at+cnum

+CNUM: ,"+48723976327",145      - own MSISDN
@TurBoss
Copy link
Author

TurBoss commented Apr 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment