oxygen_sh 发表于 2022-1-13 23:06

【安信可NB-IoT开发板EC-01F-Kit】第二篇:与透传云TCP服务器通信

<h1 style="margin-top:23px; margin-bottom:22px; text-align:justify"><span style="font-size:22pt"><span style="240%"><span style="font-family:Calibri"><b><span style="font-size:22.0000pt"><span style="font-family:宋体"><font face="宋体">一、安信可透传云</font></span></span></b></span></span></span></h1>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">透传云提供了开发板</font><font face="Calibri">EC-01F-Kit</font><font face="宋体">与浏览器客户端之间进行数据通信(透传)的通路。</font></span></span></span></span></p>

<ul>
        <li style="text-align: justify;"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">浏览器客户端与透传云建立</font><font face="Calibri">TCP</font><font face="宋体">连接</font></span></span></span></span></li>
        <li style="text-align: justify;"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">开发板与透传云服务器建立</font><font face="Calibri">TCP</font><font face="宋体">连接</font></span></span></span></span></li>
        <li style="text-align: justify;"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">透传云将浏览器客户端或开发板的数据直接转发给另一方,实现透传</font></span></span></span></span></li>
</ul>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">透传云网址:</font></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><a href="http://tt.ai-thinker.com:8000/ttcloud"><span class="15" style="background:#ffffff"><span style="font-family:Arial"><span style="color:#ca0c16"><span style="letter-spacing:0.0000pt"><span style="font-style:normal">http://tt.ai-thinker.com:8000/ttcloud</span></span></span></span></span></a></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<h1 style="margin-top:23px; margin-bottom:22px; text-align:justify"><span style="font-size:22pt"><span style="240%"><span style="font-family:Calibri"><b><span style="font-size:22.0000pt"><span style="font-family:宋体"><font face="宋体">二、连接过程</font></span></span></b></span></span></span></h1>

<ol>
        <li style="text-align: justify;"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">浏览器上打开透传云网址,获取</font><font face="Calibri">TCP</font><font face="宋体">服务器及端口,见下图红框处。</font></span></span></span></span></li>
</ol>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<ol start="2" style="list-style-type: decimal;">
        <li style="text-align: justify;"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">依次发送下列</font><font face="Calibri">AT</font><font face="宋体">指令</font></span></span></span></span></li>
</ol>

<p style="text-align: justify;"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">查看</font><font face="Calibri">SIM</font><font face="宋体">卡</font></span></span></span></span></strong></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align: justify;"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">附着网络</font></span></span></span></span></strong></p>

<p style="text-align: justify;">&nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">注册</font><font face="Calibri">APNID</font></span></span></span></span></strong></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">激活网络</font></span></span></span></span></strong></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="Calibri">PING</font><font face="宋体">网络</font></span></span></span></span></strong></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">创建</font><font face="Calibri">TCP Socket</font></span></span></span></span></strong></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">连接透传云</font><font face="Calibri">TCP</font><font face="宋体">服务器</font></span></span></span></span></strong></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">从浏览器客户端发送</font>&ldquo;<font face="Calibri">1234</font><font face="宋体">&rdquo;</font></span></span></span></span></strong></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">查看开发板接收到数据</font></span></span></span></span></strong></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

annysky2012 发表于 2022-1-15 09:15

<p>收到的数据是解析以后的吗?有固定协议没</p>

oxygen_sh 发表于 2022-1-16 21:51

<p>浏览器客户端发送的是&ldquo;12345&rdquo;字符串,接收到的是&ldquo;3132333435&rdquo;,即ASCII码对应的字符串。应用层代码需要从&ldquo;3132333435&rdquo;中恢复出&ldquo;12345&rdquo;字符串即可。</p>

<p>&nbsp;</p>

<p>其他通信协议相关的解码工作,模块都已经做好了。</p>
页: [1]
查看完整版本: 【安信可NB-IoT开发板EC-01F-Kit】第二篇:与透传云TCP服务器通信