根据国家政策法规,只有实名认证用户才能在论坛回帖留言,点击去完成实名认证 >>
千寻位置
发表主题
  • 1552阅读
  • 2回复

STM32 SDK开发千寻时间戳不对啊
[复制链接]

级别: 新手上路
 
只看楼主 倒序阅读 楼主  发表于: 04-05
请求时间戳已经成功返回,但感觉SDK解析不对,导致后面的请求一直出错

send: POST /rest/sys.time/ak/576749 HTTP/1.0
wz-acs-method:sdk
wz-acs-timestamp:


A
SEND OK

+IPD,324:HTTP/1.1 200 OK
Server: nginx/1.14.1
Date: Fri, 05 Apr 2019 14:02:11 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 13
Connection: close
ETag: 19Swi4GF/4L+Stc8Lxd4GFg3
wz-request-id: 11211411111611111010397116101119971214511898106484945511554472931908MYFeiuEMTk45nz4R
Via: n25_125

1554472931929                     //这个应该是时间戳吧(感觉后面多了三位)

send: POST /rest/qxwz.embedded.initialize/ak/576749?_sign=f95c0f29690c4a07c442b4040b4fda7d3d8b0d631c7ef30118d5744fdda5ca98eb2f1a7c69deaa985391fe60d3a23c1b HTTP/1.0
wz-acs-method:sdk
wz-acs-timestamp:1554472931929             //这个时间戳和实际时间对不上啊,感觉去掉最后三位应该是对的
Content-Length: 384

track=%7B%22ak%22%3A%22576749%22%2C%22did%22%3A%22867856038070468%22%2C%22ct%22%3A%221554472931929%22%2C%22tid%22%3A%2272155447293192972%22%2C%22st%22%3A%22STM32_RTCM_SDK%22%2C%22sv%22%3A%221.1.0%22%2C%22on%22%3A%22unknown%22%2C%22ov%22%3A%22unknown%22%2C%22model%22%3A%22unknown-unknown%22%2C%22au%22%3A%22null%22%7D&sdkType=STM32_RTCM_SDK&deviceType=SIM800L&deviceId=867856038070468
A
SEND OK

+IPD,173:<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.14.1</center>
</body>
</html>
send: POST /rest/qxwz.embedded.initialize/ak/576749?_sign=0e31899f7a0cbf44ba79d87aed48b2b0d1fe0089a0614417214c10303f1947eeddb4845bec97a36dfe8d6205638563a8 HTTP/1.0
wz-acs-method:sdk
wz-acs-timestamp:1554472931929
Content-Length: 384

track=%7B%22ak%22%3A%22576749%22%2C%22did%22%3A%22867856038070468%22%2C%22ct%22%3A%221554472931929%22%2C%22tid%22%3A%2227155447293192927%22%2C%22st%22%3A%22STM32_RTCM_SDK%22%2C%22sv%22%3A%221.1.0%22%2C%22on%22%3A%22unknown%22%2C%22ov%22%3A%22unknown%22%2C%22model%22%3A%22unknown-unknown%22%2C%22au%22%3A%22null%22%7D&sdkType=STM32_RTCM_SDK&deviceType=SIM800L&deviceId=867856038070468
A
SEND OK

+IPD,173:<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.14.1</center>
</body>
</html>
send: POST /rest/qxwz.embedded.initialize/ak/576749?_sign=03aee9453b037653380987985b62095fdf0e3fd798305997cb613330c929bd2dce0d01bf7f6410a7c6ecc589929cda6d HTTP/1.0
wz-acs-method:sdk
wz-acs-timestamp:1554472931929
Content-Length: 384

track=%7B%22ak%22%3A%22576749%22%2C%22did%22%3A%22867856038070468%22%2C%22ct%22%3A%221554472931929%22%2C%22tid%22%3A%2211155447293192911%22%2C%22st%22%3A%22STM32_RTCM_SDK%22%2C%22sv%22%3A%221.1.0%22%2C%22on%22%3A%22unknown%22%2C%22ov%22%3A%22unknown%22%2C%22model%22%3A%22unknown-unknown%22%2C%22au%22%3A%22null%22%7D&sdkType=STM32_RTCM_SDK&deviceType=SIM800L&deviceId=867856038070468
A
SEND OK

+IPD,173:<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.14.1</center>
</body>
</html>
级别: 测试
只看该作者 沙发  发表于: 04-08
时间戳是对的,毫秒级别的
级别: 新手上路
只看该作者 板凳  发表于: 04-11
回 qxwz63432484 的帖子
qxwz63432484:时间戳是对的,毫秒级别的 (2019-04-08 09:56) 

返回没问题是毫秒级的,但是第二次向服务器发送请求的时候sdk发送的时间戳也是毫秒级的还是秒级的,我看论坛其他人第二次sdk发送的都是秒级的,我这个sdk发送的毫秒级的,不知道请求失败是不是这个原因?这个跟sdk的版本有关系吗?
快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
上一个 下一个