Programming software to control a scanner

Status
Not open for further replies.

Gilligan

Member
Database Admin
Joined
Dec 19, 2002
Messages
2,136
Reaction score
9
Location
Hagerstown, MD
I have a BC246T and love the software I have for it. I use Butel's ARC246 for programming. I make heavy use of the 246T Audio Recorder (by Scannerbase). I am messing around with the 246T Advanced Virtual Control (also by Scannerbase), and I have (but don't really use) Uniden's UASD (I haven't messed with it much).

Although I appreciate the value of these programs, I want to make my own program to control my scanner. I have a good deal of experience in C++ programming (Visual C++) but not really any serial port experience. After looking through several articles and using some serial classes from the net, I've managed to piece together a program that attempts communication with my scanner. The radio doesn't want to accept the transmissions from the computer, but the computer has successfully received one character from the scanner. I can't get it to accept a command, like Uniden's command STS or WIN.

I have only found one open source program for scanner programming, and it's extremely simple (searches talkgroups or something) and is written in Visual Basic. Is there anyone who has any C++ code they would be willing to share to just get me going in the right direction with the serial port communications for a scanner? I'm not looking for the open source to a full-blown program (I want to write my own). But I need some help with the serial comms end of it and don't know where to turn. As a last resort, if someone was willing to help but not offer their source code, maybe they could briefly review the serial comms section of my code (maybe 40-50 lines of c++) and tell me where I'm going astray. I do believe that any help can contribute to the scanner software community. Personally, I would like to see (in the future) a few articles on serial programming for scanners in the Wiki. But that's down the road. Thanks to anyone who is able and willing to help me with this.
 

Al42

Member
Joined
Apr 29, 2005
Messages
3,457
Reaction score
0
Location
Long Island, NY, USA
Send STS to the scanner and wait for the serial buffer to interrupt. If the last character is NOT a CR (13), stuff it into a buffer and ... wait or say STS again - I'm at the office and don't have access to the computer at home that has my source code, but it's one of the two. (Sorry for the generalization, but I haven't written a line of C in about 16 years, and the serial control in VB won't help you directly.)

There's a tcl program available that talks to the scanner - if you can read tcl (it's fairly C-ish), it might give you some ideas. Do a search here on RR for tcl.

Or run Hyperterminal, send commands and look at the responses. Oh, the commands must be upper case, IIRC.
 

ka3jjz

Wiki Admin Emeritus
Joined
Jul 22, 2002
Messages
25,889
Reaction score
2,574
Location
Bowie, Md.
Al42 said:
There's a tcl program available that talks to the scanner - if you can read tcl (it's fairly C-ish), it might give you some ideas. Do a search here on RR for tcl.

Actually that software is on the 246 Wiki, I just need to fix the link title...

BC246 Control and Programming tool

Interestingly there seems to be a slow progression of software being developed in tck/tl - much more so than other platforms such as the Mac. Wonder why? Does it have to do with the 232 being defined differently on that platform? 73s Mike
 

Al42

Member
Joined
Apr 29, 2005
Messages
3,457
Reaction score
0
Location
Long Island, NY, USA
tcl is like Java or HTML - it's machine independent. A program written for the PC running Windows will run on a Mac pretty much as-is, as long as 1) you have the hardware (a USB port and a converter) and b) you have a tcl interpreter.

But I don't think that too many people writing in tcl are thinking about Macs, Mike - it's more a linux language.
 

Gilligan

Member
Database Admin
Joined
Dec 19, 2002
Messages
2,136
Reaction score
9
Location
Hagerstown, MD
Hey guys. Thanks for the replies. I'm checking into that control software. I saw it before but thought it was primarily linux. I see there's an XP option I need to look at. Also, thanks for the HyperTerminal suggestion -- never even thought of it.
 

Al42

Member
Joined
Apr 29, 2005
Messages
3,457
Reaction score
0
Location
Long Island, NY, USA
Gilligan said:
Also, thanks for the HyperTerminal suggestion -- never even thought of it.
It's how I wrote my alpha tag program - once I saw what came out of the scanner in response to STS, I realized that I could use Hyperterminal and go blind or write something and start parsing the output. I think the STS output is just the current state of the screen, and that scrolls, so you get all kinds of crap that computers are so good at walking.
 
Status
Not open for further replies.
Top