AT+CNUM是向SIM卡查询本机号码的。this
可是你必须先把这个号码写到SIM卡里面。spa
由于不管移动或者联通的SIM卡,买给用户的时候都没有把本机号码写到SIM卡内。orm
一旦你把本机号码写到了SIM卡内,不管你把这张SIM卡插到那台手机,用AT+CNUM均可以查出本机号码的。ip
Action command returns the MSISDNs relatedto the subscriber (this information can be stored in the SIM or in theit
ME). If subscriber has different MSISDN fordifferent services, each MSISDN is returned in a separate line.io
MSISDN Buffer Format(See GSM 11.11subclause10.3.5):form
Bytes Description Length(bytes)service
0-X Alpha Identifier Xcommand
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卡插到别的手机上,照样能够查看到本机号码。
转自bbs.sendsms.cn