GetStoredData
'Read settings from EEPROM
Dim length As Byte = GetStoredDataLength
Log("Length of data is :", length)
If length > 0 Then 'No data found
Dim Data() As Byte = eeprom.ReadBytes(2, length)
Dim Objects() As Object = serializator.ConvertBytesToArray(Data, ObjectsBuffer)
'Read and log EPROM data
For Each o As Object In Objects
Log(o)
Next
Else
Log("Network data not found, use AP Mode to set configuration")
Message("NoNetworkData")
End If
'Read SSIS and password from EPROM
ClientID = Objects(0)
SSID = Objects(1) 'ignore
SSIDPassword = Objects(2) 'ignore
ServerIP = Objects(3)
MqttUsername = Objects(4)
MqttPassword = Objects(5)
End Sub