Uniden Remote Head Project

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,908
Location
N.E. Kansas
No suggestions, it's all compatible because it's all custom. The arduino is like a post office that gathers the stream of data from the radio and then parses it to bins with addresses. The data bins are stacked in logical order and sent out to the display where it parses them out by their address and displays them as designed in the locations set forth in the graphical hmi editor.

There are multiple ways to do it and some are better depending on the display capabilities or the amount of complexity desired.

Most of this could have been simplified had uniden kept the display line data format consistent. The 100 is not the same exactly as the 200. Some places blank data is truncated, some it's padded, sometimes commas are ignored, some not.

I tried simple comma parsing at first. It was fast and accurate right up until someone put a comma in a name field then all hell broke loose. So that didn't work. I then used data field size parsing. However data field sizes can change in certain circumstances so you have to account for that.

Not to sound flippant but until you really really have a total grasp on the data format you will run into issues. I say that because you won't be able to logically plan or anticipate what is needed and decide what can be handled by the processor or the display best.

My suggestion is to add serial debug print statements to my code and just sit and watch it. Use a good terminal program and see how it behaves. Once you see the portions that relate to fields you see on the screen then you start to understand or at least get a plan going of how to tackle the display code, that is, if you understand how the display handles data and what it can and can't do.

Be mindful of display quirks, buffer overruns, etc...

You need to likely try to load balance by parsing the data as much as possible before sending to the display. Remember, they are running i2c or some other fast bus inside the radio. You are constrained to noisy serial that's far slower and threading through multiple uarts with extra processors, interrupts, memory systems, touch sensors and other crap hanging off it.
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,908
Location
N.E. Kansas
Oh I meant a picture off the internet of the front. I was going to try the Proscan type of thing where it's a picture basically with buttons that look real but I couldn't get the display resolution to play well with any images of any detail so I abandoned that and just made my own buttons using websites like Da Button Factory - Free CTA Button Generator then uploaded them as graphics and placed transparent touch boundaries over them.

If you want to get a start on how the display side works download the HMI file and then go to the Nextion site and download their editor software. Open my HMI file with it. Their software is really slick and has a full real time debugger emulator. The display will literally run on your PC in real time if fed with the data from a serial port. You can look in the software and see how the pages are made, buttons are layed out, touch events overlayed, data is formatted, etc...
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,908
Location
N.E. Kansas
Man 4D Systems has so many different names for products I don't know what the hell my display is now. Diablo or what. Looking at the software now and reinstalling it.

Using Windows scaling of other than 100% can cause windows to appear incorrectly or partially obscured. Also, because the displayed objects
are 'pixel perfect' with respect to the display the image(s) generated for the display will probably be of an inferior quality.

Hah, that's neat.
 

eorange

♦RF Enabled Member♦
Joined
Aug 20, 2003
Messages
3,028
Location
Cleveland, OH
It looks pretty well-thought out and full featured. The only thing that could be a sticking point is they use a point-in-time copy of the Raspbian OS as a base. That could be a problem if you need patches or if there is a hardware incompatibility fix (think RTL stick) that has been addressed in Raspbian, but 4D stays behind. Unless their adapted OS can take patches and upgrades. I've seen this before with specialized hardware; you get left behind. Maybe it's not like that. Otherwise it looks great. I think the risk of trouble would probably be low for most apps.

Coding linux apps: you probably already know how, given your experience. In today's world that means Python, which has a pretty similar language structure that you're already familiar with. Device support is handled through libraries like PyGame and PySerial. Unfortunately that would mean a port of your existing C-like code to Python.
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,908
Location
N.E. Kansas
It looks pretty well-thought out and full featured. The only thing that could be a sticking point is they use a point-in-time copy of the Raspbian OS as a base. That could be a problem if you need patches or if there is a hardware incompatibility fix (think RTL stick) that has been addressed in Raspbian, but 4D stays behind. Unless their adapted OS can take patches and upgrades. I've seen this before with specialized hardware; you get left behind. Maybe it's not like that. Otherwise it looks great. I think the risk of trouble would probably be low for most apps.

Coding linux apps: you probably already know how, given your experience. In today's world that means Python, which has a pretty similar language structure that you're already familiar with. Device support is handled through libraries like PyGame and PySerial. Unfortunately that would mean a port of your existing C-like code to Python.

If you dig into the documentation they address the support issue. They also indicate it can support other OSs with some library modifications. I just skimmed it but it didn't seem to risky.

I need someone to just point me to a starting point and say here is where to start. Something like here is how you grab the serial data with it acting as a USB host and here is how you transmit and receive data using Python and the others you mentioned.
 

eorange

♦RF Enabled Member♦
Joined
Aug 20, 2003
Messages
3,028
Location
Cleveland, OH
I'd recommend starting like this. Get familiar with python on your PC:
- install Python 3
- install Visual Studio Code, and then in VSC get the Python Extension
- write a "hello world" program in Python.

That alone will get you going. Then:
- install PySerial
- Extend your Hello World program to read and print data from a Serial Device.

Now you're on your way. Next is to get this running on a linux device, which the easist thing for now is a Raspberry Pi. Get one and install Raspbian and install Python. Now you can FTP your Hello World program from your PC to the Pi and run it on the Pi. The serial device name /dev/ttyblah on the Pi will likely be different than on the PC, but everything else should port. See this for an example:

 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,908
Location
N.E. Kansas
I'd recommend starting like this. Get familiar with python on your PC:
- install Python 3
- install Visual Studio Code, and then in VSC get the Python Extension
- write a "hello world" program in Python.

That alone will get you going. Then:
- install PySerial
- Extend your Hello World program to read and print data from a Serial Device.

Now you're on your way. Next is to get this running on a linux device, which the easist thing for now is a Raspberry Pi. Get one and install Raspbian and install Python. Now you can FTP your Hello World program from your PC to the Pi and run it on the Pi. The serial device name /dev/ttyblah on the Pi will likely be different than on the PC, but everything else should port. See this for an example:

Thanks! This helps greatly.
 
Top