Connecting
Connecting signals that there is currently an attempt to connect to a remote device (which was initiated by calling SOCommOutsideAPI.connect).
This will either be followed by a Connected (BLE) emitted (at roughly the same time when SOCommOutsideAPI.connect completes, but there is no guarantee on which of those events will trigger first), or followed by a Disconnected if the connection attempt failed (in which case SOCommOutsideAPI.connect will emit an error why the connection failed, and again, no assumption on which event triggers first is given).
Note, that when the connection switched between BLE and WIFI (MQTT), the Connecting state will not be emitted, as this intermediate state is an internal state only. If the switch succeeds, a new state Connected (WIFI
) will be emitted right after the previous Connected (BLE
).