n1moy
Member
Confirmed!
$ nc -z -v -u 192.168.24.40 50536
Connection to 192.168.24.40 50536 port [udp/*] succeeded!
$ nc -z -v -u 192.168.24.40 50536
Connection to 192.168.24.40 50536 port [udp/*] succeeded!
Not using UDP for FTP but rather using UDP to send serial data so the scanner can be put into FTP Mode.I have no data to back this up but in my experience, FTP is a TCP based protocol. Using UDP would be a recipe for disaster in this case.
Try \r\n which is carriage return and new line.Have tried the following with echo options -e -n and -en, nothing returned
$ echo -en "GFM,UNIDEN \r" | nc -4u -q1 192.168.24.40 50536
$
No change to the scanner's display.
Tried both \r & \r\n, again no reply or change to the scanner's display.
$ nc -u 192.168.24.40 50536
"GFM,UNIDEN \r\n"
^C
$
Confirmed connection with netstat:
$ netstat | grep 50536
udp 0 0 ATOPNUC-AG40:58240 192.168.24.40:50536 ESTABLISHED
Can the command be confirmed ?
No spaces. If spaces or any command not accepted then you should get back ERR. I just sent "abcd" CR and got back ERRThe post shows GFM,UNIDEN
Are there spaces, includes a <cr> ?
However, this command does not resume the scanning.
$ echo -e "EFM\r\n" >/dev/udp/192.168.24.40/50536
You're very welcome.Interesting!
This command does resume the scanning.
$ echo -e "EFM,UNIDEN\r\n" >/dev/udp/192.168.24.40/50536
Thank you for the help!
I’d suggest using something other than DELETE as your script terminator, since that’s a valid FTP command. I typically use EOF or similar.Wrote a quick script called uniden-delete.sh with these commands and a login to the writable ftp account.
A sleep command was required before login.
#!/bin/bash
HOST="192.168.24.40"
NAME="write.user"
PASSWD="password"
echo -e "GFM,UNIDEN\r\n" >/dev/udp/$HOST/50536
sleep 1
ftp -inv <<DELETE
open $HOST
user $NAME $PASSWD
cd /audio/user_rec
bye
DELETE
echo -e "EFM,UNIDEN\r\n" >/dev/udp/$HOST/50536
$ ./uniden-delete.sh
Connected to 192.168.24.40.
220 FTP Service ready for new user.
331 User name okay, need password.
230 User logged in, proceed.
Remote system type is UNIX.
Using binary mode to transfer files.
250 Command successful.
221 FTP Service closing control connection.
Thanks again,