Skip to content

Instantly share code, notes, and snippets.

@Sts0mrg0
Forked from TurBoss/CNUM.md
Created August 26, 2018 20:29
Show Gist options
  • Save Sts0mrg0/72d25272767fe39ea0599a11dc999c7f to your computer and use it in GitHub Desktop.
Save Sts0mrg0/72d25272767fe39ea0599a11dc999c7f 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment