Python Uniden Scanner Programming

My goal is to have a way to program my Uniden BCT15X scanner with linux without a UI. Basically I just want a script I can run on a Rasberry PI connected to the scanner. All the changes will be done to .csv files, and then I can SSH into the Rasberry PI, run the script and be done.

First, its good to review details on the Uniden DMA setup:
Programming Your Uniden Scanner
Uniden DMA FAQ
Dynamic Memory Architecture
Uniden Scanners Systems, Sites and Groups
BCT15X
BCT15X protocols specs:
    http://info.uniden.com/twiki/pub/UnidenMan4/BCT15XFirmwareUpdate/BCT15X_v1.03.00_Protocol.pdf

Started wtih pyUniden. It had a lot of useful info, and got me started connecting to the radio with python. The only issue is that it doesn't include details on how to update the scanner, just get info from the radio.

I started the python experiments on a Mac. To start, I got the tty address of the USB cable with the command:

ls /dev/tty* | grep usb

Then I could use the sample scripts in pyUnident to communicate with my BCT15X.

Through the pyUniden code, and the Uniden protocol details, I figured out a path to update my scanner. First add a new System:

#Create a New Conventional System
SYS_INDEX = scanner.sendcommand('CSY,CNV,', 10)

The command will return the SYS_INDEX (System Index) of the new system, in this case 2156. With that SYS_INDEX, add details to the system:

#Update the SYSTEM:
scanner.sendcommand('SIN,' + SYS_INDEX + ',TEST,19,0,0,2,,,,,,,0,,,,,00,21,,,', 82)

Then Append a Channel Group to the new system:

#Append Channel Group: AGC,[SYS_INDEX][\r]
GRP_INDEX = scanner.sendcommand('AGC,' + SYS_INDEX + '', 10)

That cammand returned the GRP_INDEX (Group Index of the new group), in this case is 2158. With that GRP_INDEX you can get the group info:

#Set the Group Info
scanner.sendcommand('GIN,' + GRP_INDEX + ',Test Group,10,,,,,', 10)

Next use that GRP_INDEX again to Append a Channel:

#Append Channel: ACC,[GRP_INDEX][\r]
CHN_INDEX = scanner.sendcommand('ACC,' + GRP_INDEX + '', 10)

That command returned the CHN_INDEX (Channel Index), which is 2160 for this example. With the CHN_INDEX, set the Channel Info:

scanner.sendcommand('CIN,' + CHN_INDEX + ',VHF CH 16,156.800,AUTO,0,0,0,0,0,0,0,0,,,0,,0,0', 82)

Back to Main Page