鐭俊鏍煎紡锛坰ms锛変互鍙婄法纰肩附绲�(ji茅)
Table of contents
鐭俊闁嬬櫦(f膩)鎸囬€氶亷涓插彛 at 鍛戒护椹�(q奴)鍕�(d貌ng)鐭俊璨撻€�(j矛n)琛岀煭淇$櫦(f膩)閫佸拰鎺ユ敹鎿嶄綔銆�
AT 鍛戒护 锛欰T鍛戒护鏄﹨(q奴)鍕�(d貌ng)鐭俊瑷�(sh猫)鍌欑殑妯�(bi膩o)婧�(zh菙n)宸ユキ(y猫)鍛戒护锛岄櫎浜嗘キ(y猫)鐣岀殑妯�(bi膩o)婧�(zh菙n)涔嬪锛屾瘡鍊�(g猫)寤犲晢鍙兘鏈�(hu矛)灏嶅叾閫�(j矛n)琛屾摯(ku貌)灞�锛屼笉閬庝竴鑸締瑾�锛屾(bi膩o)婧�(zh菙n)鍛戒护鎳�(y墨ng)瑭插鐢紝鎴戝湪閫欓噷鐢ㄧ殑鏄タ闁€瀛� MC39i 锛屾湁灏堥杸鐨� AT 鍛戒护鏂囨獢銆�
涓€銆佺煭淇¤矒鎿嶄綔鍒嗙偤涓夌ó妯″紡锛� Block銆丳du 鍜� Text
1銆丅lock 妯″紡鍩烘湰宸茬稉(j墨ng)琚� Pdu 妯″紡鍙栦唬锛屾矑鏈夊叿楂旂爺绌躲€�
2銆乀ext 妯″紡姣旇純绨″柈锛屼絾鏄敮鎸佺殑瑷�(sh猫)鍌欎笉鏄緢鍏�锛岃€屼笖涓嶈兘瀵�(sh铆)鐝�(xi脿n)涓枃銆�
AT 锛� CGMF=1<CR>
AT 锛� CGMS= 鈥� 13612344321 鈥� ,129<CR> >Hello World!<^Z>
3銆丳du 妯″紡
Pdu 绶ㄧ⒓涓昏鍖呮嫭鍏╁€�(g猫)涓昏鐨勯儴鍒嗭紝涓€鏄� pdu 涓茬殑鏁撮珨鏁�(sh霉)鎿�(j霉)鏍煎紡锛屽垎鍒ュ洜?y脿n)姒榣(f膩)閫佷俊鎭覆鍜屾帴鏀朵俊鎭覆鑰屾湁鍗€(q奴)鍒�锛屼簩鏄� pdu 涓枃鏈儴鍒嗙殑绶ㄧ⒓锛屽垎鍒ュ洜?y脿n)妯藉潃顛╊嚝顗呯厡顐�?/p>
鎴戝€戜篃鍙互閫欐ǎ渚嗙悊瑙i€欏€�(g猫) pdu 绶ㄧ⒓鐨勬牸寮�锛� sms 鐩哥暥(d膩ng)浜庝竴鍊�(g猫)鍗�(xi茅)璀版'锛屾渶绨″柈鐨勫崝(xi茅)璀版'锛�
鏍规摎(j霉) gsm03.40 瑕�(gu墨)鑼�锛� sms 鍗�(xi茅)璀板寘鎷互涓嬪咕灞わ細
1銆� SM-AL 锛氭噳(y墨ng)鐢ㄥ堡銆傞€欏€�(g猫)閮ㄥ垎灏辨槸鏁�(sh霉)鎿�(j霉)閮ㄥ垎銆�
2銆� SM-TL 锛氬偝杓稿堡銆傛垜鍊戝彲浠ユ竻妤氱殑鐪嬪埌閫欓噷鎻忚堪浜嗕富瑕佺殑鐭俊鍏�(n猫i)瀹�锛屽寘鎷櫦(f膩)閫佽櫉纰硷紝鎺ユ敹铏熺⒓锛屼俊鎭鍨�锛岀法纰�锛屾暩(sh霉)鎿�(j霉)鍫�(b脿o)闀峰害绛夌瓑锛岄€欎篃鏄垜鍊戠法绋嬩富瑕佽闈㈠皪鐨勫晱椤屻€�
3銆� SM-RL 锛氫腑绻煎堡銆傞€欏€�(g猫)鎸囩殑鏄煭淇″湪缍�(w菐ng)闂�(gu膩n)涔嬮枔涓辜闇€瑕佺殑鍗�(xi茅)璀�銆�
4銆� SM-LL:閺堣矾灞�銆�
寰炰笂杩版弿杩颁腑鎴戝€戝彲浠ユ竻妤氱殑鐪嬪埌锛屾垜鍊戠法绋嬩富瑕侀泦涓簬鍌宠几灞�銆�
浜�銆佺煭淇″偝閫佹湁涓夌ó绶ㄧ⒓锛� 7 浣嶏紝 8 浣�锛� UniCode
1銆佽嫳鏂� 7 浣嶇法纰�
閫欐槸 gsm 鐨勯粯瑾�(r猫n)绶ㄧ⒓鏂瑰紡
鐢变簬閫欐ǎ鐨勭Щ浣�锛屾垜鍊戝彲浠ョ湅鍒版垜鍊戣兘鐧�(f膩)鐨勬渶澶氳嫳鏂囧瓧绗︾瓑浜庯細 140*8/7 = 160 銆�
2銆佹暩(sh霉)鎿�(j霉) 8 浣嶇法纰�
8-bit 绶ㄧ⒓閫氬父鐢ㄤ簬鐧�(f膩)閫佹暩(sh霉)鎿�(j霉)娑堟伅锛屾瘮濡傚湒鐗囧拰閳磋伈绛夛紱
3銆佷腑鏂� pdu 绶ㄧ⒓
鐧�(f膩)閫佷腑鏂囨檪(sh铆)锛屽繀闋堢敤 UCS2 锛� utf-16 锛夐€�(j矛n)琛岀法纰�锛屾渶澶氬彲浠ョ櫦(f膩) 140/2 锛� 70 鍊�(g猫)婕㈠瓧銆�
UniCode 绶ㄧ⒓杞�(zhu菐n)鎻涗篃姣旇純绨″柈锛屼互涓枃鐐轰緥锛屼竴鍊�(g猫)涓枃瀛楃鏄叐鍊�(g猫)瀛楃瘈(ji茅)锛岀洿鎺ュ皪楂樹綅瀛楃瘈(ji茅)鍜屼綆浣嶅瓧绡€(ji茅)閫�(j矛n)琛屽崄鍏€�(j矛n)鍒惰綁(zhu菐n)鎻涘氨鍙互浜�銆傚鈥滄杩庘€濓紝 UniCode 绶ㄧ⒓鏄� 6B22 8FCE 锛岄€欏悓鏅�(sh铆)涔熷氨鏄綁(zhu菐n)鎻涚殑绲�(ji茅)鏋�锛屽鏋滅櫦(f膩)閫佺殑涓蹭腑鏈夎嫳鏂囧瓧绗�锛岄偅涔堝湪鍓嶉潰瑁�(b菙)鍏� 00 锛屼互淇濊瓑涓€鍊�(g猫)瀛楃灏嶆噳(y墨ng)鍏╁€�(g猫)瀛楃瘈(ji茅)銆�
4銆丳DU 涓茬殑鐢ㄦ埗淇℃伅 (TP-UD) 娈垫渶澶у閲忔槸 140 瀛楃瘈(ji茅)锛屾墍浠ュ湪閫欎笁绋法纰兼柟寮忎笅锛屽彲浠ョ櫦(f膩)閫佺殑鐭秷鎭殑鏈€澶у瓧绗︽暩(sh霉)鍒嗗垾鏄� 160 銆� 140 鍜� 70 銆傞€欓噷锛屽皣涓€鍊�(g猫)鑻辨枃瀛楁瘝銆佷竴鍊�(g猫)婕㈠瓧鍜屼竴鍊�(g猫)鏁�(sh霉)鎿�(j霉)瀛楃瘈(ji茅)閮借鐐轰竴鍊�(g猫)瀛楃銆�
涓�銆佸湴鍧€绶ㄧ⒓
鐭俊鐧�(f膩)閫佷腑閮芥渻(hu矛)娑夊強鍒扮煭淇″湴鍧€鐨勫晱椤�锛屼粬鍊戠殑绶ㄧ⒓瑕�(gu墨)鍓囨槸涓€鑷寸殑 , 绨″柈渚嗚灏辨槸 BCD8421纰肩法纰�銆�
濡傦細 08 91 6808501505F0 锛�
08 锛氬湴鍧€闀峰害锛岋紙铏熺⒓椤炲瀷 + 铏熺⒓闀峰害锛� /2 鐨勫崄鍏€�(j矛n)鍒惰〃绀�
91 锛氳櫉纰奸鍨�
683108501505F0 锛氳櫉纰硷紝瀵�(sh铆)闅涜櫉纰兼噳(y墨ng)鐐猴細 +8613805515500 锛岃櫉纰艰檿鐞嗘柟娉曠偤 , 濡傛灉鐐� +86 闁嬪 , 灏� + 铏熷幓鎺� , 鐒跺悗鍒ゆ柗鏄惁鐐哄伓鏁�(sh霉) , 涓嶆槸鍦ㄦ湯灏捐(b菙) F, 鐒跺悗灏囧鏁�(sh霉)浣嶅拰鍋舵暩(sh霉)浣嶄簰鎻�
鍥涖€佺法纰肩ず渚�
1銆佺櫦(f膩)閫佷俊鎭殑 PDU 涓诧細
鐢ㄦ墜姗�(j墨)瀵竴姊濈煭淇℃伅锛岀櫦(f膩)閫佹墜姗�(j墨)铏熺⒓鐐� 13605696031 锛屼俊鎭収(n猫i)瀹圭偤鈥� Hello World! 鈥�銆傞€氶亷鍩�(zh铆)琛� AT 锛� CMGL=2 鍙互璁€鍑烘姊濅俊鎭�銆�
AT锛婥MGL=2 {璁€鏈櫦(f膩)鐭俊鎭瘆 锛婥MGL: 1,2,,24 {1琛ㄧず淇℃伅鍊�(g猫)鏁�(sh霉)锛�2琛ㄧず鏈櫦(f膩)淇℃伅锛�24琛ㄧず淇℃伅绺�?c猫)钀樼父 08 91 683108501505F0 11 00 0B 81 3106656930F1 0000FF 0B E8329BFD06DDDF723619 OK
涓嬮潰鍒嗘瀽閫欐淇℃伅锛�
08 | 鐭俊鎭腑蹇冨湴鍧€闀峰害銆傦紙鐭俊鎭腑蹇冭櫉纰奸鍨� + 鐭俊鎭腑蹇冭櫉纰奸暦搴� /2 鐨勫崄鍏€�(j矛n)鍒惰〃绀猴級 |
91 | 鐭俊鎭腑蹇冭櫉纰奸鍨嬶紝 91 鏄� TON/NPI 銆� TON/NPI 閬靛畧 International/E.164 妯�(bi膩o)婧�(zh菙n)锛屾寚鍦ㄨ櫉纰煎墠闇€鍔犫€橈紜鈥欒櫉 ; 姝ゅ閭勫彲鏈夊叾浠栨暩(sh霉)鍊硷紝浣� 91 鏈€甯哥敤銆� |
683108501505F0 | 鐭俊鎭腑蹇冭櫉纰�锛屾槸鎵€浣跨敤鐨勬湇鍕�(w霉)涓績鍦板潃銆傜敱浜庝綅缃笂鐣ユ湁铏曠悊锛屽(sh铆)闅涜櫉纰兼噳(y墨ng)鐐猴細 8613805515500( 瀛楁瘝 F 鎰忔寚闀峰害娓� 1), 閫欐槸浣滆€呮墍鍦ㄥ湴 GSM 鐭俊鎭腑蹇冪殑铏熺⒓銆� ( 铏熺⒓铏曠悊鏂规硶鐐� , 濡傛灉鐐� +86 闁嬪 , 灏� + 铏熷幓鎺� , 鐒跺悗鍒ゆ柗鏄惁鐐哄伓鏁�(sh霉) ,涓嶆槸鍦ㄦ湯灏捐(b菙)F, 鐒跺悗灏囧鏁�(sh霉)浣嶅拰鍋舵暩(sh霉)浣嶄簰鎻� ) |
11 | 鏂囦欢闋瓧绡€(ji茅) (header byte, 鏄竴绋� bitmask) 銆傞€欓噷 11 鎸囨甯稿湴鐧�(f膩)閫佺煭淇℃伅銆� |
00 | 淇℃伅鍙冭€冭櫉銆傦紙 TP-MR 锛� |
0D | 琚彨铏熺⒓闀峰害銆傝鍙櫉纰奸暦搴︾殑鍗佸叚閫�(j矛n)鍒惰〃绀�銆� |
81 | 琚彨铏熺⒓椤炲瀷銆� |
3106656930F1 | 琚彨铏熺⒓锛屼篃缍�(j墨ng)閬庝簡绉讳綅铏曠悊锛屽(sh铆)闅涜櫉纰肩偤 13605696031 銆� |
00 | 鍗�(xi茅)璀版(bi膩o)璀� (TP-PID),鏄櫘閫� GSM 椤炲瀷锛岄粸(di菐n)鍒伴粸(di菐n)鏂瑰紡 |
00 | 鐢ㄦ埗淇℃伅绶ㄧ⒓鏂瑰紡 (TP-DCS), 7-bit 绶ㄧ⒓锛� 08 锛� UCS2 绶ㄧ⒓锛� |
FF | 鏈夋晥鏈� (TP-VP),鐭俊鐨勬湁鏁堟檪(sh铆)闁� |
0B | 鐭俊鎭暦搴� |
E8329BFD06DDDF723619 | 鐭俊鎭収(n猫i)瀹光€� Hello World! 鈥�銆� |
2銆佹帴鏀朵俊鎭殑 PDU 涓�
璁€鍙栦互涓婄櫦(f膩)閫佸嚭渚嗙殑鐭俊锛屽彲浠ユ敹鍒板涓嬩俊鎭� ,
鎺ュ彈鍒颁締鑷� 13600554267 鐨勨€滄杩庘€漃DU 涓茬偤锛� 08 91 683108503705F0 04 0D 91 683106504562F7 00 08 30507080635400 046B228FCE銆�
灏嶄互涓婄殑 PDU 涓插垎鏋愬涓嬭〃锛�
娈� | 鍚京 | 瑾槑 |
08 | SMSC 鍦板潃淇℃伅鐨勯暦搴� | 鍏� 8 鍊�(g猫)鍏綅瀛楃瘈(ji茅) ( 鍖呮嫭 91) |
91 | SMSC 鍦板潃鏍煎紡 (TON/NPI) | 鐢ㄥ湅闅涙牸寮忚櫉纰� ( 鍦ㄥ墠闈㈠姞 鈥�+鈥�) |
683108503705F 0 | SMSC 鍦板潃 | 8613800573500 锛岃(b菙) 鈥楩鈥� 婀婃垚鍋舵暩(sh霉)鍊�(g猫) |
04 | 鍩烘湰鍙冩暩(sh霉) (TP-MTI/MMS/RP) | 鎺ユ敹锛岀劇鏇村娑堟伅锛屾湁鍥炲京(f霉)鍦板潃锛屽鏋滅偤 00 锛屽氨娌掓湁浠ヤ笅闂�(gu膩n)浜庡洖寰�(f霉)鍦板潃鐨勪笁鍊�(g猫)娈� |
0D | 鍥炲京(f霉)鍦板潃鏁�(sh霉)瀛楀€�(g猫)鏁�(sh霉) | 鍏� 13 鍊�(g猫)鍗侀€�(j矛n)鍒舵暩(sh霉) ( 涓嶅寘鎷� 91 鍜� 鈥楩鈥�) |
91 | 鍥炲京(f霉)鍦板潃鏍煎紡 (TON/NPI) | 鐢ㄥ湅闅涙牸寮忚櫉纰� ( 鍦ㄥ墠闈㈠姞 鈥�+鈥�) |
683106504562F 7 | 鍥炲京(f霉)鍦板潃 (TP-RA) | 8613600554267 锛岃(b菙) 鈥楩鈥� 婀婃垚鍋舵暩(sh霉)鍊�(g猫) |
00 | 鍗�(xi茅)璀版(bi膩o)璀� (TP-PID) | 鏄櫘閫� GSM 椤炲瀷锛岄粸(di菐n)鍒伴粸(di菐n)鏂瑰紡 |
08 | 鐢ㄦ埗淇℃伅绶ㄧ⒓鏂瑰紡 (TP-DCS) | UCS2 绶ㄧ⒓锛堝嵆涓枃锛� |
30507080635400 | 鏅�(sh铆)闁撴埑 (TP-SCTS) | 2003-5-7 08:36:45 +8 鏅�(sh铆)鍗€(q奴) |
04 | 鐢ㄦ埗淇℃伅闀峰害 (TP-UDL) | 瀵�(sh铆)闅涢暦搴� 4 鍊�(g猫)瀛楃瘈(ji茅) |
6B228FCE | 鐢ㄦ埗淇℃伅 (TP-UD) | 鈥� 姝¤繋 !鈥� |
浜�銆佹帴鏀剁煭娑堟伅
涓€鑸湁鍏╃ó鎺ユ敹妯″紡
1 .AT+CNMI=2,1,0,0,0 鎺ュ彈骞跺瓨鍒� SIM 涓插彛鎺ユ敹鍒颁互涓嬩俊鎭細 +CMTI锛�"SM"锛孹 AT+CMGR=X鍥炶粖 (寰瀀瀛樺劜(ch菙)鍗€(q奴)璁€鐭秷鎭�) AT+CMGD=X鍥炶粖 (寰瀀瀛樺劜(ch菙)鍗€(q奴)鍒櫎鐭秷鎭�) PDU鐙€鎱�(t脿i)锛� at+cmgf=0 OK +CMTI: "SM",1 at+cmgr=1 +CMGR: 0,,24 0891683108501705 F0240D91683157805300F50000502082000281000462F11804 OK 鏂囨湰鐙€鎱�(t脿i)锛� +CMGR: "REC READ","+86 13750835005",,"05/02/28,0:20:18+00" bbc OK 2 .AT+CNMI=2,2,0,0,0 鎺ュ彈骞剁洿鎺ュ埌涓插彛 涓插彛鎺ュ彈鍒颁互涓嬩俊鎭細 +CMT: "+8613501154105",,"01/09/13,11:04:09+32" AAA
闄勯寗锛氶棞(gu膩n)浜嶱DU妯″紡鐧�(f膩)閫佺煭淇★細
绗竴锛屽皪妯″瀵叆 AT+CMGF=0<鍥炶粖> 鐨凙T鍛戒护锛�<鍥炶粖> 瑕佺敤 /r 渚嗗(sh铆)鐝�(xi脿n)锛�锛屼箣鍚庢噳(y墨ng)瑭插緱鍒颁竴鍊�(g猫) OK 闊挎噳(y墨ng)锛屾墠鑳界辜绾�(x霉)閫�(j矛n)琛屼笅涓€姝ワ紱
绗簩锛屽皪妯″瀵叆 AT+CMGS=<length><鍥炶粖> 鐨凙T鍛戒护锛堝叾涓� <length> 鏄竴鍊�(g猫)鏁�(sh霉)瀛�锛岃┎鏁�(sh霉)瀛楁槸浠h〃浜哖DU涓蹭腑鏌愪竴閮ㄥ垎鐨勯暦搴�锛岄€欎竴閮ㄥ垎灏辨槸鎸囬櫎浜哠MSC鍦板潃涔嬪鐨勯偅涓€閮ㄥ垎锛�锛屼箣鍚庢噳(y墨ng)瑭插緱鍒颁竴鍊�(g猫) /r/n> /r/n 闊挎噳(y墨ng)锛堢壒鍒ヨ娉ㄦ剰锛�/r鏄洖杌�锛�/n鏄彌琛岋紝>鏄竴鍊�(g猫)澶т簬铏�锛�>鍚庨潰閭勬湁涓€鍊�(g猫)绌烘牸锛侊級锛屾墠鑳界辜绾�(x霉)閫�(j矛n)琛屼笅涓€姝�锛�
绗笁锛屽彲浠ラ枊濮嬪鍏ヨ鐧�(f膩)閫佺殑鍏�(n猫i)瀹逛簡銆傞€欎竴閮ㄥ垎鍙槸PDU涓蹭腑鐨勪竴閮ㄥ垎锛屽苟涓嶆槸瀹屾暣鐨凱DU涓诧紙濡傚墠鎵€杩帮紝鍘绘帀浜哠MSC鍦板潃閭d竴閮ㄥ垎锛�锛岄€欎竴閮ㄥ垎瑕佷互 Ctrl+Z 绲�(ji茅)灏�锛屼絾鏄垜鍊戣鐭ラ亾锛屽湪瀛楃涓蹭腑瑕佸付涓� Ctrl+Z 鐨勮┍锛屽繀闋堟槸鐢ˋCSII纰笺€侰trl+Z鐨凙SCII纰兼槸16閫�(j矛n)鍒剁殑 1A 锛屾墍浠ヤ綘鍙互鍦ㄤ綘鐨勫瓧绗︿覆鍚庨潰鐢╯trcat鍑芥暩(sh霉)闄勫姞涓� "/x1A " 渚嗗(sh铆)鐝�(xi脿n)銆�
閫欐ǎ涔嬪悗锛屽鏋滅櫦(f膩)閫佹垚鍔�锛屼綘灏辨渻(hu矛)鏀跺埌GSM妯″鐨勪竴鍊�(g猫)鐧�(f膩)閫佹垚鍔熺殑闊挎噳(y墨ng)锛屽舰濡傦細
+CMGS: 246
OK
濡傛灉鍙湁涓€鍊�(g猫)鈥淥K鈥濋熆鎳�(y墨ng)锛屾矑鏈夐浼间簬鈥�+CMGS: 246鈥濈殑閮ㄥ垎锛屽墖骞朵笉鑳界櫦(f膩)閫佹垚鍔燂紒鎵€浠�锛岀暥(d膩ng)浣犲彧鏀跺埌涓€鍊�(g猫) OK 闊挎噳(y墨ng)鐨勬檪(sh铆)鍊欙紝閭h偗瀹氭槸鍝噷鍑洪尟(cu貌)浜�銆�