This is a copy of sensorUdp source code