SDS100/SDS200: Uniden sds200 writable ftp account

n1moy

Member
Joined
Oct 19, 2022
Messages
57
Location
Plymouth Co, Massachusetts
Again thanks for this technical detail!

Experimented with 'GFM,UNIDEN \r'

$ echo -n "GFM,UNIDEN \r" | nc -4u -q1 192.168.24.40 50536 #did not work

Is the <cr> only a carriage return, any line feed ?
 

belvdr

No longer interested in living
Joined
Aug 2, 2013
Messages
2,567
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.
 

ProScan

Software Provider
Premium Subscriber
Joined
Jul 2, 2006
Messages
7,479
Location
Ontario, Calif.
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.
Not using UDP for FTP but rather using UDP to send serial data so the scanner can be put into FTP Mode.
 

n1moy

Member
Joined
Oct 19, 2022
Messages
57
Location
Plymouth Co, Massachusetts
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.
 

belvdr

No longer interested in living
Joined
Aug 2, 2013
Messages
2,567
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.
Try \r\n which is carriage return and new line.
 

n1moy

Member
Joined
Oct 19, 2022
Messages
57
Location
Plymouth Co, Massachusetts
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

As I recall both commands were copied from a post in another thread.
Can these commands be confirmed ?
 
Last edited:

ProScan

Software Provider
Premium Subscriber
Joined
Jul 2, 2006
Messages
7,479
Location
Ontario, Calif.
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 ?

Confirmed. If the command wasn't accepted then the scanner sends back ERR
Untitled.png
 

ProScan

Software Provider
Premium Subscriber
Joined
Jul 2, 2006
Messages
7,479
Location
Ontario, Calif.
This should help.

{edit} it's written in PHP but you get the ideal and I'm sure it can be ported over.
 
Last edited:

n1moy

Member
Joined
Oct 19, 2022
Messages
57
Location
Plymouth Co, Massachusetts
Triumph!

This command in the CLI produced a change in the scanner's display. "FTP MODE", "Keypad Lock"

$ echo -e "GFM,UNIDEN\r\n" >/dev/udp/192.168.24.40/50536

However, this command does not resume the scanning.

$ echo -e "EFM\r\n" >/dev/udp/192.168.24.40/50536
 

n1moy

Member
Joined
Oct 19, 2022
Messages
57
Location
Plymouth Co, Massachusetts
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,
 

belvdr

No longer interested in living
Joined
Aug 2, 2013
Messages
2,567
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,
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.

Great work!
 

n1moy

Member
Joined
Oct 19, 2022
Messages
57
Location
Plymouth Co, Massachusetts
Have been uncomfortable with this result. Documentation I have been able find on the web specifies only a carriage return in simular commands. No line feed.

Further experimentation confirmed that an original attempt did work correctly. Initially it did not, maybe my error.

$ echo -e "GFM,UNIDEN\r" >/dev/udp/192.168.24.40/50536
$ echo -e "EFM,UNIDEN\r" >/dev/udp/192.168.24.40/50536

Carriage Return = CR = \r = ^M = octal 015

Also successfully used the octal code in the echo command.

$ echo -e "GFM,UNIDEN\0015" >/dev/udp/192.168.24.40/50536
$ echo -e "EFM,UNIDEN\0015" >/dev/udp/192.168.24.40/50536

Result: The line feed is extra, not required.

Currently searching for documentation that details the GFM & EFM commands. They are not included in this Remote Command Specification.

http://info.uniden.com/twiki/pub/Un...CDx36HP_RemoteCommand_Specification_V1_05.pdf

Interested in any related documentation.

Thanks,
 
Top