I know you are using UDP.write(166). I wanted you to see what it shows on the serial monitor with Serial.write(166). That is a broken pipe.
If the receiving device is not translating the character correctly, that is a challenge on that end. Maybe it is not using the correct character set there?