I've been using netcat on OpenWRT for a while now to send messages to my home automation via UDP. I've done this using the following command:
nc -u -w1 -c 192.168.1.8 5678 < /tmp/example.txt
since I've updated some packages the command isn't acceptet anymore. It seems like the netcat version installed doesn't support the arguments:
root@OpenWrt:~# nc -u -w1 -c 192.168.1.8 5678 < /tmp/example.txt BusyBox v1.28.4 () multi-call binary. Usage: nc [IPADDR PORT] Open a pipe to IP:PORT root@OpenWrt:~#
Can anybody tell me how to install another nc version or another way to send messages via UDP?
The easy way in can be done in bash doesn't work with ash either:
root@OpenWrt:~# echo "test" >/dev/udp/127.0.0.1/1234 -ash: can't create /dev/udp/127.0.0.1/1234: nonexistent directory