Closed KazuyukiEguchi closed 6 years ago
■SORACOM Air DATA-SIM with SMS
### Sync time.
<- AT+QNTP=1,"ntp.nict.jp"
-> (+CPIN: READY)
-> (+QUSIM: 1)
-> (+QIND: SMS DONE)
-> (+QIND: PB DONE)
-> OK
-> +QNTP: 0,"2017/10/30,10:25:44"
### Get time.
<- AT+CCLK?
-> +CCLK: "17/10/30,10:25:44+00"
-> OK
### ERROR! ###
■SORACOM Air DATA-SIM without SMS
### Sync time.
<- AT+QNTP=1,"ntp.nict.jp"
-> (+CPIN: READY)
-> (+QUSIM: 1)
-> (+QIND: SMS DONE)
-> (+QIND: PB DONE)
-> OK
-> +QNTP: 0,"2017/10/30,10:27:39"
### Get time.
<- AT+CCLK?
-> +CCLK: "17/10/30,10:27:39+00"
-> OK
### ERROR! ###
■IIJmio
### Sync time.
<- AT+QNTP=1,"ntp.nict.jp"
-> (+CPIN: READY)
-> (+QUSIM: 1)
-> (+QIND: SMS DONE)
-> (+QIND: PB DONE)
-> OK
-> +QNTP: 561
### Get time.
<- AT+CCLK?
-> +CCLK: "17/10/30,10:29:33+00"
-> OK
### ERROR! ###
"17/10/30,10:27:39+00"
KazuyukiEguchiさん、どうもありがとうございました!
https://github.com/SeeedJP/WioLTEforArduino/commit/947fc3b6b48b76476b4236710b5502944627bc9b
『AT+CCLK?』戻り値のフォーマットは、
“yy/MM/dd,hh:mm:ss±zz”
であるが、
“yy/MM/dd,hh:mm:ss”
が戻ってくることを前提にWioLTE.cppが記述されている。
下記のように修正したところ、エラーが発生しなく、日時を取得することができた。