How to send or recieve data from your Uniden Scanner...

Status
Not open for further replies.

Mikejo

Member
Premium Subscriber
Joined
Jul 18, 2007
Messages
226
Location
Waltham,MA
Hi

I have a BC95XLT and I have the cable to send ore recieve from a PC. I downloaded the "BC95XLT_Protocol.pdf" file which tells you the "PC Interface commands", but How can one use these to send ore recieve from the scanner using the "Command Line" or a simple "Batch file" or using "Visual Basic 3.0".

Here is an example of what's in the "Proticol" PDF. :

" 7.2. PC Interface Command
7.2.1. Serial Interface Parameter
Transfer speed
: 9600bps
Start/Stop bit
: 1 bit, 1 bit
Data Length
: 8 bit
Parity Check
: None
Code
: ASCII code
Flow Control
: None
Return Code
: Carriage Return(\r) only
7.2.2. Command Format
PRG
Set Program Mode
Use this command to set the scanner to the programming mode.
Command
< FORMAT >
PRG&#65288;\r&#65289;
Response
< FORMAT >
PRG^OK&#65288;\r&#65289;
EPG"

Any Ideas on how to use these?
 

Mikejo

Member
Premium Subscriber
Joined
Jul 18, 2007
Messages
226
Location
Waltham,MA
Made some progress...

I downloaded a "Freeware" terminal program called "Putty", and I was able to send simple commands to read a "Channel Memory".

To do this all you have to do is use the command "PRG" (without quotes of course) followed by a carridge return (hit the enter key) and it enters programming mode by sending back an "OK".

Then I entered the command "RCM^C001" (without quotes of course), and it spit out all the pertainate information concerning channel 1.

Example:"RCM^C001^F470.5125^LR^PS^DR" Where "F" stands for frequency, "LR" where" L" indicates "Lockout" and "R" means"UNLOCK", "PS" where "P" stands for Priority and "S" means "Priority Channel", and "DR" where "D" stands for "Delay" and the "R" means "Delay-Off""

Hit "EPG" and it kicks you out of "Programming Mode" sayinf "OK" and your done.

It's pretty simple really!

I know that you can use MicroSquash "Visual Basic" in Excel to put buttons and text boxes on your spread sheets, I'm trying to find out how to use VB and some code behind a form to access a Com Port so I can possibly make a spread sheet to download and Upload Frequencies and settings.

Any help with code would be appreciated.

Mike
 

Mikejo

Member
Premium Subscriber
Joined
Jul 18, 2007
Messages
226
Location
Waltham,MA
Update...More Progress...

Well, after allot of reading and searching, it appears that for now, I will concentrate on using an old VB 3.0 programming enviornment I got a Loooooooong time ago.

I've managed to replicate the results I got from using "Putty" in VB 3.0.

I have a simple little .EXE program that does just what I was doing in "Putty", it's crude, and you have to be carefull, but it's a start.

I'll be playing around with the code to be able to download multiple channels and possibly send the output elsewhere.

I'm not going to kill myselfe on this as I'm pretty much a novice programmer at best, and when my mellon starts to hurt I'll drop it for a while if not all together.

This is just supposed to be for fun and relaxation!

Mike C.
 

cpuerror

Member
Joined
Aug 26, 2007
Messages
1,199
Location
Ontario, Canada
I wouldn't bother using that ancient VB 3.0. You are much better off using a newer .NET based version. Microsoft makes the 2008 Express version of VB free to download from their website:

http://www.microsoft.com/express/vb/

If you have any specific questions feel free to ask. I have some experience programming these scanners so I might be able to help you.
 

Mikejo

Member
Premium Subscriber
Joined
Jul 18, 2007
Messages
226
Location
Waltham,MA
Thanks CPUERROR for the reply....

I have the 2005 Express version, It has a "MicroSoft communications Control Version 6.0" I can drop on the form, but I need to find a code snippit that will allow me to open and query the port and handle the reply (I had used a code snippit I downloaded on-line that worked with VB 3.0), so now I'm scouring the VB 2005 Express help files looking for an example.

If you however have anything that would work with VB 2005 Express that could get me going, I'd appreciate it!

Mike
 

ab3ai

Member
Joined
Nov 22, 2004
Messages
123
Mike,
PM me your me Email and can send you some sniptets I have for a app I wrote for the 2052 in VB 05.
Chris
 

Slayer0420

Member
Joined
Apr 30, 2007
Messages
2
Location
Muskoka Ontario Canada
I use ARC95 on my BC95XLT
It's $19.95 tho

Uniden BC95XLT PC Software programmable Nascar Race scanner Bush series UASD95

# ARC95 includes THE most versatile memory editor available on the market.
# ARC95 is only compatible with the Uniden BC95XLT
# New: Enhanced scanner communication, software will automatically set baudrate and comport for you.
# Radioreference.com Conventional frequencies import option
# Paste Frequencies DIRECTLY from any website using WebCatcher or 'Paste Special'
# Setup channels in an easy, spreadsheet type interface.
# Store Unlimited number of configurations on your harddisk.
# Copy/Move/Swap memory banks / memory channels
# Compatible with Windows 98 / Win2000 / XP / Vista
# Easy cut/copy/paste data between channels and banks.
# Move channels up and down with quick move buttons
# Enhanced Import/Export CSV data
# ARC95 files uses the new innovative 'BuTel universal file format'!
# Fill down/series option
# Full clipboard support for import/export data to/from other applications
# Easy data toggle with mouse double click or space bar or keyboard shortcuts
# Sort frequencies per bank
# Sort a range of channels
# Free updates
# Remove duplicate frequencies
# Extra Dummy bank for storing temporary data while you are re-organising your scanner channels.
# Print option

System Requirements:
# Windows 98/xp/2000/vista
# PC interface cable (serial or USB)
# Free serial port or USB1 converter cable for USB ports
 

Mikejo

Member
Premium Subscriber
Joined
Jul 18, 2007
Messages
226
Location
Waltham,MA
Thanks, I can buy that any time I want, in fact I have the demo, I'm interested in coding my own thankyou!

Mike
 

Mikejo

Member
Premium Subscriber
Joined
Jul 18, 2007
Messages
226
Location
Waltham,MA
Almost getting somewhere...

Well, I've managed to be able to access the scanner and send some commands via code to get it to respond. I've been trying to read all the channel memories, but what I get in response is a bit messy. I can't seem to get things into the "RichTextbox" in an organized fashon. I'll attempt to cut and past the code for a button click event, and a snapshot of the form with the messy results I'm getting.

I'm using - (Visual Basic 2005 Express Edition)

P.S. In the attached Image, you can see that the modem replied "PRG^OK" to indicate the scanner is in "Programming" mode, then there is an "ERR" message indicating an "Error"; (I don't know what it is), and then the "RCM" command is sent (in the code designed to loop through the channel locations), and it gets the first four channels to spit out perfectly, but then, things get real messy.
----------------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

Dim counter = 0
Dim chnum As Integer = 1

'Clear buffer
rxBuff = ""

If SerialPort1.IsOpen = False Then SerialPort1.Open()

SerialPort1.Write(UCase(("PRG" & vbCrLf & vbNewLine)))

End If

Do While counter < 200

If chnum < 100 Then chnum.ToString(+("0"))
If chnum < 10 Then chnum.ToString(+("00"))


SerialPort1.Write(UCase("RCM^C") & UCase(chnum) & vbCrLf)


RichTextBox1 = CStr(rxBuff) & vbCrLf

counter = counter + 1
chnum = chnum + 1
Loop

SerialPort1.Write(UCase(("EPG" & vbCrLf)))

'If the buffer is still empty then no data. End sub
If rxBuff = ""

Then GoTo ends

ends:

End Sub
----------------------------------------------------------------------------------------------------------------------------------------------------------
 

Attachments

  • DataDumpCrop.JPG
    DataDumpCrop.JPG
    37.8 KB · Views: 1,237

cpuerror

Member
Joined
Aug 26, 2007
Messages
1,199
Location
Ontario, Canada
Modem?? You have a modem??

Well you don't need to add LF or NewLine when communicating with a device, a CR is sufficient. In some cases you are sending all three so you need to change that.

I don't understand what is up with ^C, just use a normal comma instead. There are some other things I can nitpick here as well.

SerialPort1.Write(UCase("RCM^C") & UCase(chnum) & vbCrLf)

Here you have that ^C thing going. Change it to a comma. Also you are using the Ucase function on something that is already uppercase (RCM). Next you use the Ucase function as well for a number. Not needed. Finally you close off with CrLf, when all you need is CR.

So your function should look like:
SerialPort1.Write("RCM," & cstr(chnum) & vbCr)

counter = counter + 1
Change that to counter +=1, it's just better that way.




Here you are converting a string into a string with CStr.
RichTextBox1 = CStr(rxBuff) & vbCrLf



Once you get the basics, I would suggest you create a function so you don't have to handle the serial port in every routine. So it can be like Response = SendCMD("PRG")

Now the SendCMD function will add a line feed to the PRG command, and send it to the scanner. When it gets a response back, it will return it to the variable Response. You can also make the SendCMD function do housechores like check for errors, logging, etc. Good luck.
 

Mikejo

Member
Premium Subscriber
Joined
Jul 18, 2007
Messages
226
Location
Waltham,MA
Thanx for the help!

Thanx for the reply

"Modem" well, in a way yes! This scanner does contain a "Modem" and by means of which the protocall is sent and recieved.

As for the "Carret", it is also a must. See the .Doc file or Link below.

I tried all the suggestions, and only the "counter += 1" worked (I used it for "chnum" as well).

Here is the free downloadable "Uniden" protocall file for reading a channel memory location. (Attached File converted to .Doc)

or you can try this link to get the .PDF

http://www.uniden.com/my/downloads.cfm?product=BC95XLT

I don't know if the link will work.

I'll check the thread after work tomorrow.
 

Attachments

  • BC95XLTOperation Specification.doc
    35.5 KB · Views: 419

cpuerror

Member
Joined
Aug 26, 2007
Messages
1,199
Location
Ontario, Canada
I followed the link you gave me and looked at the command protocol. I think what you are doing wrong is that you are only specifying a couple of parameters for the PCM command. So you have to put them all in or it will ERR out on you.

Have you tried firing up Hyperterminal and programming from there to get a feel for it? The plus to this is that the protocol is extremely simple, so once you have one channel figured out, you have the whole scanner figured out.
 

Mikejo

Member
Premium Subscriber
Joined
Jul 18, 2007
Messages
226
Location
Waltham,MA
Hi

Well, I've used a couple of terminal programs and I can comfortably send commands and even program a channel if I choose, the problem I'm having is with the "RCM" command, and listing all the channels concurrently. As you can see in the snap shot above, I can get the scanner to dump its memory contents; however, it only gives me the first four memory locations properly, then thereafter, things get messy.
 

Mikejo

Member
Premium Subscriber
Joined
Jul 18, 2007
Messages
226
Location
Waltham,MA
Got this part basically figured out...

I managed to get things straightened out a bit, I can interrogate and list all 200 channel memories. It works a bit shakey, but it works.

Here is a screen shot.

Mike
 

Attachments

  • BC95XLT.jpg
    BC95XLT.jpg
    40.5 KB · Views: 1,299

Mikejo

Member
Premium Subscriber
Joined
Jul 18, 2007
Messages
226
Location
Waltham,MA
I can do that, but I'm quite the novice at programming, and anyone using it or anything I would upload, would do so at their own risk.
 

cpuerror

Member
Joined
Aug 26, 2007
Messages
1,199
Location
Ontario, Canada
Well just develop it over time and make constant small impovements. I am sure there are users of this scanner that would appeciate having it.
 

Mikejo

Member
Premium Subscriber
Joined
Jul 18, 2007
Messages
226
Location
Waltham,MA
If anyone wants to pick it up where I left off...

Well, as I had mentioned before, that when I start to get a headache, I would drop it for a while or just plain drop it.

Well, at least for now I'm going to drop it but I'll attach a .Doc file with what I've done so far, and anyone who would like to pick up the gauntlet is welcome to do so.

This was done in "Visual Basic 2005 Express", and I would guess it could be pasted into the 2008 version as well.

All you need to do is open a new windows application project, drop one "Button", one "Combo Box" , one "Rich Textbox" and one "Serial Port" on the form. Then double click on the form, and delete the code structure it gives you to start with and paste the code in the attached .Doc file, and with a little tweaking, it should work.

Or just leave the Public Class statement at the top of the window and the end of class statement at the bottom, and cut and paste what is between those two statements in the .Doc file and drop it between them and that would work too.

Any who, hope to see some progress.

I just couldn’t figure out how to parse the data coming from the scanner into an Excel spreadsheet or an Access Database or something.

Have fun.
 

Attachments

  • BC95XLT Comm VB 2005 EXpress.doc
    35.5 KB · Views: 252

cpuerror

Member
Joined
Aug 26, 2007
Messages
1,199
Location
Ontario, Canada
Mike,
For easy parsing, use can just use the Split function. It will seperate the data coming back into an array to make it easy to access individual properties easily.
 
Status
Not open for further replies.

Similar threads

Top