With our aim to understand the network performance with end-to-end delay as one of the metric, it is important to study how message flow takes place between the end node and the external host microcontroller. Figure 19 shows how messages are exchanged between the Symphony link module and the external host.
Figure 19: Message flow between host and end node.
The external host follows a master-slave setup where the end module acts as a slave and the external micro-controller acts as the master. In Symphony Link both the slave and master units are allowed to initiate the communication flow but they follow difference mechanisms. The master slave communication is made up of two types of data packets: Response Packets and Command Packets. The slave sends the response packets while the master sends the command packets. When the communication is initiated by the master, it sends only one UART command packet at a time and has to wait to receive a response from slave unit before sending the next packet. The response time for the slave is set to 300ms for each command packet received. When a slave wants to initate the communication it cannot send the data packets directly. It first needs to send a polled interrupt request from its Pin 8 to the host micro-controller unit. Pin 8 is also called the
Host Interrupt General Purpose Input/Output line. The host recognizes the interrupt from the slave and checks the reason of the interrupt from slave by checking which IRQ flags are set. It then issues further commands and takes appropriate actions. The UART configuration between master and slave configuration:
Data : 8bit
Baud Rate : 115200bps
Parity : None
Flow Control : None
Stop Bits : 1bit
UPLINK MESSAGE
The maximum message length supported by symphony link is 256 bytes. Uplink messages can be of two types, acknowledged and unacknowledged messages. When an acknowledged uplink message is sent, the gateway confirms the receipt of the uplink message after which the next uplink message can be sent. In case of unacknowledged uplink message the gateway does not confirm the message receipt and the end node can transmit the next message as soon as the transmission queue is empty.
Acknowledged Message: When an acknowledged uplink message is sent from the host micro controller, the module receives the contents and makes an attempt to connect the last know gateway that it had connected. If the module is able to successfully transmit the message it waits for the acknowledgment from the gateway and after it receives the acknowledgment the IRQ FLAGS TX DONE flag is set. In case the acknowledgment from gateway is not received the end node attempts to send the message two more times. If the all three attempts are unsuccessful then the IRQ FLAGS TX ERROR flag is set and it notifies the external host of the failure.
Unacknowledged Message: In this case the module does not wait for a response from gateway to acknowledge the uplink message. Once the module finishes sending the message it just sets the IRQ FLAGS TX DONE flag.