Public Sub SendMessage (msg As String)
CallSub2(Main, "updateLog","Invio Dati in corso...")
'''AStream.Write(msg.GetBytes("utf8"))
'''sostituito dal seguente codice
Dim Temp() As Byte = msg.GetBytes("utf8")
AStream.Write(Temp())
Dim TempLog As String = "tx " & Temp.Length & ":"
For I = 0 to Temp.Length - 1
TempLog = TempLog & " " & Temp(I)
Next
TempLog = TempLog & " """ & msg & """"
Log(TempLog)
End Sub