Uniden Remote Head Project

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,908
Location
N.E. Kansas
Well converting to python3 was simpler than expected, probably because the method I used for parsing this time around is more python3 friendly. However, I think I'd rather not see b'...' or str.decode() for a while. Never knew how ugly python3 would make the code look. Not promising this is as good as the python2 version yet, but it seems to work on all display modes.

As before, please report issues to me, I know this code isn't perfect and I would love to improve it. Next up is serial detection as it currently assumes ttyACM0.


LOL at the 'b' yea python 3 runs everyting as bytes. I'm sure .decode() is your new buddy by now.

What's your serial routine look like? Are you doing a general vanilla EOL or some non blocking constant buffer thing? One thing that surprised me is the radio can do simultaneous ports as in like Proscan running off ethernet and also our stuff off USB serial and seems to serve out separate data. I didn't expect it to be that advanced. It's very fast as well. I kept putting in micro sleeps to try to stabilze some data but ended up finding that running ballz out is where it's happy.

As for commas, look into modulo parsing at 30 wide. They ****ed up the code bad and that's not the only place. You can't get away from it and a simple comma slice won't ever do so abandon that now. Seriously, just forget about it. Also, check out what happens at the end of the system/dept/option fields at times. They forget to pad with 0x20 and just say the hell with it and give up at 26 chars.

I parse at modulo 30 which sanitizes it of all comma separators (after stripping the STS, 0000101010.... etc... display size attriburte data) to get a clean base 0 start at the display data then sub parse using a python ZIP function to parallel parse the display fields against a predefined field size list then do a frame buffer write in sync. You are runing on terminal which is a wholly different animal and live and immdiate so maybe the finer details are irrelevant. I'm thinking as I'm typing I can almost see how that would be advantageous as you could taylor outputs based on print routines as opposed to having to set and stage everything perfectly for each frame buffer write and refresh. You aren't dealing with touch inputs either so...

As for the USB device that's tricky. There seems to be something Windows does the rest don't and it's as if the radios flag a counter. No matter what windows does the radio is happy and just plays along. When I established comms using the PJRC Teency and the Pi the radio seemed to keep track of failed comms. 4 or more harsh USB pulls and it stopped communicating, needing a power reset to clear whatever its going on. Also, in my initial code I looked for the device ID of the Uniden radio. It's something XXX.1965 I think. I have to look in old code to find it but you can search for the commands to do a peripherial device ID search and it will show it. I'm going to have to revisit this issue myself and see what can be done more about it. I just did a complete program halt and respawn to get around it as a cyclic check waiting for a device to present but that has its own issues.

The way they presented the data from these things makes all this far more complicated than it should be. The color control is just outright silly. I mean it's 2 attributes per field and there are 50 fields just for the detailed layouts. I get there's no way around that but damn, they make us go find, open and parse and a file that looks like it was written by the IRS just to figure it out. I'm working through that now trying to parse the config file and point the hex color data to those variables. If they had an STS data output command that appended color data to the end of each field and each field delimited with something other than a user selectable char life would be divine. I can see how this is not so much a deal for high level envoronments like Windows apps where you can control text attributes to the single char it's maybe not so bad, but for us grovelling around here in the microcontroller SBC specialized library welfare class resources are sparse.

I can hear Bob with Proscan snickering from here...
 
Last edited:

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,908
Location
N.E. Kansas
I just looked at the code. Wow, lots of work there for sure.

I didn't look very in depth but I see lots of avoiding non printed chars. Not sure how that works in your environment but I created custom font glyphs to display, same as Uniden does.
 
Joined
Aug 25, 2016
Messages
55
@mancow

Definitely vanilla EOL routine, with comma parsing and using line length to determine if commas are present in the data fields. I thought for sure it would have issues handling certain cases, but I can't seem to make it fail. Maybe just lucky and haven't had the 26 char lines throw it off yet, I have seen those in my testing but figured I would cross that bridge at a later time... maybe not the best choice, but we'll see.

I have a feeling that its the fact I don't pay attention to the lines that indicate highlighting and its eating blank space from that (assuming the line isn't highlighted).

I currently use one sleep(.1) per cycle primarily left over from my previous code designed for BCDx96 series for which that was critically necessary, I'll try without the sleep and see how it acts.

Terminal writing is pretty easy and can be rewritten every cycle without any preparation for frame buffers, etc. My code is definitely geared to stay in the terminal, I'm really not interested in exactly recreating the screen or using touch inputs but may include some scanner control features later.

Despite starting and stopping my code XXX number of times, I have never had the scanner stop responding, maybe just lucky again but I've never had to restart it for that reason.

You are definitely right about the data representation. I thought GSI would be my saving grace but it was no better than STS.

Please tell me I'm not the only one who thought the analyze function's bar representations were stupid, took me forever to get usable information from them and all I wanted was a 0-14 value (since it uses two stacked 0-7 height bars) to print out instead of the actual bars. I thought it would have been similar to how close call was done, but I guess that was too simple.

I'm limited on how I can represent non-printable/non-ASCII chars so I've been a bit creative and it has worked well so far. Now that I think of it, if I could do custom chars the bars would've been dead simple...

I definitely have lots of room for improvement and it may need a total overhaul at some point but I've been happy with it so far. I have been doing more work for V1.3 but its currently a WIP, I'll send it to you if you are interested to see it now.
 

wyomingmedic

Member
Joined
Aug 17, 2008
Messages
535
I figure it is time to share my setup. You can see the dash in my Explorer. The remote head is connected to an SDS200 that is out if sight. I mounted the head by taking it apart, running two bolts up through the top, then through the piece of trim I opted to mount to. I did have to reinforce the remote case with JB weld, but it has since held up perfectly.

In the second pic, you can see a small blue switch. I was able to fit it in the head as a way to power it on/off (after appropriate shutdown of course). Everything is hooked to a constant 12v, so relying on ignition to control everything isn't an option. This allows me to control when the head is powered. The remote head has plenty of room inside to mount a host of nuts/bolts/switches to mount/control however you want. I then use a USB mouse to run everything so I don't have to use my fat fingers. It works perfectly, looks great, and has made using the SDS200 a reality in limited mounting situations.

And of course you can see the other HHCHs for all my other radios.

Dash.jpg

Remote switch.jpg
 

hosehead88

Member
Premium Subscriber
Joined
Dec 19, 2002
Messages
447
Location
Central PA
All I seem to get is the no distraction warning alternating with the pi desktop. Never ends. Running from micro USB on rear of 200 to one of the USB 3 ports. Tried both ports. Tried 2 cables. What am I missing?
 

n1chu

Member
Premium Subscriber
Joined
Oct 18, 2002
Messages
3,029
Location
Farmington, Connecticut
Let us know how it works out. I probably would have sprung for it a couple years ago but since then I mounted a BuiltRight Industries Dash Mount in my 2021 F-150 and the SDS200 to that. Since it all fits nicely and doesn’t obstruct my view, I’m satisfied-no need for a $300 remote head. The only thing left to do is attach a grey curtain (such as a washcloth-same color as the dash) on the top backside of the case (using Velcro) to camouflage it.
 

ra7850

Member
Premium Subscriber
Joined
Mar 30, 2003
Messages
723
Location
Northeastern Pennsylvania
I just got a new truck and am planning out how to incorporate my SDS200. A remote head seems to be the only practical option, so I'm hoping these are still available. I reached out via the contact form at https://touch-scanner.com/

We still sell them, problem is that the Raspberry Pi 4 is difficult to procure. When we first started they were around $60.00 now, when you can find them, you usually can only buy 1, and you cant pre-order . At some point the parts will become more available. Ill reach out to you via the form that you submitted.

Robert
 

rvacs

Member
Premium Subscriber
Joined
Jul 3, 2003
Messages
424
Location
Tulsa, OK
Does anyone know proper way to hook up the Touch Scanner?

I have one that I bought and forgot how it hooks up. I have usb-c power source to the Pi unit to power it.
But on the SDS-100 side to I connect to the CHARGE port or to the port above it? If I connect to the CHARGE port it asks "." serial or "E" for mass storage...neither seem to work. Ideas?
 
Top