Star Network
Description
This Star Network application uses the SPARK Wireless Core to implement a star network topology. It consists of 3 SPARK devices, one Coordinator and two Nodes. Communication is bidirectional between a Coordinator and a Node. This application provides a basic example of how to configure a point-to-multipoint connection.
Behavior
The Coordinator communicates bidirectionally with each Node. The Nodes do not communicate with each other. There are two types of information exchanges in this application.
Count Values: The Nodes send a “count value” to the Coordinator and the Coordinator sends a “count value” to both Nodes. Each device displays the count value it receives on a display linked to its serial interface. To see the messages, the user must connect a terminal emulator software to the device’s serial port on its PC.
Switch State: The transmitted payload also contains device’s switch state. The receiving device uses a LED to represent the transmitting device switch state.
Application Schedule
The following diagram illustrates the general structure of the schedule used in this application.
Figure 18: Star Network application’s schedule.
Coordinator Device
On the Coordinator, LED0 or LED1 would turn on if SW1 on Node 1 or Node 2 is pressed respectively. Pressing SW1 or SW2 on the Coordinator will turn on LED1 on Node 1 or Node 2 respectively.
Interface |
Name |
Description |
|---|---|---|
SW1 |
Node 1 Switch State |
Send SW1 state to Node 1 and turn on its LED1. |
SW2 |
Node 2 Switch State |
Send SW2 state to Node 2 and turn on its LED1. |
LED0 |
Node 1 Switch Press |
Turn on LED when SW1 on Node 1 is pressed. |
LED1 |
Node 2 Switch Press |
Turn on LED when SW1 on Node 2 is pressed. |
LED2 |
N/A |
N/A |
Node 1 Device
Pressing SW1 on Node 1 turns on LED0 on the Coordinator. LED1 turns on if SW1 is pressed on the Coordinator.
Interface |
Name |
Description |
|---|---|---|
SW1 |
Switch state |
Send SW1 state to Coordinator and turn on its LED0. |
SW2 |
N/A |
N/A |
LED0 |
N/A |
N/A |
LED1 |
Switch Press |
Turn on LED1 when SW1 on Coordinator is pressed. |
LED2 |
N/A |
N/A |
Node 2 Device
Pressing SW1 on Node 2 turns on LED1 on the Coordinator. LED1 turns on if SW2 is pressed on the Coordinator.
Interface |
Name |
Description |
|---|---|---|
SW1 |
Switch state |
Send SW1 state to Coordinator and turn on its LED1. |
SW2 |
N/A |
N/A |
LED0 |
N/A |
N/A |
LED1 |
Switch Press |
Turn on LED1 when SW2 on Coordinator is pressed. |
LED2 |
N/A |
N/A |
Configuration
Build
Setting a compile option is required on the Node devices since more than one can be used. The following table shows the possible value associated with each Node.
Role |
Value |
|---|---|
Node 1 |
NODE1 |
Node 2 |
NODE2 |
Terminal
Host terminal configuration should be as follows:
Speed (baud): 115200
Data bits: 8
Stop bit: 1
Parity: None
Flow control: None