怎樣用AT指令查詢本機手機號碼

來源:互聯網
上載者:User
AT+CNUM是向SIM卡查詢本機號碼的。  
   
  但是你必須先把這個號碼寫到SIM卡裡面。  
 因為無論移動或者聯通的SIM卡,買給使用者的時候都沒有把本機號碼寫到SIM卡內。  
  一旦你把本機號碼寫到了SIM卡內,無論你把這張SIM卡插到那台手機,用AT+CNUM都可以查出本機號碼的。  
   
  Action   command   returns   the   MSISDNs   related   to   the   subscriber   (this   information   can   be   stored   in   the   SIM   or   in   the  
  ME).   If   subscriber   has   different   MSISDN   for   different   services,   each   MSISDN   is   returned   in   a   separate   line.  
   
                MSISDN   Buffer   Format(See   GSM   11.11   subclause10.3.5):  
                Bytes                         Description                                                     Length(bytes)  
                0-X                             Alpha   Identifier                                           X  
                X+1                             Length   of   BCD   number                                   1  
                X+2                             TON   and   NPI                                                     1  
                X+3--X+12                 Dialling   Number                                             10  
                X+13                           Capability/Configuration   Identifier     1  
                X+14                           Extension1   Record   Identifier                   1 

  普通使用者的SIM卡必須先把本機號碼寫入SIM卡內,才能讀出來,不然讀出來的是空的。  
   
  你可以找一張沒有寫入本機號碼的SIM試試,在手機上查看本機號會是空的,如果你把本機號添加進去之後(會寫入到SIM卡,一般的手機在查看本機號碼的界 面都可以添加本機號碼的),你不但可以在你添加本機號碼的手機上查看到本機號碼,而且你把這張SIM卡插到別的手機上,照樣可以查看到本機號碼。  
   
   
  把本機號碼寫進SIM卡後,可以用AT+CNUM來讀取本機號碼的。  

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.