The AP Bridge software connects the Serial API of the AP Mote with the VManager through a TCP/IP connection.
AP connection
The AP Bridge communicates with the AP Mote using the Serial API of AP Mote. The serial protocol is similar to the IP Mote Serial API, described in TODO, with commands sent to the AP Mote and notifications received from the AP Mote.
The AP Bridge initiates the join process of the AP Mote when the AP Bridge is connected with the VManager.
The AP Bridge manages a time handshake with the AP Mote, which establishes the ASN to UTC mapping for the network.
Once connected to the AP Mote, the AP Bridge periodically pings the AP Mote if there is no other traffic to verify that communication is still working. Similarly, the AP Mote expects to receive periodic input from the AP Bridge. Once connected to the network, if the AP Mote does not receive input from the AP Bridge over a 60 second interval, the AP Mote will disconnect from the network and reset.
Manager connection
The AP Bridge communicates with the VManager using a TCP-based messaging protocol.
The AP Bridge handles flow control with the VManager. If the AP Mote can not handle the rate of input from the VManager, the AP Bridge will request that the VManager suspend its input. Similarly, if the VManager can not handle the rate of input from the AP Mote, the AP Bridge will NACK input from the AP Mote.
The AP Bridge can handle short disconnections from the VManager. While the AP Bridge and VManager are disconnected, the AP Bridge will NACK input from the AP Mote.