码迷,mamicode.com
首页 > 其他好文 > 详细

learning at command AT+CGSN

时间:2019-02-21 15:43:39      阅读:296      评论:0      收藏:0      [点我收藏+]

标签:ali   otp   dde   continue   mina   open   enter   usb   class   

AT command AT+CGSN

Purpose

       Learning how to get mobile module international Mobile Equipment Identity number

 

Eevironment

       Shell terminal, base on gcom command and gcom script

 

Procdeure

      

gcom script 

opengt
 set com 115200n81
 set comecho off
 set senddelay 0.02
 waitquiet 0.2 0.2
 flash 0.1

:start
 send "AT+CGSN^m"
 get 1 "^m" $s
 get 1 "^m" $s
 let x = len($s)
 if x<2 goto continue
 let $s = $right($s, x-1)
 print $s
:continue
 exit 0

test mothed:

root@IoTP:/etc/gcom# gcom -d /dev/ttyUSB2 -s /etc/gcom/getimei.gcom 
867732039762018

 

learning at command AT+CGSN

标签:ali   otp   dde   continue   mina   open   enter   usb   class   

原文地址:https://www.cnblogs.com/lianghong881018/p/10412801.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!