yashsingh1/xdaforums huggingface dataset:
[Android Head-Units] jonalowe:
Here's what it looks like on my screen. Any way to have it dynamically resize to fill the screen?

Also notice the bar to the right of the Seek Down button. Is that an artifact or ??

My cable is supposed to be here late afternoon. Looking forward to trying it out.

One other suggestion other than presets; a "dark mode" for nighttime driving would be helpful. Just an onscreen toggle would be sufficient.

You do fast work!

Jon
[Android Head-Units] jonalowe:
Forgot the attachment...View attachment 4529835
[Android Head-Units] xdamember2:
The screen capture didn't get through. The bar was the result of an editing error, it was actually the seek up button. I'll do some testing before I repost again.

My plan was to use the extra space at the bottom for preset buttons. The blank space at the right is used by the subchannel list. I'm sure it's possible to fill the screen dynamically but I haven't read up on that yet.

I noticed a feature in the api for a night-mode layout. I wonder if that actually works. It may be useful.

---------- Post added at 10:59 AM ---------- Previous post was at 10:58 AM ----------

Yeah, that looks as I would expect.

---------- Post added at 11:07 AM ---------- Previous post was at 10:59 AM ----------

I don't know of a way to detect a popup without accessibility. On some HUs I found the Secure Settings app was able to enable Accessibility services even if they weren't visible, that may require root. Or maybe there's an app to show the hidden accessibility dialog (maybe even tasker can do it?). There's also the possibility of editing one of the system apks, to bypass the permission dialog. I did that at one point following a suggestion I found.

---------- Post added at 11:23 AM ---------- Previous post was at 11:07 AM ----------

Here's a new link with the Seek Up button, sorry about that.

https://1drv.ms/f/s!AmDh1XJ3vBtDjCqJirpa4F2HKnns
[Android Head-Units] xdamember2:
This is what I'm thinking of for presets:
[Android Head-Units] jonalowe:
I like that. And I like the dark interface. I might leave that up all the time.

Here's my screen, still one version back:

It worked without fuss, just had to give the USB permission. I'm impressed!

Note that text is running off the right hand side of the screen.

I guess I'll have to figure out Tasker, to give the USB permission, and to auto select the external sound input.

Took me a minute to figure out the difference between Up and Down HD, and Up and Down Channel. But I've got it now.

Now I'll install your latest version.View attachment 4530136
[Android Head-Units] jonalowe:
New version works fine, with the exception of the text on RH part of screen.
[Android Head-Units] xdamember2:
Here's a new one:

https://1drv.ms/f/s!AmDh1XJ3vBtDjCsLmV8qUEvbCCEQ

and the changes:

Server - reduced volume a bit. If you're happy the way it was you can stick with yesterday's server.

Gui - Information fields on the left and right are 1 or 2 lines as needed dynamically and should no longer be cut off. (but there's still a bug somewhere and the non-scrolling RDS text often drops the last character or two)

- Frequency is displayed while seeking

I tried to switch to a dark theme but no success as yet.

The preset buttons are present however they do not yet do anything.
[Android Head-Units] -=Jeff=-:
Glad to see some progress on this..
[Android Head-Units] jonalowe:
The frequency while seeking is much appreciated. A couple of times I hit the button twice because I wasn't sure it was doing anything.

Is there any reason the on/off and open/close buttons cannot be combined? I understand the need to reset occasionally, but couldn't combining them do both functions at once? If not, it would be nice is the open/close buttons could be highlighted somehow to tell the current state. If I'm not mistaken, the screen can currently indicate ON, when the system is closed. Confusing, to me, at least.

I'd suggest also labeling the Chann. Up/Dn buttons as Subchannel Up/Down. Clearer, at least to me. Or maybe delete them altogether, and let the HD Up/Down and regular Up/Down buttons handle cycling thru the Subchannels once you are on an HD station. That way you wouldn't miss subchannels while cycling thru stations looking for something to listen too. In other words, 105.9 > 106.1 HD1 >106.1 HD2 > 106.1 HD3 > 106.6. This would also work with steering wheel Up/Down buttons. My BMW with factory HD radio works that way (but that's about the only thing about that interface I like! I can't do subchannel presets, I can't direct tune a subchannel, if I shut the car off it reverts to HD1 of that station when I restart, rather than HD2 I was listening to).

Incidentally, I thought you said you made this work with steering wheel buttons, or were going to. How do you map to the buttons in this app? Are you picking up the head unit mapping?
[Android Head-Units] xdamember2:
I'll answer your last question first, I need to work on the rest.

The input side of my SWC is unique. The output side sends intents, including to the hd radio interface service. The server apk responds to these intents. Any means of sending these intents should work equally well. Here are the details:

Package: "HDCommProject.HDCommProject"

Class: "HDCommProject.HDRadio"

Intent type: start service

String Extra - Key "HDCommProject.HDCommProject.Command" responds to the following values:

"PowerOn"

"PowerOff"

"TuneUp"

"TuneDown"

"SeekUpAll"

"SeekDownAll"

"SeekUpHD"

"SeekDownHD"

"NextHDChannel"

"PrevHDChannel"

"Open"

"Close"

"AM"

"FM"

This all corresponds to the dialog buttons. I'm not sure which of the future changes will occur in the server and which in the gui. I am planning to retain the commands listed above but some of them may function slightly differently.

I noticed the "Off" button in the dialog was hooked up incorrectly, so FYI it doesn't work right now. The intent however should work ok.
[Android Head-Units] jonalowe:
Believe me, I'm not complaining. You've built a working app in just a few days that is plug and play with available hardware, and doesn't require root. Pretty amazing. And my suggestions are just that. Thanks for your hard work.

I noticed that the USB cable is listed as discontinued, although I had no problem ordering one. I found an old site on the way back machine that has info to make a serial cable. The cable that they sell is just an FDTI USB serial cable with a different serial connector, a couple of resistors, and a transistor to invert one signal. The diagrams are long gone, but pin to pin is provided, so people can make their own cables, if required. Link:

https://web.archive.org/web/20120414085318/http://www2.dasilvas.info:80/hd-radio
[Android Head-Units] xdamember2:
This is indeed valuable information.

I don't see where the cable says discontinued:

http://www.mo-co-so.com/HD-Radio-to-PC-Interface-p/mcs-mjs-hdr.htm

although I know Amazon indicates it's unavailable.

I'm enjoying working on this and I've learned a lot, these are new technologies for me.
[Android Head-Units] jonalowe:
The downloaded sample software on the CD iso file from their website had it in a "discontinued" folder. I originally found the cable through a Google search after I saw Amazon didn't have it, and it appears to be on an older version of their website. If you go to their main website, I couldn't find it listed. Don't know for sure.

I'd like to find the circuit diagrams for the inverter circuit that used to be on the wayback link I provided. I tried to search for them, but had no luck. I've got an FDTI USB serial cable, and I might give it a shot when I have time.
[Android Head-Units] xdamember2:
I'm getting close to posting another revision. I have one question; around here I haven't seen more than 3 subchannels, is this universally true? It seems to internally support at least 6.
[Android Head-Units] jonalowe:
I've heard there can be more, but I haven't seen it. Of course, I don't live in a major metropolitan area.
[Android Head-Units] xdamember2:
I checked and the most is 4 subchannels which is rare, now I support up to 4.

Here is a new release:

https://1drv.ms/f/s!AmDh1XJ3vBtDjCwEfEBVk8zPt5Sh

Changes:

Layout scales according to the screen properties. I tested it in the emulator.

Seek up/down and Seek up/down HD go to the next/previous subchannel if any. If seeking to the next lower frequency it can't start at the highest subchannel because it takes time for the HD to lock. Subchannel selection buttons are gone. This feature is in the service so it works with intents also.

12 working preset buttons, can be used for AM or FM, if the station is HD the Preset button displays the callsign otherwise the frequency. I'm not storing the subchannel number yet in the presets. I'm thinking about intents for next/previous favorite.

Combined On/Off with Open/Close. Dialog displays Off once the Off button is pressed.

Increased subchannels display from 3 to 4 subchannels
[Android Head-Units] xdamember2:
My app filters for just the vid and pid of the mjs cable, I suspect that not all FTDI chips are the same.
[Android Head-Units] jonalowe:
What vid and pid do you check for?

It will be a few days before I can try out your latest version. Hope you can wait.
[Android Head-Units] xdamember2:
Here it is in decimal:

usb-device vendor-id="1027" product-id="37752"

and in hex:

deviceVID == 0x0403 && devicePID == 0x9378
[Android Head-Units] jonalowe:
According to the site below, the MJS HD radio interface also uses PID 0x937C. The one you included is for a "generic" MJS interface. The VID is for any FTDI interface.

https://source.codeaurora.org/exter...lain/kernel/drivers/usb/serial/ftdi_sio_ids.h

I'll check the PID on my FTDI generic USB-serial interface. You might consider adding it for people who want to roll their own cable. It's possible with some FTDI software to change the VID of some generic FTDI serial devices, but that might be too big of an issue to deal with. I had to do it several years ago for a project.
[Android Head-Units] xdamember2:
If there's only one FTDI plugged in it's straightforward.

I've been working on the On and Off buttons some more.
[Android Head-Units] jonalowe:
My generic FTDI serial - usb cable is PID 0x6001. That matches the PID list reference I gave earlier. The reference also lists 0x6006 as an alternate to 0x6001. I'd suggest adding those two PIDs for those who want to roll their own.
[Android Head-Units] xdamember2:
I've incorporated this idea and made the on/off function the way the Windows app does. Also at this time it requests USB permission when the HU boots rather than when the HD radio is turned on.

Let me know if/when you'd like to try a new version or if I should post a screenshot. I switched the window background to black too.
[Android Head-Units] jonalowe:
Please post the new version, and I'll try it out. Thanks!
[Android Head-Units] xdamember2:
Here is the link for the APKs, a screenshot is attached:

https://1drv.ms/f/s!AmDh1XJ3vBtDjDOzxlRoYLahRpF8
[Android Head-Units] jonalowe:
Nice. I like the dark look a whole lot better.
[Android Head-Units] jonalowe:
Just tried to download the apks, but OneDrive says the folder is empty...
[Android Head-Units] xdamember2:
I'm not sure what happened, here's a new link:

https://1drv.ms/f/s!AmDh1XJ3vBtDjDa-r0tlDp5tz_wy
[Android Head-Units] jonalowe:
Unfortunately, that is also empty. Just checked, and I still can get your previous links, just not the last two. :(
[Android Head-Units] xdamember2:
So sorry this keeps happening. I'll try making a new folder for each update.

https://1drv.ms/f/s!AmDh1XJ3vBtDjD29oKwhXT_GAjiI
[Android Head-Units] jonalowe:
Got it![emoji16]

Seems to work fine. Scales properly on my screen, presets work, indication while seeking works, overall, good app! Dark mode is nice. Thanks for the improvements!

---------- Post added at 04:02 PM ---------- Previous post was at 03:57 PM ----------

BTW, I've been testing this on the bench, because the car it's going in is not ready to drive. Does the app respond to scan up/scan down from steering wheel buttons? I know the built in radio app does, but it is closely tied to the built in hardware. I don't know how other apps can accept those controls.
[Android Head-Units] hd54321:
Any ability for the station artwork?
[Android Head-Units] xdamember2:
Afaik the Directed tuner does not support it. The original faceplate is not very high res.

---------- Post added at 12:35 AM ---------- Previous post was at 12:29 AM ----------

I'm not sure about that, I have my own system for the SWC interface. I could add support for the media next and previous buttons but I don't know how that ties in with the SWC. I know there's an app for media source control on the forums, I can't say if it requires root.
[Android Head-Units] xdamember2:
When I get to it I'll check on the off chance the data is available.
[Android Head-Units] Donb10:
I downloaded HDCommProgect.HDCOMMProgect.apk

and attempted to run it on my third gen Moto G running Android version 5.1.1 and got a pop up saying:

" Parse error There was a problem parsing the package."

But I was able to install

Radio.apk and Radio2.apk and both installed and run albeit they are not the most stable.

Any suggestions why hdcommproject is causing a parsing error?

Thanks in advance for any help
[Android Head-Units] -=Jeff=-:
I too tried to install and got a Parse error.. What version of Android? I am trying this on a Nexus 7 with Marshmallow
[Android Head-Units] -=Jeff=-:
update for me.. Installed Nougat on the tablet and the apps work.. now to connect it to my HD tuner and see how it works..
[Android Head-Units] Donb10:
Jeff, Thanks for posting

The phone has Lollipop 5.1.1 and l was able to install radio.apk and radio2.apk.

The device I wanted to install HDCOMMPROJECT on, is my after market Android PuPug which is running Jelly Bean 4.2.2. I see 4.3.1 is out there so I may try upgrading at least to that.

I get the parsing error on the PuPug for Radio, Radio2, and HDCOMMPROJECT.apk

I enabled developer option on the PuPug. But it has a different wording than what I am used to which is allow install from Unknown Sources.

I will try some other .APKs including some I've written next on the Pupug and see if I can install any .APKs on it at all.

I also have a RCA tablet running Marshmellow I can try it on but I see Marshmellow did not work for you either and I really need it on the Pupug anyway.
[Android Head-Units] -=Jeff=-:
I have a feeling you will need Nougat for it to work, nothing less.. I have used Radio and Radio2 and they are okay (better than I could do) but have their quirks. If you run the HD tuner through an Aux in on the radio you get volume. I was running it on a Newsmy a couple years ago, but gave up on the Android as the audio is poor. I swapped to an Alpine. if the audio ever improved I would look into Android again.

I still need to connect up the tuner to the tablet just have not found the time
[Android Head-Units] Donb10:
Jeff,

Thanks for getting back. I posted to xdamember2 about my Parse issue but nothing yet.

I agree my "tube" powered PuPug Android Head Unit is running too old a version of Android. It is about four years old.

Audio is ok, as I use preamp out into my existing 996 factory amp.

I had looked into Pioneer but at the time HD and SiriusXM were external modules and rather expensive.

I see on my friends 2 year old Pioneer it has HD built in.

How will you connect the HD Radio PC Interface Cable to your Tablet? I see the cable is full size USB. I assume you will use a micro adapter?

I was looking into connecting the USB cable to a Blue tooth to USB adapter and writing code around blue tooth which can be coded thru RFO-Basic which I use. But the adapter is $50.00. I can buy a brandnew Android radio with Android 8.0 for under $300.00 and than be able to use the apk's in this post.

Thanks,

Don
[Android Head-Units] -=Jeff=-:
Yes I would use the Micro OTG adapter to the standard USB.. If it were me, buy the newer Android deck and use that. I decided to do the Alpine ( SiriusXM is external) but it has HD, Android Auto/Car Play

but I still long for the android unit, but would be wanting to upgrade with every new android version
[Android Head-Units] xdamember2:
Unfortunately I did not test it on anything prior to Nougat. I'll try to look into it, I'm moving so it probably won't be immediately.
[Android Head-Units] Donb10:
Jeff, Too bad the Android radios don't come with a HD tuner built in.

xdamember2,

Good luck with the move and good luck with solving the parsing error.

Maybe it is as simple as recompiling your code for antique Android OS's.

-Don
[Android Head-Units] stinger4321:
Nice work with this interface. I'm ordering components now can't wait to test it out. Have you considered moving this to the software development section? or creating you own post as op?
[Android Head-Units] stinger4321:
installed everything and it works great [emoji106] Question what are you guys using to resume after sleeping? my unit goes to videoin app upon wakeup and not the HD app. though?
[Android Head-Units] xdamember2:
From what I've seen the mtcmanager whitelists all packages named com.hiworld.*. I can try renaming, or anyone could see if apkeditor works, or even apktool.
[Android Head-Units] yves31:
Were you able to find the invert circuit diagram? Could you share your solution for making the cable?
[Android Head-Units] jonalowe:
I never found the circuit. You can probably still order the cable.
[Android Head-Units] riberet25:
Recommended Android head unit for HD radio

Could you please recommend a head unit I could use for achieving HD radio on the andriod platform?

Thanks

R
[Android Head-Units] stinger4321:
any Android unit. make sure it has 32gb storage and 4gb ram and you should be good. PX5 or better
[Android Head-Units] stinger4321:
Photo of my unit.. a bit dustyView attachment 4816165
[Android Head-Units] riberet25:
Will there be any development on utilizing the HD rado chipsets on the newer Android head units such as Joying and Dasaita? They run with the 6686 chipsets which are HD compatible with the right processing units.

Thanks
[Android Head-Units] jonalowe:
It would be nice, but I am not holding my breath. Unlike most of the rest of the world who use the DAB+ standard, north America chose a proprietary standard for digital radio that requires licensing fees both for the broadcasters and for the receivers. So the makers of the headunits have to come up with a separate design for north America and pay licensing fees in addition. The HD Radio standard has been reverse engineered, and crude, open source software is available for software defined radio receivers (SDR), but nothing robust enough for casual users or car radios. Anybody that tried to use that reverse engineered system commercially might face lawsuits.

For now, the best bet is to find one of the add on units described in this forum, the USB cable adapter and the Android software to go with it.

Even the commercial car radio manufacturers like Pioneer, Kenwood, and Sony have limited offerings of HD Radio, and many older receivers required add-ons similar to the Sirius-XM add-ons. Unfortunately, unlike the standard adapter now offered by Sirius-XM, no such animal exists for HD Radio.

I was hoping after DTS bought HD Radio, that they would eliminate licensing fees for the receivers to encourage the adoption of the standard by more radio stations. It's the chicken or the egg problem with radio stations holding off investing in the gear to broadcast HD Radio, and the car radio manufacturers holding off until more stations are available. If licensing fees were dropped for radio receivers, I think HD Radio would take off. As the reverse engineering showed it doesn't take much to decode the signal, and it would be peanuts to implement, mainly software, or a standard chip could be made.

Going with a proprietary standard for HD Radio with double licensing was a really stupid decision by the FCC years ago, and has stifled digital radio in North America in my opinion. I'm not saying we should have adopted DAB+ as it has its own issues with broadcasters limiting bitrate and quality to have more stations, rather than fewer, high bitrate stations. But we should have gone with open digital standards to encourage growth.
[Android Head-Units] riberet25:
Great reading..... Posted by Jonalowe

Thanks for this great writeup.
[Android Head-Units] FallsUpDown:
Hey, guys if i'm necroing the thread against some rules i apologize, but this does seem to be the only HDR thread i've seen that has useful info

I want to buy an android deck for my car, since my regular radio died, but hdr is a must have for me, so what i gather is

~$200 android units seem to be the cheapest out there(?)

I can't seem to find this cable that people are mentioning, since the site doesn't offer it anymore

but the current workaround is, get separate HD tuner, install it in the back via the cable to usb adapter, install apk, and good to go? I remember JVC used to have a separate hd tuner but it's also been discontinued

any recs on a good deck? only main things i'm looking for are screen mirroring support, wifi would be nice but not a dealbreaker, and price, since any deck can support hd with your guys methods

thanks in advance
[Android Head-Units] jonalowe:
Before the USB cable, there was a serial cable adapter. All the MJS cable did was build in the FDTI serial to USB adapter. Apparently, the serial cable pinout was posted somewhere in the past, but I haven't found it.

I'm using one of the MJS cables with an Android head unit and a Directed HD radio box. Any head unit should work with the app posted here. The author can also provide a recompiled version if your head unit has an older version of Android.

I'm also using the Headunit Reloaded app which provides Android Auto from your phone on Android Head units. It's more useful than mirroring, IMHO. And it's far cheaper than a dongle.
[Android Head-Units] FallsUpDown:
Thanks, any recommendations on the hd radio box/your setup? If i can get a hd radio and android unit for ~$200 on amazon/ebay i'd prob take it, seems that prices have actually gone up recently
[Android Head-Units] jonalowe:
The only HD Radio box the app and cable works with is the Directed unit, and another relable brand of the same box whose name escapes me. No recommendations on the head unit, as many are car specific, and sometimes it's a crapshoot on quality. I have a Binize 10" ultrathin unit, and it seems ok so far, but I've only had it installed a month or so.
[Android Head-Units] ufreeman:
Hello - I just noticed this site today. I have an Xtrons Android head unit and would like to add HD Radio capability. What hardware and cables would I have to purchase? What version of Android would I need on the head unit to run the apps? My head unit is getting a little out of date and I might upgrade to newer Android. Thanks