Uniden Remote Head Project

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,904
Location
N.E. Kansas
Man this RA8875 is powerful but it's raw. Everything has to be defined. I finally got around to making a small program that displays the entire data packet with pointers to each char. That has been a Godsend since I can just look at the start of a field of data, look at the pointer and put it into the function instead of trying to count it out. I still need to figure out the RA8875's touch input stuff but custom font glyphs are working well. I can display all the custom RSSI and what not in any font imaginable. The main hangup is the display strobing. It writes the font as an image which causes a bit of brief blinking. I think the page write page switch can take care of a lot of that but I don't yet have a grasp on how to use it effectively. The internal fonts don't do that since they are right there at hand to the registers. I can mitigate it by writing only when something changes but that just requires more work. I will probably use the internal for the non user editable fields and try to do a write when change in the others.

I have a 4D Systems display on order as well. They are ultra expensive but the top of the line. It will be interesting to see what that's like.

This is some nasty code with lots of unused variables and what not but it works to display the raw data with pointers and will drive part of a display using an Adafruit RA8875 driver board, Adafruit 4.3" touch display the Sumotoy t4 library with a Teensy 3.6 if anyone wants to give it a go. The doBreakup function is the comma delimiter parser. I have that commented out as it will false on name fields with commas but it's handy at time just in case for testing. I'm using LCD Image Converter to convert the fonts and create the custom glyphs for RSSI and what not. I can post the wiring if anyone is interested.

The pointer map will help a lot with the Nextion coding too. The plan is to finish verions for that, mess with the 4D Systems and try to see how far I get with the RA8875. I just need more hours in the day...and brains.

I'm writing everything to the display as I build it just to test the variables for accuracy. We can whittle it down to lesser data and change the fonts later. Playing with different fonts trying to copy the internal type.
78188
 
Last edited:

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,904
Location
N.E. Kansas
Heh never ran into the more than 10,000 character post limitation before. Here's the ino file zipped and the Sumotoy driver with the fonts I made. I'll clean up the Nextion stuff too and post it later. o_O

Sumotoy RA8875 t4 branch
 

Attachments

  • teensy-ra8875-char-map-and-4_3-display-.zip
    3.2 KB · Views: 31
  • fonts.zip
    408 KB · Views: 17
Last edited:

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,904
Location
N.E. Kansas
The Nextion 4.3 should be here tomorrow and I will put this RA8875 thing on hold a bit and work toward something usable for you guys. It's much easier to play with. You can customize it yourself once the base is built.
 

eorange

♦RF Enabled Member♦
Joined
Aug 20, 2003
Messages
3,028
Location
Cleveland, OH
The layout looks good. Nice font size; not crowded or busy; obvious control buttons on the bottom. Maybe find a way to promote the TGID? There's some unused space on the right.

I ended up returning my Nextion. Biggest issue is I could not update the display no matter what...I think the display's serial port was bad. I tried the Pi, Arduino, validated my TTL serial out was working, tried every example I could find but nothing worked. Was sending the required 0xff stream, nothing. I ended up going back to an Adafruit PiTFT which mounts directly on the Pi. Otherwise the Nextion had a lot of potential, but I already have a lot of pygame code I can reuse for my remote head.
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,904
Location
N.E. Kansas
That's odd, I assume you tried various baud rates.
That talkgroup location is pulling from the Option_B_1 field which is 14 chars wide which is why it looks like that. That's the problem with this whole thing. They use defined width fields so depending on where they are place and what the user has chosen in the radio menu to have displayed there it changes how it looks and there's not much getting around reserving the space.

Maybe if you get some time you can point me where to start with pygame?
 
Last edited:

eorange

♦RF Enabled Member♦
Joined
Aug 20, 2003
Messages
3,028
Location
Cleveland, OH
I tried everything. 9600 was the fixed baud rate. Even resorted to a canned Arduino demo for Nextion and zilch, nothing. I've programmed serial protocols for my BC780, AOR8200, Arduinos, Raspberry Pis, and on the shop floor using RS-232 and RS-485 for industrial devices with runs 100s of feet long, and here I can't a stupid Rx/Tx working with a Pi and a display 6 inches apart. :mad:

pygame is a pretty comprehensive graphics library for python, from drawing basic lines to cameras and scenes for scrolling. I just use the basic functionality for my ads-b scanner (and soon to be remote head). This assumes you know python. I'd recommend experimenting with pygame using your desktop (Windows or Linux) before tackling cross-platform development, just to get a feel. It probably won't take you long based on what you've done so far.

In summary: pygame requires that you define your display size, colors, and fonts. Then you can draw lines, rectangles, and text. All these operations are written off screen. To make your changes appear, you then update the display. This is a double-buffering technique, which means your display gets re-painted from memory very quickly which provides good performance.

1. Install python if necessary.
2. Enter the python interpreter by issuing the Python command at a command prompt or shell. pygame is an external package which must be installed using pip, which is the python package manager.
3. Issue this command: pip install pygame
4. You're done. You can also experiment with python statements in the interpreter. Exit the interpreter with Ctrl-Z.

Save this code in a test.py file and run it with:
python test.py
Code:
import pygame
import time

pygame.init()
# set display size
lcd = pygame.display.set_mode((300,200))

#define RGB colors
purple = (128, 0, 128)
red = (255, 0, 0)
yellow = (255, 255, 0)

# draw a line (x1, y1, x2, y2)
pygame.draw.lines(lcd, red, False, [(2,3), (268,40)], 1)

# draw a filled rectangle (x1, y1, width, height)
pygame.draw.rect(lcd, purple, (157, 80, 10, 70), 0)

# make a 13pt Arial font
theFont = pygame.font.SysFont("Arial", 13)

# render the text
txt = theFont.render("Lorem Ipsum crapola", 1, yellow)
lcd.blit(txt, (5, 60))

# make all changes appear
pygame.display.update()

time.sleep(5)
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,904
Location
N.E. Kansas
Perfect. Thanks! And yes it sounds like your uart in that display was bad. I can run mine up to 921600 with no issues.
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,904
Location
N.E. Kansas
Here is a file to get you started if you are inclined to mess with it while I work on finishing the actual Nextion version. This file establishes a USB connection with the radio, waits until the Serial/Mass Storage question pops up, auto-selects serial, initates an STS command to get data, pulls the data in and parses it to variables based on the SIMPLE and DETAILED field names in the manual. I need to add the MENU and some others yet.

It has a timer that waits every 250ms and checks to see if the packet has been read in then sends another STS command to get fresh data. If the serial monitor is open it will display each incoming char and its offset location and also tell you the total length of data from the radio and which basic display type is currently active (simple, detailed, menu). It also bridges the radio USB serial data with Teensy hardware serial port 3 (serial3) (where you control a display). I used serial3 due to the fact I had been using other hardware serial pins as some of the SPI pins for the RA8875. You could change it to serial1 or 2 as well. This is a majority of what you need to make whatever you want. I checked all the offsets the best I could and have tested some by writing them to the Nextion but some might not be correct. If so let me know and I'll fix them.

I should have a 4.3" Nextion version ready soon with build instructions.
 

Attachments

  • Uniden_SDS_Data_Read_and_Parse_to_Variables.zip
    3.4 KB · Views: 48
Last edited:

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,904
Location
N.E. Kansas
4.3"
Subdued keypad in background that the text will overwrite when it's wide enough. Main buttons on the bottom edge. Touch areas over the SYSTEM,DEPARTMENT,CHANNEL names to hold just likea HomePatrol.
Visibility with functionality is the goal to try to accomodate everyone. It runs off the detail display mode. Due to the fact every config can be different it's up to the user to choose what to display. Fields available are;
Fcn
Option1Detail -Option4Detail
then InfoArea1Detail(fav lists), then Option7Detail, Option8Detail
SystemNameDetail
SytemOptionDetail
DepartmentNameDetail
DepartmentOptionDetail
ChannelNameDetail in large Font
ChannelOptionDetail
Then OptionA1Detail - OptionB4Detail

The touch film washes out on the camera but it looks as good as the SDS in real life. I will finish up the reverse display color(hold) and the menu and RSSI in the top right corner of the screen and should be about done. Will probably put a subdued brightness control in as well.

20191229_002358.jpg
 

Attachments

  • 20191229_002431.jpg
    20191229_002431.jpg
    86.9 KB · Views: 163
  • 20191229_005758.jpg
    20191229_005758.jpg
    30.2 KB · Views: 139

wmlovell

Member
Premium Subscriber
Joined
Dec 26, 2006
Messages
296
Location
Aurora, OH
I have no idea what language you guys are talking ...but I want one of these for my car!

Eric, isn't it time to get the group together for dinner? You can translate to me then!
 

garys

Member
Joined
Jun 13, 2002
Messages
6,211
Location
Texas
I'm hoping for a "Remote Control Heads for Dummies" with a parts list and how to instructions. I really like the idea of this head.


I have no idea what language you guys are talking ...but I want one of these for my car!

Eric, isn't it time to get the group together for dinner? You can translate to me then!
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,904
Location
N.E. Kansas
Is that the Nextion or the RA8875?

Due to display memory constraints I'm going to try using 3 pages. Detail, Menu and then a Dynamic page. That way the main page can be easily edited later on in the Nextion editor. The rest of the lesser used screens like search, analyze, closecall etc...will be drawn directly by the processor instead of being hard coded in the display. I have the detection routine working switching between Detail and Menu and the rest are coming up as dynamic in the debug serial correctly so now it's just a matter of adding graphic commands. I hope to be able to use their display attributes string for some control of that and maybe some vertical progress bars for closecall.
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,904
Location
N.E. Kansas
How does GPS interface with the SDS100? It goes into the mini USB right, the same one for programming? I'm wondering how to use one of these with GPS. Do we have a hand held 100 GPS port pinout around here?
 
Joined
Mar 30, 2019
Messages
295
Very much like my "hum fix", I believe Uniden is getting services for free with all of this... I also believe we deserve some BIG thanks from Uniden for doing this leg work for them!!!
 

jpjohn

Member
Premium Subscriber
Joined
Mar 6, 2003
Messages
248
Location
Wisconsin
I think I already know the answer but am going to ask anyway....the remote will not be able to power down the scanner correct? In that sense it will be just like the RH96. Some found that to be a problem but I use a switch to cut power to scanners so never had an issue. Looking forward to the possibilities of this for sure!!!

Exciting times and really excited about remote possibilities. Another example of something Uniden should have included from the get go but thankfully we have some very talented people on this site who were up to the challenge!!!!
 

eorange

♦RF Enabled Member♦
Joined
Aug 20, 2003
Messages
3,028
Location
Cleveland, OH
I have no idea what language you guys are talking ...but I want one of these for my car!

Eric, isn't it time to get the group together for dinner? You can translate to me then!
Bill, you bet!

mancow is using a Teensy (I believe) microcontroller with an intelligent Nextion display. It's like an Arduino, if that helps. The Teensy is programmed with a variant of the C language. The Nextion display can be developed using a programming tool to make usable displays pretty quickly.

I am also developing a remote head, but not a scanner remote head. Its for my ads-b 'scanner' that I developed using a Raspberry Pi and the Python programming language and a TFT display (see pic, which by the way is showing a USN aircraft over Cleveland in early December). This display is not intelligent, so unlike the Nextion I had to program everything you see in Python code. My project uses a USB SDR and an antenna, which means it's parked in a fixed location. So I'm developing a remote head using another rPi and TFT display, and they communicate via wireless networking. I digress a bit, but these are the technologies mancow and I have been discussing.

Here's an actual remote head I built in 2013 for my BC780.

My custom ads-b scanner:
78535
 
Top