P25RX Arduino/Teensy Display project

Status
Not open for further replies.

goldmyne99

Member
Joined
Jul 23, 2018
Messages
274
I added one of these Wio Terminal units to my Digi-Key order today. They had 700 in stock :)
Nice find on Digi-Key. Amazon delivered mine on Friday. I really like it!

Here is the Wio Terminal running a highly modified version of my Arduino/Teensy handheld project code.

wioterm.jpeg

Seeed Studio has a nice wiki with a lot of info.


It is powered by 5 volts attached to the back GPIO pins. The USB Host example needed some tinkering to get it talking to and powering the P25RX.

A lot of hardware is packed into the 2.8 × 2.2 inch case. The 3 buttons and a 5-way joystick could send commands to the P25RX. I have not had time to convert my touch screen code to program any buttons, yet.


If I find some extra time - I may consider converting my handheld project Arduino code to help out P25RX DIYers with this Wio device. However, it is very unlikely my code will work with the new P25RX-II model.

@FreqNout I look forward to seeing any P25RX project you develop with your Wio Terminal.

Enjoy your P25RX!
 

btt

Jew lover
Banned
Joined
Mar 11, 2020
Messages
2,585
Location
Wa State
Nice find on Digi-Key. Amazon delivered mine on Friday. I really like it!

Here is the Wio Terminal running a highly modified version of my Arduino/Teensy handheld project code.

Seeed Studio has a nice wiki with a lot of info.


It is powered by 5 volts attached to the back GPIO pins. The USB Host example needed some tinkering to get it talking to and powering the P25RX.

A lot of hardware is packed into the 2.8 × 2.2 inch case. The 3 buttons and a 5-way joystick could send commands to the P25RX. I have not had time to convert my touch screen code to program any buttons, yet.


If I find some extra time - I may consider converting my handheld project Arduino code to help out P25RX DIYers with this Wio device. However, it is very unlikely my code will work with the new P25RX-II model.

@FreqNout I look forward to seeing any P25RX project you develop with your Wio Terminal.

Enjoy your P25RX!
I totally missed this post earlier. Great work! This is awesome. I will be looking into this further to see what needs to be done to create a standard API/interface for both P25RX models. That way, you would only need to write code once. This is an exciting development!
 

FreqNout

Member
Joined
Jul 23, 2021
Messages
297
Location
Chicagoland
I will be looking into this further to see what needs to be done to create a standard API/interface for both P25RX models.
An API would be very cool. I got my WIO Terminal running last night with a version of @goldmyne99 arduino sketch. Skip and hold buttons work well. This is a sweet display for less than $40. Thanks Mr. G99!!
 
Last edited:

goldmyne99

Member
Joined
Jul 23, 2018
Messages
274
@FreqNout Thanks again for bringing this WIO device info to the thread.

The api work should wait until after scanning support.

Only brainstorming here - this future suggestion may not be a true "API":

Add a feature in btconfig where a user can customize the usb datastream text format output (i.e. the console text output) for "stand alone" operation.

In other words, limit the output to a user defined format such as TG, RID, Freq, TG Alias, RSSI, etc. This can also reduce the output length to 64 bytes - the max packet size of the current WIO Terminal usb host library. This custom output would not be used if btconfig is running and displaying the info. Switching between the data output formats could possibly be done with a multi button push on the P25RX or a console command. Easy for me to suggest - may be hard to do.

This WIO terminal device has a lot of other possibilities for those that wish to experiment with their P25RX.
 

btt

Jew lover
Banned
Joined
Mar 11, 2020
Messages
2,585
Location
Wa State
I was kind of thinking along the same lines. Maybe use a 32/64-bit format word that the display could send to the P25RX, where each bit maps to a different parameter for the desired type of output? Then you could have a bunch of selectable output strings (that stay within the 64 byte limit) that only take up 4-8 bytes each. I'm thinking the output "string" would probably be binary (float or int32_t, int8_t, etcdetermined by the type) and one of the bits in the format word could control if there is a crc at the end of the output. I think something like that should be easy to get done.
 

goldmyne99

Member
Joined
Jul 23, 2018
Messages
274
I was kind of thinking along the same lines. Maybe use a 32/64-bit format word that the display could send to the P25RX, where each bit maps to a different parameter for the desired type of output? Then you could have a bunch of selectable output strings (that stay within the 64 byte limit) that only take up 4-8 bytes each. I'm thinking the output "string" would probably be binary (float or int32_t, int8_t, etcdetermined by the type) and one of the bits in the format word could control if there is a crc at the end of the output. I think something like that should be easy to get done.
Knowing what I do not know, I think I understand about 90% of your concept :)
All of my work has been novice level programming by parsing the current P25RX text usb serial output to display the info. Once you determine the best way to proceed, I look forward to testing and learning. No rush - my current P25RX text output parsing method works well.
 

btt

Jew lover
Banned
Joined
Mar 11, 2020
Messages
2,585
Location
Wa State
Knowing what I do not know, I think I understand about 90% of your concept :)
All of my work has been novice level programming by parsing the current P25RX text usb serial output to display the info. Once you determine the best way to proceed, I look forward to testing and learning. No rush - my current P25RX text output parsing method works well.
I'm happy to help however I can. I think the Arduino/Teensy is 'C' language for the most part. Is that correct? I'm going to get this done sooner than later. I plan on using the same protocol for BTConfig/BTCFG. I'm hoping this will eliminate some issues that some are having with incorrect RID / TG showing up in the log files. I also really want to see this display be used with the P25RX/P25RX-II!
 

goldmyne99

Member
Joined
Jul 23, 2018
Messages
274
I think the Arduino/Teensy is 'C' language for the most part.
Yes, Arduino is a C type language. I am certain you would have no issue with the coding. I need to get up to speed on the binary data format rather than the current text format used now.

The PJRC Teensy microcontroller and this Seeed WIO Terminal both can be programmed with the Arduino IDE. They both are also USB Host devices.

I designed/built my hand held project with the PJRC Teensy 4.0 mcu and hard wired an LCD display to it. A lot of work - but fun for me.

The Seeed WIO Terminal is a complete self contained device with the LCD and much more in the case. A USB C to USB C cable connects the WIO to the P25RX. It really could not be easier.
 

btt

Jew lover
Banned
Joined
Mar 11, 2020
Messages
2,585
Location
Wa State
I was thinking we could have a bit that enables ASCII/text output as well, but I think parsing the binary will actually end up being easier to use and definitely easier to validate. I will document it well and give an example of the complete structure. It will be straight forward and easy to use. Ah... PJRC, I remember buying an mp3 player that attached to a 3.5" hard drive from him a couple decades back. Good engineer!
 

dispatchgeek

Control channel goes "brrrrr"
Joined
Feb 29, 2004
Messages
339
Location
Between the cornfields and the pastures, Michigan.
I don’t have a Wio yet, and I certainly don’t have a programming brain like you folks do. What I do have though, is a good eye/brain for human interfaces. I am putting some thought into this device. It’s the perfect mobile control head for my application! The joystick mechanism has a lot of possibility, but how do we put it to good use here…. Hmm.
 

goldmyne99

Member
Joined
Jul 23, 2018
Messages
274
I am putting some thought into this device. It’s the perfect mobile control head for my application! The joystick mechanism has a lot of possibility, but how do we put it to good use here….

The joystick could be used to pick menu items or switch between screens, etc. The WIO is not a touchscreen so the joystick can add back that type of control. The WIO also has Wifi, Bluetooth, Micro SD Card slot... a lot could be created.

The Arduino IDE for programming the WIO opens up a lot of example code already on line. That gives a novice programmer - like me - a place to start.

Edit: What type of P25RX moble control head tasks are on your wish list?
 
Last edited:
  • Like
Reactions: btt

goldmyne99

Member
Joined
Jul 23, 2018
Messages
274
A quick update today on the Seeed Wio Terminal for use as a P25RX display and control device.

Non Programmers - good news.

The Seeed Wio Terminal can connect to a Windows 10 computer as a USB drive.
A firmware file can be copied to that drive to program the Wio Terminal.
This will make it easy to share P25RX/RXII display code with users that do not have a programming background.

More updates to come as progress continues...
 

btt

Jew lover
Banned
Joined
Mar 11, 2020
Messages
2,585
Location
Wa State
I received the Wio terminal ordered last weekend. I had some time to set-up the Arduino environment on Linux and play with it for a bit last night. This is the first time I've ever examined an Arduino type device. I can see why people like this platform for getting started with. It is a very quick way to get up and running with cut/paste code examples to try things out without getting all caught up in the low-level details in the beginning. This appears to be perfect for an application like this. One thing that @goldmyne99 mentioned in a previous post that I hadn't thought about much until receiving the device is that the power is going to have to be supplied from something other than the USB cable that will connect the display to the P25RX (USB Type-C to Type-C). On the backside of the Wio terminal, there is a 2-row, female pin header connector. Power could be supplied via this connector. I'm thinking one way to address the power supply would be to make a simple custom PCB with a male pin header that the Wio terminal could be connected to. The PCB would also have a USB connector and maybe a terminal block, or some other way to supply 5 volts to power both the Wio terminal and the P25RX (via the USB cable connecting them). For purposes of getting started on defining the upcoming binary P25RX communications interface protocol, I will be supplying the 5V power via some pads (intended for this type of development) on the P25RX PCB.

Next steps. I've started working on defining the protocol. The protocol will allow for very flexible control of what data is sent from the P25RX to the client device (Wio terminal, BTCFG, BTConfig, or other), control of the P25RX by the client device, monitoring of event types (affiliation, RID info, adjacent TG, etc). The protocol will be designed such that the blocks are 64 bytes (or less) due to the limitations that @goldmyne99 already mentioned. There will be 32-bit CRC for all block types available (optional). The goal is to end up with a very flexible, standard, well-documented communications protocol for monitoring, controlling, and configuring both models of the P25RX. Once the details/bugs are ironed out, this will result in better BTConfig/BTCFG software as well as making it possible to add-on new systems/applications like the Wio terminal with lots of functionality.
 

btt

Jew lover
Banned
Joined
Mar 11, 2020
Messages
2,585
Location
Wa State
Does the USB-C support power in while connected to as OTG? I know that was a limitation with micro USB OTG.
Not exactly sure what the standard says about this at the moment, but for this application, a custom cable Type-C to Type-C spliced with external power ( in this case power-only Type-A connector) does work fine. I'm running @goldmyne99's application fine here with a spliced cable. It was easy to program the Wio device with a single file (his application) by copying the file to a USB mass storage device (when the Wio is in bootloader mode). I have located some Y-cables that supply external power, but they are for "charging 2 devices only", so they probably don't include the 2 data lines. Will keep looking.
 

btt

Jew lover
Banned
Joined
Mar 11, 2020
Messages
2,585
Location
Wa State
This looks like it might be a nice solution for power. The Wio terminal will stack on top of this battery / power device which I think would provide power to the Wio terminal / P25RX while they are connected via a USB type-C to type-C cable.
 

goldmyne99

Member
Joined
Jul 23, 2018
Messages
274
Does the USB-C support power in while connected to as OTG?

I have tested both an OTG usb C adapter and a USB C to USB C cable. Both power the P25RX over usb.

Edit: No power IN...just OUT. Sorry...just re-read your post

The WIO has the option to get power in on the back GPIO pins.

Edit2: The USB standard for OTG power OUT and power IN is defined as an "Accessory Charger Adapter". That info is published in the "USB Battery Charging Spec." Version 1.2 Section 6... if you are looking for light reading.

This looks like it might be a nice solution for power. The Wio terminal will stack on top of this battery / power device which I think would provide power to the Wio terminal / P25RX while they are connected via a USB type-C to type-C cable.
I was considering it to test ..but out of stock when I looked for it.

I'm running @goldmyne99's application fine here with a spliced cable. It was easy to program the Wio device with a single file (his application) by copying the file to a USB mass storage device (when the Wio is in bootloader mode)

Great to see my alpha code running on your WIO!!!
 
Last edited:

goldmyne99

Member
Joined
Jul 23, 2018
Messages
274
Here is a simple way to power the WIO device without soldering a custom cable.

As an example solution, one of these usb screw terminal cables could provide 5 volt usb power.



Some solid copper wire - like "bell wire" - could be connected to the 5 volt and Ground screw terminals on the cable. The 5 volt solid copper wire connects to Pin 2 (or 4) on the WIO and the Ground solid copper wire connects to Pin 6 on the WIO. Hot glue could be used to secure them from disconnecting.
 
Status
Not open for further replies.
Top