Sub sendCommand(msg As String)
Dim Packet As UDPPacket
data = msg.GetBytes("UTF8")
Packet.Initialize(data,GetBroadcastAddress,52829)
For i = 1 To 3
UDPSocket1.Send(Packet)
Wait For (CheckResponse(2000)) Complete (Success As Boolean)
If Success Then Exit
Next
If i = 4 Then
Log("Failed to send...")
End If
End Sub