Behavior Flow Chart

This flow chart illustrates the network behaviour of NET2GRIDs embedded software library (libn2g) applications. The flow can be described as follows:

Upon device boot, it checks for stored credentials.

  1. If stored credentials exist:
    1. The device attempts to connect using them.
    2. If the connection fails, the device enables the Access Point (AP) and Bluetooth (BT) while waiting for new credentials. LED flashes fast. It can accept new credentials at this stage and also tries to connect to the stored credentials every minute.
  2. If the device does not have stored credentials, LED flashes fast, it waits until they are provided. If the network connection fails with the provided credentials, the Access Point and Bluetooth remain enabled.

In the event of a previous successful connection to a network, if the device gets disconnected. LED flashes slow:

  1. The device will make 10 attempts to reconnect to the network.
  2. If all 10 attempts fail, only the Access Point will be enabled. In order to use Bluetooth to provide new credentials, the device must be re-booted.