Home Page Forums Raspberry Pi Shields Getting subscriber number (AT+CNUM just says OK)

This topic contains 1 reply, has 2 voices, and was last updated by  Saeed 8 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36949

    trevor
    Participant

    I want to get the phone number of the sim being used. I believe it’s use “8.1. AT+CNUM Subscriber Number” (pg 110 of the manual) but this only returns OK with no other data. Trying AT+CNUM=? also just returns OK.

    AT+CNUM
    OK
    AT+CNUM?
    ERROR
    AT+CNUM=?
    OK

    I haven’t found any suggestions that it needs to be in a particular mode.

    Any help will be appreciated.

    Thanks.

    #36973

    Saeed
    Moderator

    AT+CNUM returns the MSISDNs related to the subscriber.

    But in many cases it will just return OK. This is because +CNUM command reads a special phone book storage area reserved for the SIM’s own phone numbers. The service provider may or may not store the phone number for you.

    If you want to read the MSISDN with the +CNUM command and it is not currently programmed, follow the procedure below (but please know that almost every other device has it’s own set of rules for AT commands so it may vary from device to device, but the concept will be same): at+cnum?

    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=,”+91123456789″ – 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,”+91123456789″,145,”” – own MSISDN

    OK

    at+cnum

    +CNUM: ,”+91123456789″,145 – own MSISDN

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.