SimpliciTI APP

SimpliciTI Sample Applications

 
Sample Applications 介绍了4个简单的示例应用程序来演示SimpliciTI的各种特性和功能.
  •  Simple Peer-To-Peer :two linked End-Devices communicate directly with each other   (点对点)
  • Polling with AP – one End-Device sends data to another sleeping/polling End-
        Device via an Access Point (一个终端设备发送数据到另一个睡眠/轮询—终端设备通过一个AP)
  • Cascading End Devices – three un-linked End-Devices continually broadcast an 
        alarm  (三个un-linked终端设备不断广播警报)
  • Access Point as Data Hub – two End-Devices send data to AP Data Hub, with 
    Frequency Agility  (AP 作为数据中心)
     
    每个应用程序都需要用户接入,通过两个逻辑按键,指示两个LED指示逻辑状态。
     
Simple Peer-to-Peer 
需要两个End-Devices,a Listener and a Talker,
   

1、ED2(Listener )等待一个链接消息,DE1(Talker)发送一个链接消息。

2、建立连接后,Talker定时发送2个字节信息给Listener 。

3、Listener 接收到数据后会回复Talker2个字节信息。

应用程序通过LED的周期性切换来显示Listener和Talker数据的切换过程。Listener 接收到的数据中携带Talker指定的LED,Listener 回复中携带让Talker的哪一个LED亮起的数据。

Listener和Talker的数据格式是相同的:

 

运行这个应用程序的步骤

第一步: 准备两个目标板,一个作为Talker下载 LinkTo程序另一个作为。 另一个作为Listener下载LinkListen的程序。

第二步:启动两个设备,LED1 and LED2点亮设备

第三步:按下Listener板上的按钮,监听一个链接信息,LED2亮起。

第四步:按下Talker板上的按钮,发送一个链接信息,两个LED同时熄灭表示链接成功,如果两个LED闪烁表明连接失败,重新启动设备,返回到第三步。

第五步:Talker 发送一个消息携带2个字节的数据帧到Listener。这个消息包含Listener切换显示的LED和任务ID(transaction ID)。transaction ID为每个新消息事务ID是递增。它是一个无符号数,达到最大值后为零。

Listener 接收到2字节的消息,立即执行LED显示。posts a semaphore to its main application, and returns to complete Rx interrupt processing. 

The main application on the Listener device eventually runs and detects 
that the semaphore has been posted. This allows it to send a 2-byte reply to the Talker, indicating an LED for the Talker to toggle and the received transaction ID. 
Talker 接收到两个自己的回复,立刻切换LED,并返回。
第六步:一个变量的时间间隔后Talker 设备返回到第一步。
 
点对点的序列图
 
Access Point as Data Hub
       
首先,每个End-Device连接网络并且发送一个链接信息到AP。已经建立连接后,AP将接收End-Device携带的LED指示数据。(pressing button 1 toggles LED1 
and pressing button 2 toggles LED2). 
 
运行这个应用程序的步骤
第一步:下载程序到ED1  ED2 和AP
第二步:给AP上电,LED1,LED2亮起,AP将提供后续加入设备与网络的联系令牌(link token)。此外,它还监听链接框架中新加入终端设备,LED1和LED2将闪烁。LED一直闪烁直到收到一个新的End-Device的通道。
第三步:给End-Devices上电,LED1 和 LED2闪烁一次,表示已经成功加入网络。然后熄灭,表示成功与AP建立连接。
第四步:按下End-Devices上的一个按键,AP端的LED将切换一次。其次,End-Devices上的LED切换一次(来自AP的应答)。
第五步:操作另一个End-Devices和另外一个按键同上。
原文地址:https://www.cnblogs.com/zhangbing12304/p/7189775.html