# 04 Jeep TJ install



## b0bd

Been asked by a few people on here on this, so here goes.

My build is based around the Nexus 7; it is currently running SmoothROM 5.1, with a custom build of the motley 249 kernel to include the kernel patches from USBROM (all credit due to Timur on the patches), as well as a couple of USB serial drivers that I need.

First the Jeep (btw this isnt my normal parking spot at the United Center)









Its a small vehicle in every way, so first off, test to see if the nexus 7 will fit:










its a tight fit, but looks like its going to work out.

Next part, mod the dash to fit the nexus 7. I'd like to say I know how to do this, but I don't. I had a local car audio custom shop mod the panel and install an amp. It was expensive, but the total was still less than a new double DIN radio with nav....

so how did it turn out? pretty good! a test of some streaming video over my home wifi.










Other hardware:
Behringer UCA-202 USB DAC
Directed DMHD1000 HD radio tuner
T-Mobile Sonic 2.0 4G LTE hotspot
5V dual out USB cigarette adapter

Software:
ROM: SmoothROM 5.1.
Kernel: Custom build of motley 249, with the power patches from Timur's USB kernel (big thanks for him)

Apps:
Torque Pro (OBD2 .. connects to a ODB2 adapter over bluetooth)
Tasker (to execute things when power is turned on/off)
b0bd's CarManager (manages USB audio devices and deals with pausing the DAC when the power goes off)
b0bd's Radio App (to control the radio tuner)
Waze (GPS navigation, really awesome realtime information)

Home screen










b0bd's Radio screenshot:










Torque screenshot:










Software

b0bd's Radio App

http://www.midml.com/~bob/radio.apk

Custom Flash of the customized motley kernel and CarManager app:

http://www.midml.com...rman_update.zip

(flash using CWM Touch)


----------



## dcplaya

Can you talk more about the HD Radio and how it interfaces with the N7. Does your app work with just that specific HD Radio? Id rather put that in instead of a AM/FM radio


----------



## b0bd

dcplaya said:


> Can you talk more about the HD Radio and how it interfaces with the N7. Does your app work with just that specific HD Radio? Id rather put that in instead of a AM/FM radio


sure,

the Nexus 7 is connected via a USB OTG cable to a 4 way hub.

You then can buy a custom built USB to HD radio cable here : http://www.mo-co-so.com/HD-Radio-to-PC-Interface-p/mcs-mjs-hdr.htm

or you can use a USB to RS232 serial cable and custom build a cable, details are here: http://www2.dasilvas.info/hd-radio

Right now the app is custom to the DMHD1000, or the HDZ300 but I've also have been playing with Arduino and considering building an FM tuner controlled by Arduino, but it would only be FM (no AM or HD).


----------



## that_kid

Nice install, I also have a HD1000 so I'll give this a shot too.

Sent from my SCH-I545 using Tapatalk 4 Beta


----------



## edwin108

Hello,

I'm thinking of using a similar setup in my car. How do you connect the HD radio and power USB cables to the N7?

Thanks

EDIT: Nevermind, I realized you used a USB hub.


----------



## TxAxZxZ

Hello,

I know this is somewhat an old thread but I have to ask. Could I use this on my Galaxy Tab 2 7.0? I haven't rooted it yet and I have the Visteon HD Radio from my old Jeeputer setup. The only thing I am missing from the Jeeputer to the Jeeptablet is FM radio. I understand I can stream radio but I would like to have FM access for those non data days.

Also, how did you power the Nexus 7 while using the OTG cable? the GT2 7.0 only has the one port and I can't charge the tablet if I'm using the port for USB.

Thanks!


----------



## b0bd

Its been a while, but I've updated the radio app to deal with a couple of crashes, and also issues with detecting the radio when other devices are showing up on the USB bus - on the off chance anyone else is using this app.


----------



## -=Jeff=-

Cool!!!

Any chance you could add more preset capabilities to it?

I assume it is the same link above for the newer version?

THANKS


----------



## -=Jeff=-

Any chance of adding more Presets? I do like the app so far I still get an occasional crash/ but it is much better

THANKS for Making this


----------



## jamieb122

bobd,

Any chance I can get the source for the HD Radio tuner? I just need to modify it to be able to use a bluetooth serial port and yours looks directly for usbserial it looks like. It looks great so far though

Thanks!

Jamie


----------



## -=Jeff=-

Yeah Source for it would be great.. like I said I would like to add more presets...


----------



## jamieb122

Jeff,

How many presets do you want?

Jamie


----------



## xapt3r5

Hey b0bd,

That's a very neat mod, you made there. My brother-in-law has a Jeep Grand Cherokee. I'm curious, what OBD interface are you using for reading data with Torque? What range of sensors and data are you pulling from it?


----------



## -=Jeff=-

jamieb122 said:


> Jeff,
> 
> How many presets do you want?
> 
> Jamie


I would like 10 total, sort of like a normal car radio.. 5 avail then press band for the next 5.. could be 10 buttons too..


----------



## jamieb122

Jeff,

I decompiled the apk back to source and started to mess with it some, my main purpose for doing so was to add Bluetooth Support but I realized it would be too difficult to replace the classes in the apk with custom implementations....

Instead, I am reimplementing the program, while using some of bobds messaging format (I think he pulled message formats from the HdRadioController) open source linux application. Either way, I will post the apk here when I am done if you are interested.

If you are interested in figuring out how to hook it up via bluetooth let me know. right now I am using a raspi with a bluetooth dongle with a SPP registered. That raspi is then connected to the HD radio tuner via mitch's usb cable. the whole point was to have a completely wireless solution for my nexus. In addition, I don't need a special kernel (no OTG+charging needed) because there are now no USB devices connected to the nexus. When the whole thing is built out, I will post some pictures...

After I get the app working well I will probably replace the raspi set up with an Ardiuno with BlueSMIRF to a serial cable (like mitch's old cable). This will eliminate the longer boot times of the pi (which I have at around 18 seconds right now).


----------



## -=Jeff=-

YEs I would love any details you have for bluetooth connections.. if I do that then I can remove the physical volume control and run it through the tablet. that is one downside to the HD tuner.. Just tell me what I will need to buy to to this and I will I think it will be better than running it through the monitor of the USB DAC.


----------



## jamieb122

Jeff I am nearly done re-implementing this with a caveat or two......

The tablet is connected via bluetooth to a raspberry pi with a custom python script which forwards the bluetooth virtual serial port (/dev/rfcomm0) to the mitch's cable (/dev/ttyUSB0) and vice versa.

The sound does NOT play back through the tablet via bluetooth (it still goes to an audio amp).

That being said...I think I CAN get it so you can control the volume of the radio using the tablets built in audio slider. I access the slider using a custom gesture from GMD gesture APK found in the app store. Was that your end goal?

So to implement my solution you would need a raspberry pi (with a bluetooth dongle) and mitchs USB cable. The only other piece I will need to make is a shutdown circuit for the pi so it shuts down cleanly when I turn the truck off.

Does all of that make sense?


----------



## jamieb122

Jeff,

Not sure if you are still watching this, but this is where I am,

I got volume control to work within the tablet, in particular:

1. Changing volume via hard buttons on side of tablet changes volume for the tuner and the tablet

2. Changing volume gesture from GMD gesture control changes volume for the tuner and the tablet

3. Changing volume via buttons I have built into the app changes for the tuner and the tablet

Also, I am nearly done with the ability to add an arbitrary number of presets (give me another day or two).

To eliminate the raspberry pi I am going to try to play with a bluetooth to RS232 converter, I just need to find the pinout for the mini din.....if you have seen one laying around it would greatly speed up the implementation.

If we get that last piece all you will need is (2 of which you already have):

1. Tablet with my APK

2. Bluetooth dongle

3. The HD Radio module

We are very close!!

As a bonus here is a screenshot....the gray area at the bottom will be where the presets row is....you will be able to scroll horizontally to see more presets


----------



## -=Jeff=-

Sweet..

Sorry been out of town without Internet access


----------



## -=Jeff=-

One more question. Will the bluetooth be required to make it work or can you connect Mitch's cable direct to the tablet?


----------



## jamieb122

Jeff,

Right now it is required....but I may have it working with a cheap little $50 bluetooth dongle (should be pretty plug-n-play)...

Do you have your system mounted permanently or removable?


----------



## -=Jeff=-

Mine is permanent mount


----------



## -=Jeff=-

If I need to get a Raspberry pie and an adder board I can do that. but since I am a permanent install the thought of wired is always better

As for the volume control I am using the USB-ROM from Timur with that my audio is through the USB-DAC and I am now curious how the volume is adjusted on the tablet for the HD tuner..

Thanks for the modifications, looking forward to trying out what you have. Any chances of other functionality from the Respberry PI that can be controleld from the tablet? like Amplifier on/off or any other basic switching?


----------



## -=Jeff=-

Jamie...

Any progess?

EDIT..

I did not find any good info on the Pin out other than, it is not standard..


----------



## -=Jeff=-

Any updates from anyone on this?


----------



## slmtiger

Any progress on the volume control? The HDRadio app looks great. I purchased a Nexus 7 and a Directed HD tuner to replace the factory head unit in my Sierra but haven't gotten past the volume control issue. i would love to hear if you've been able to solve it.


----------



## -=Jeff=-

anything? bueller?


----------



## jamieb122

Hey guys, sorry I got real busy at work and put this on hold.....I just picked it back up and I am trying to make it wired. Unfortunately, I can't get mitchj's cable to be recognized by the current app. Are you all using mitch's cable or something else? If so, what version of Android are you running?


----------



## -=Jeff=-

I am using 4.2.2 might try 4.4

Yes using mitch's cable. Does your setup with arduino use mitch's cable?


----------



## jamieb122

How the heck do you attach a file here?

Not a finished product at all.....but test this with mitches cable and let me know if it works on yours. I am running 4.4.4 with a 2013 nexus (got one for cheap). It should all work though. Also, I don't believe you need root for this. If you can tell me where to upload I will upload the current version.


----------



## -=Jeff=-

Email it?

vettxtc @ gmail . com

-remove the spaces-

Then I can give it a try

Is the app name different than the original?


----------



## jamieb122

Just sent it, shoot me some feedback when you can...


----------



## -=Jeff=-

I sent you email as well, I get a parsing error with 4.2.2 and it cannot install. I will need to pull the tablet out of the car to test it on my 4.4.4 Tablet.. the N7 2013 it installs but the tuner is connected to the 4.2.2 version


----------



## jamieb122

When you tried to install or run? What did the error say exactly?


----------



## -=Jeff=-

jamieb122 said:


> When you tried to install or run? What did the error say exactly?


I will check it in the next couple days.. I have it on a 4.4.2 stick, I want to see if it will connect.. again, give me a couple days..

Thanks


----------



## -=Jeff=-

OK I got testing done, but the battery died in my car ...

Anyway

video 1

https://drive.google.com/file/d/0B5WZBOc_LAb4ZG1oWmpmaFliNm8/view?usp=sharing

the power button does not seem to work well.. I had to force close the app and restart (with unplugging the cable)

The Volume once in a once when pressing (-) with get super loud, then soft again..

A slider for tuning would be nice if possible in addition to what is there.

AM/FM switch seemed to work but got weird in the last video but I think that was my battery.. the volume and power were from when I first connected everything

https://drive.google.com/file/d/0B5WZBOc_LAb4LTJkdW9yTjdiVTg/view?usp=sharing

I was unable to test it with the tablet as I wanted to see if it worked with my android stick and App Radio, since that works that is what I will use

Android version was (4.4.2)


----------



## -=Jeff=-

Oh one more..

the band button would be awesome if it showed which band FM or AM.. instead of just band..

but it works pretty darn good.. I am happy so far


----------



## slmtiger

Nice progress on the app! I have been holding off on my install until I knew how i wanted to handle the AM/FM part. This is starting to look good.


----------



## jamieb122

Jeff,

Thanks for the taking it for a test run, I hadn't even thought about running it on an appradio with an android stick....Which version AppRadio is that?

The power button is actually janky for a reason, the HD-Radio module requires three messages to actually power up: Power (On), Volume(some #) and (I think) a tune message (could be a mute off message though). Each one has to be sent with some arbitrary delay, seems to work best with about 300 ms in between resulting in a nasty pause when hitting power.

Other notes, the volume buttons can be long pressed (no need to tap). My radio started doing the really loud volume too....I'll take a look at it to see what it might be

You should look at getting UMD gesture control for killing the app and volume control. I have a gesture which pops up a volume controller (but I am assuming you use your App Radio for volume).

I'll take a look into the AM/FM band thing....shouldn't be too hard to integrate. I'll also take a look into a slide for tuning, might be a bit before I get that one done because I would want it to be more than a simple slider

Does overall stability seem better (as far as crashes) compared to bobd's version?


----------



## adriantaylor09

Hey there, I'm pretty keen to give this app a try... I have a 2013 N7 with directed HD radio and Mitches USB cable and can give you as much feedback as you like!!

Do you have a link to the APK? if not you could email it to adrian . trademe @ gmail . com


----------



## -=Jeff=-

jamieb122 said:


> Jeff,
> 
> Thanks for the taking it for a test run, I hadn't even thought about running it on an appradio with an android stick....Which version AppRadio is that?
> 
> The power button is actually janky for a reason, the HD-Radio module requires three messages to actually power up: Power (On), Volume(some #) and (I think) a tune message (could be a mute off message though). Each one has to be sent with some arbitrary delay, seems to work best with about 300 ms in between resulting in a nasty pause when hitting power.
> 
> Other notes, the volume buttons can be long pressed (no need to tap). My radio started doing the really loud volume too....I'll take a look at it to see what it might be
> 
> You should look at getting UMD gesture control for killing the app and volume control. I have a gesture which pops up a volume controller (but I am assuming you use your App Radio for volume).
> 
> I'll take a look into the AM/FM band thing....shouldn't be too hard to integrate. I'll also take a look into a slide for tuning, might be a bit before I get that one done because I would want it to be more than a simple slider
> 
> Does overall stability seem better (as far as crashes) compared to bobd's version?


I am using an App Radio 2 along with a mk809iii Android Stick. I was going to keep the tablet in the car, but I am not super happy with the install aesthetics. I want a bezel to get the the edge of the screen but cannot do it the way I want. the App radio ends up acting as the screen interface, this way I can put the Stick in a spot that is easy to access if i need to swap it our whatever. my other reason is being able to have my phone connected too for hands free (I cannot do that with a tablet)

Cool on the long press volume, I was tapping because i heard the softer... then LOUD then Softer on the volume and in the video I was trying to reproduce it then the battery died. My ultimate goal is the App Radio for volume. I think the AM/FM button should just be a android display thing, meaning when I press band it will display the other band i can choose. not sure you need communication with tuner for that

As for crashes, I think because I did not know what to expect for the power button, I thought that might be an issue. that said, with the app radio and the stick, the stick will reboot every time I start the car so everything will start fresh (down side over the tablet, but I found the tablet was quirky enough that I had to reboot the tablet too) I am now tempted to buy another HD tuner and cable for testing outside the car.. I REALLY like the Presets that is my favorite option

OH yeah, what will be in the settings. I did not see anything there


----------



## jamieb122

Jeff any reason you aren't using the fm tuner in the app radio?

I am starting to eye the new app radio 4,

When a call come in does it have an indicator on screen even when you are mirroring the android stick? Can you answer and dial a call from the head unit when mirroring in android?

The reason I ask, is I would love to have the nexus7 or an android stick mirror to the app radio and have my phone synced separately, but still be able to answer calls etc. On top of that how are you getting GPS for the android stick?


----------



## -=Jeff=-

jamieb122 said:


> Jeff any reason you aren't using the fm tuner in the app radio?
> 
> I am starting to eye the new app radio 4,
> 
> When a call come in does it have an indicator on screen even when you are mirroring the android stick? Can you answer and dial a call from the head unit when mirroring in android?
> 
> The reason I ask, is I would love to have the nexus7 or an android stick mirror to the app radio and have my phone synced separately, but still be able to answer calls etc. On top of that how are you getting GPS for the android stick?


So for the last year I have had a tablet installed in my dash using Timur's ROM. I have recently decided to go back to the App Radio due to aesthetics with my install and some limitations I have with it.

I will use the App Radio tuner, but I like the HDTuner and HD Radio so I would like to retain that option with the App Radio.

I have not installed the App Radio and tested getting a call so I don't remember what happen if you are on the android side. I do have the Android Stick running ont he App radio and my phone is connected for the phone portion no apps.

I am using AppRadio Unchained Reloaded which injects the GPS form the App Radio to the Stick (using mock locations)

App Radio will be reinstalled in the next couple of months

Oh and I do like that App Radio 4.. it is looking nice


----------



## jamieb122

Jeff,

Did you have any issues with interference when you hooked up the HD radio? When I hooked mine up, it won't get a good tune. What is wierd is that I think it is getting its ground connection from the cars antenna. What make this weird is that means it is bypassing the little filter box provided with it. Did you have any issues with it when you hooked it up?

Jamie


----------



## -=Jeff=-

None other then the fact that the reception in my car is not the greatest.. But other than that it works fine


----------



## slmtiger

Is there a way that I can get a copy of the latest HD Radio app that you have been working on? I would love to try it out on my Nexus 7 install over the holidays. Thanks


----------



## b0bd

Big update to the HD Radio App I wrote. I effectively re-wrote it. Has all new UI look, unlimited favorites, Notification Drawer Support, Lock Screen support and Direct Tune (maybe this helps it work in europe?) . Also Settings supports control of the tuner volume when playing or ducked, as well as an in-dash mode to start/stop tuner on power events.

anyway download link:

http://www.midml.com/~bob/radio2.apk

Feedback always welcome.

Some tips:

Tap the "heart" icon to add or remove the current tuned as a favorite.

Long hold of "heart" will flip the favs between frequency and callsigns (callsigns for HD only)

Tap the "FM/AM" indicator to switch bands


----------



## -=Jeff=-

HI b0bd

I will try this out tonight or tomorrow.. Any chance of an option for a dark back ground? the white will be a bit bright for me especially at night..

Does the Android Device need to have root for it to work?

I can try it on my tablet and my App Radio set-up and then I have another set-up once I receive it to test out..

THANKS


----------



## mzisman

b0bd, thanks for your work on this app! I was using your original version in the op but wasn't able to set preset stations. Then I switched over to a radio app by jamieb122 (big thanks to you too!) and am able to get most everything I want.

I tried to use your new radio app on my Nexus 7 (2013) fixed install setup but I cannot get it to work. I can hear the radio turning on and off when I open and close the app. The tuner is also showing up in the notification bar but it says "No tuner". The signal strength bar seems to be updating but no stations are playing or showing. I've tried pushing some of the buttons but that only causes the app to crash. Tuner also has superuser permission and I can access the settings just fine. I am able to control the radio through jamieb122's apps so I know everything is connected correctly. Are there any special setup/plug in orders? I tried uninstalling all other radio apps but still no luck.

Thanks again!


----------



## -=Jeff=-

I think he relies on the serial driver being in the kernel.. Jamie's has it included

b0bd's did not work for me either

(using Autodroid on a N7 2012)


----------



## b0bd

It does rely on a serial port driver and root, to answer the questions.


----------



## mzisman

I'm using Timur's 2013 kernel and posted in the support forum about adding a serial port driver. He (timur) said that the "kernel has CP210X and FTDI serial IO drivers added on top of the default kernel". I'm not too sure what this means but did you do anything in addition to the aforementioned? Timur said your new app should work so I appreciate any info you can provide.

Thanks


----------



## b0bd

Does the old version of the app work?


----------



## mzisman

yep

Here is a video of all the apps: Tuner video


----------



## b0bd

mzisman: I updated the app to send a tuner power on request, maybe you need it with the cable you have. let me know. also if you could logcat and post the com.midml.radio2 entries, that might help me.


----------



## mzisman

Just to update everybody, b0bd reached out to me and after some logging, the app is working for me. He has already updated the download link in his original preview post on pg 5.


----------



## mzisman

Made the jump to Lollipop and am having trouble with all radio apps. Got Jamie's to work once, momentarily but have not gotten it to work again


----------



## justsaye

I made the jump to Lollipop too and it stopped working. It seems to be a permission problem for what I can tell.

avc: denied { write } for name="[email protected]@boot.art" dev="mmcblk0p30" ino=684100 scontext=u:r:shell:s0 tcontext=ubject_r:dalvikcache_data_file:s0 tclass=file

avc: denied { read } for name="ttyUSB0" dev="tmpfs" ino=80495 scontext=u:r:untrusted_app:s0 tcontext=ubject_r:radio_device:s0 tclass=chr_file

It worked fine with Android 4.4.4

Using:

Nexus 2013

Lollipop 5.0.2

Timur's Kernel v3 beta

*Android Logcat*

02-19 22:00:04.181 D/RADIO (11603): tuner started

02-19 22:00:04.182 D/RADIO (11603): can read /proc/tty/driver/usbserial

02-19 22:00:04.179 W/Thread-368(11622): type=1400 audit(0.0:702): avc: denied { read } for name="ttyUSB0" dev="tmpfs" ino=80495 scontext=u:r:untrusted_app:s0 tcontext=ubject_r:radio_device:s0 tclass=chr_file

02-19 22:00:04.188 D/RADIO (11603): potential serial entry: usbserinfo:1.0 driver:2.0

02-19 22:00:04.188 D/RADIO (11603): potential serial entry: 0: name:"FTDI USB Serial Device" vendor:0403 product:9378 num_ports:1 port:1 path:usb-msm_hsusb_host-1.3

02-19 22:00:04.189 D/RADIO (11603): potential ports: [usbserinfo:1.0 driver:2.0, 0: name:"FTDI USB Serial Device" vendor:0403 product:9378 num_ports:1 port:1 path:usb-msm_hsusb_host-1.3]

02-19 22:00:04.189 D/RADIO (11603): trying port /dev/ttyUSB0

02-19 22:00:04.190 D/RADIO (11603): chmod for /dev/ttyUSB0

02-19 22:00:04.281 D/RADIO (11603): got 0, favs = []

02-19 22:00:04.283 I/MediaFocusControl(613): AudioFocus requestAudioFocus() from [email protected][email protected]

02-19 22:00:04.283 D/RADIO (11603): request audio focus, granted? true

02-19 22:00:04.309 D/OpenGLRenderer(11603): Render dirty regions requested: true

02-19 22:00:04.315 D/Atlas (11603): Validating map...

02-19 22:00:04.338 I/Adreno-EGL(11603): <qeglDrvAPI_eglInitialize:410>: QUALCOMM Build: 10/28/14, c33033c, Ia6306ec328

02-19 22:00:04.339 I/OpenGLRenderer(11603): Initialized EGL, version 1.4

02-19 22:00:04.356 D/OpenGLRenderer(11603): Enabling debug mode 0

02-19 22:00:04.471 I/ActivityManager(613): Displayed com.midml.radio2/.MainRadioActivity: +528ms

02-19 22:00:04.487 D/AndroidRuntime(11634):

02-19 22:00:04.487 D/AndroidRuntime(11634): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<

02-19 22:00:04.491 D/AndroidRuntime(11634): CheckJNI is OFF

02-19 22:00:04.479 W/Thread-368(11622): type=1400 audit(0.0:703): avc: denied { read } for name="ttyUSB0" dev="tmpfs" ino=80495 scontext=u:r:untrusted_app:s0 tcontext=ubject_r:radio_device:s0 tclass=chr_file

02-19 22:00:04.479 W/app_process32_o(11634): type=1400 audit(0.0:704): avc: denied { write } for name="[email protected]@boot.art" dev="mmcblk0p30" ino=684100 scontext=u:r:shell:s0 tcontext=ubject_r:dalvikcache_data_file:s0 tclass=file

02-19 22:00:04.492 D/RADIO (11603): no access to /dev/ttyUSB0

02-19 22:00:04.479 W/app_process32_o(11634): type=1400 audit(0.0:704): avc: denied { write } for name="[email protected]@boot.art" dev="mmcblk0p30" ino=684100 scontext=u:r:shell:s0 tcontext=ubject_r:dalvikcache_data_file:s0 tclass=file

02-19 22:00:04.489 W/Thread-368(11622): type=1400 audit(0.0:705): avc: denied { read } for name="ttyUSB0" dev="tmpfs" ino=80495 scontext=u:r:untrusted_app:s0 tcontext=ubject_r:radio_device:s0 tclass=chr_file

02-19 22:00:04.493 D/RADIO (11603): potential serial entry: usbserinfo:1.0 driver:2.0

02-19 22:00:04.493 D/RADIO (11603): potential serial entry: 0: name:"FTDI USB Serial Device" vendor:0403 product:9378 num_ports:1 port:1 path:usb-msm_hsusb_host-1.3

02-19 22:00:04.493 D/RADIO (11603): potential ports: [usbserinfo:1.0 driver:2.0, 0: name:"FTDI USB Serial Device" vendor:0403 product:9378 num_ports:1 port:1 path:usb-msm_hsusb_host-1.3]

02-19 22:00:04.493 D/RADIO (11603): trying port /dev/ttyUSB0

02-19 22:00:04.493 D/RADIO (11603): chmod for /dev/ttyUSB0

02-19 22:00:04.626 D/AndroidRuntime(11634): Calling main entry com.android.commands.am.Am

02-19 22:00:04.647 D/AndroidRuntime(11634): Shutting down VM

02-19 22:00:04.753 D/AndroidRuntime(11659):

02-19 22:00:04.753 D/AndroidRuntime(11659): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<

02-19 22:00:04.756 D/AndroidRuntime(11659): CheckJNI is OFF

02-19 22:00:04.749 W/app_process32_o(11659): type=1400 audit(0.0:706): avc: denied { write } for name="[email protected]@boot.art" dev="mmcblk0p30" ino=684100 scontext=u:r:shell:s0 tcontext=ubject_r:dalvikcache_data_file:s0 tclass=file

02-19 22:00:04.781 D/RADIO (11603): no access to /dev/ttyUSB0

02-19 22:00:04.769 W/Thread-368(11622): type=1400 audit(0.0:707): avc: denied { read } for name="ttyUSB0" dev="tmpfs" ino=80495 scontext=u:r:untrusted_app:s0 tcontext=ubject_r:radio_device:s0 tclass=chr_file

02-19 22:00:04.781 D/RADIO (11603): can read /proc/tty/driver/usbserial

02-19 22:00:04.782 D/RADIO (11603): potential serial entry: usbserinfo:1.0 driver:2.0

02-19 22:00:04.782 D/RADIO (11603): potential serial entry: 0: name:"FTDI USB Serial Device" vendor:0403 product:9378 num_ports:1 port:1 path:usb-msm_hsusb_host-1.3

02-19 22:00:04.784 D/RADIO (11603): potential ports: [usbserinfo:1.0 driver:2.0, 0: name:"FTDI USB Serial Device" vendor:0403 product:9378 num_ports:1 port:1 path:usb-msm_hsusb_host-1.3]

02-19 22:00:04.784 D/RADIO (11603): trying port /dev/ttyUSB0

02-19 22:00:04.784 D/RADIO (11603): chmod for /dev/ttyUSB0

02-19 22:00:04.779 W/Thread-368(11622): type=1400 audit(0.0:708): avc: denied { read } for name="ttyUSB0" dev="tmpfs" ino=80495 scontext=u:r:untrusted_app:s0 tcontext=ubject_r:radio_device:s0 tclass=chr_file

02-19 22:00:04.891 D/AndroidRuntime(11659): Calling main entry com.android.commands.am.Am

02-19 22:00:04.908 D/AndroidRuntime(11659): Shutting down VM

02-19 22:00:05.036 D/AndroidRuntime(11693):

02-19 22:00:05.036 D/AndroidRuntime(11693): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<

02-19 22:00:05.039 D/AndroidRuntime(11693): CheckJNI is OFF

02-19 22:00:05.029 W/app_process32_o(11693): type=1400 audit(0.0:709): avc: denied { write } for name="[email protected]@boot.art" dev="mmcblk0p30" ino=684100 scontext=u:r:shell:s0 tcontext=ubject_r:dalvikcache_data_file:s0 tclass=file

02-19 22:00:05.077 D/RADIO (11603): no access to /dev/ttyUSB0

02-19 22:00:05.069 W/Thread-368(11622): type=1400 audit(0.0:710): avc: denied { read } for name="ttyUSB0" dev="tmpfs" ino=80495 scontext=u:r:untrusted_app:s0 tcontext=ubject_r:radio_device:s0 tclass=chr_file

02-19 22:00:05.069 W/Thread-368(11622): type=1400 audit(0.0:711): avc: denied { read } for name="ttyUSB0" dev="tmpfs" ino=80495 scontext=u:r:untrusted_app:s0 tcontext=ubject_r:radio_device:s0 tclass=chr_file


----------



## -=Jeff=-

Just Jamie's works for me.. I am not on Timur or Autodroid anymore and Jamie's has the serial driver wrapped in it.. Now I am limited to the audio connection so I don't think I will be using the HD tuner


----------



## mzisman

Justsaye: Thanks for breaking down the log. I've messaged bobd quite a bit and feel bad about heckling him.

jeff: Are you on lollipop?


----------



## -=Jeff=-

no, I was going to use the Newsmy N3001 unit with the HD tuner, but I cannot do it in a clean way so I am skipping the HD tuner for now

still on Kitkat


----------



## b0bd

I am working on updating the HD Tuner App with the FTDI driver builtin, so wouldn't need root or a kernel w/ the usbserial driver compiled in.

Also working on a very special update to add more functionality, but I want to demo screenshots before I reveal it!


----------



## b0bd

First pic of new functionality coming soon :grin:


----------



## lbdroid

b0bd said:


> First pic of new functionality coming soon :grin:


Hi b0bd, I'd really appreciate it if you could put the source for this on your github. I think a lot of people, in particular myself, would like to be able to customize it as well as contribute to development. I can't see this being a problem, since it doesn't look like you are commercializing the software... so open source can only make it easier *for you*.

Also I noticed you talking about building a custom radio in post 3... In addition to the DMHD1000, I will definitely be doing that as well. Have you looked at the si4737 chip though? It does AM, FM, and weatherband. They also have some more chips in the si47xx/48xx family that can do HD and other things. I'm skipping the arduino part of it though, since I'm embedding an IFC6410 board in my dashboard, and it has a pretty awesome array of GPIO/I2C/I2S/SPI ports that can be hooked up to directly.


----------



## mzisman

This is exciting! I had all but given up on the fm route. Will need to reinstall the tuner.


----------



## lbdroid

Well, doesn't look like this is going anywhere all that fast. Maybe spirit will make a decent platform: https://github.com/mikereidis/spirit2_free

Too bad its ugly as sin....


----------



## mzisman

I looked into spirit but it doesn't seem like there is any hope of it being compatible with the Nexus 7.

b0bd, is your new app running okay on lollipop?


----------



## lbdroid

mzisman said:


> I looked into spirit but it doesn't seem like there is any hope of it being compatible with the Nexus 7.
> 
> b0bd, is your new app running okay on lollipop?


Do you understand what "open source" means? It means that YOU can make it compatible, all by yourself. No depending on the original author to add support for anything.


----------



## mzisman

From what I have read, spirit depends on taping into the FM capabilities of the chipset. From the pages I've read (admittedly not all of them in the thread) all but one Nexus device are grounded in a way that makes it impossible for spirit to function properly. I always thought open source referred to software but I guess someone with the know how could make the hardware compatible, all by themselves.


----------



## lbdroid

mzisman said:


> From what I have read, spirit depends on taping into the FM capabilities of the chipset. From the pages I've read (admittedly not all of them in the thread) all but one Nexus device are grounded in a way that makes it impossible for spirit to function properly. I always thought open source referred to software but I guess someone with the know how could make the hardware compatible, all by themselves.


Whether the device physically has a radio that is correctly wired to work or not is irrelevant to the software. OBVIOUSLY IT WON'T WORK IF YOU HAVE NO RADIO OR THE ANTENNA PIN IS GROUNDED. It makes NO DIFFERENCE what software you run in that case. NONE WILL WORK.


----------



## mzisman

Can you clarify the value of Spirit to this install, or any other Nexus 7 head unit?

I'm confused by your suggestion that spirit will be useful.


----------



## lbdroid

Are you really asking that? It is an OPEN SOURCE RADIO CONTROL APPLICATION. Its applicability is OBVIOUS.

You can run that program (with appropriate modifications, which are possible BECAUSE it is open source) to control ANY radio from ANY device.

It is pretty obvious from lack of OP's presence here, that his little program is dead, so there really are two options;

1) reinvent the wheel and write a NEW program from the ground up,

or

2) make minor/trivial adjustments to a program that *ALREADY EXISTS*.

The difference between (1) and (2) is months of software development, where (2) is a few hours at most.


----------



## -=Jeff=-

I am revisiting this Tuner for use again.. any new updates from either that have been working on it?


----------



## lbdroid

-=Jeff=- said:


> I am revisiting this Tuner for use again.. any new updates from either that have been working on it?


You probably should consider existing android applications as being dead.

The good news though, is that it is pretty trivial to deal with. Turns out that these clowns were just pretending to be really awesome software devs by NOT releasing the source code for their trivial UI that runs someone ELSE's open source work.

http://andy.dynamicbits.com/hdradio/

And more important;

http://halblog.com/hdradiocontroller.html

Now that second link contains the source code for the actual interface library.

Go into the src/ directory, type "make", find that the compile errors out at hdcontrol.cpp:602. Edit that file, and just *comment out* that line. All that line does, is it converts all of the characters you input from the keyboard from upper case into lower case. So simple solution is to just NOT type in anything in upper case. Easy. Now it will compile.

It spits out two useful files;

hdrclib.a -- the hd radio control library, which can be statically linked into a binary (see hdcontrol.cpp for what to include in your own project),

AND

hdrc -- binary executable radio control program. This software runs in the terminal. Edit the config files (in src/hdradio/) to match your serial port, start the application "./hdrc", and you can begin issuing simple commands to control the radio. Things like "volume 100", and "tune 999 fm", and "seekup".

Want to make an application to wrap around that library? VERY easy to do.


----------



## lbdroid

FWIW: I *have* been, off and on, working on an Android GUI wrapper for that library. The library, though works, is quite poorly written. I've leaned it out a huge amount by dropping features that make absolutely no sense (like storing favorite channels on the radio's internal storage, rather than on the FRIKKIN COMPUTER YOU ARE RUNNING IT ON!!!!!), and stripping it of dependencies that are redundant and stupid, like using a complex data structure like a vector where a 32 byte integer array would be more than adequate. I'm also stripping out its use of a config file, since the whole use of it can be replaced by a single commandline parameter. There are some other things stored in the config file that are really the responsibility of the application *implementing* the library, and not the library itself. I.e., things that SHOULD be stored, in the case of an Android application, in an sqlite database. He's also got some stupid crap in it, like iterating over all the serial devices in /dev and probing them dangerously to see if they respond like an hdradio. Imagine if you're programming a PROM and just want to listen to some radio while its going....

What I'm going to end up with is a bare bones Android application, using the fixed up HDRadioController library via jni. This, I *will* post on github, once I get it to actually work.

I'm mulling over the idea of converting it from C++ to C, which would be much more appropriate, but other parts of it are so poorly written (like the hddefs crap for response type lookup, and processing of RBDS/RDS data) that to really do it well does actually require a bit of a rewrite... and since I'm only using this radio as a stopgap until getting a proper radio circuit working, all that would be wasted. BUT, like I said, I'm going to put it all on github, so anybody feels like continuing the work, they can.


----------



## lbdroid

Has anybody torn into one of these to figure out just why the hell the things make all that heat? Is it a poor quality power supply converting from car power (ranges from 10-15 vdc) down to logic? There shouldn't be ANYTHING in a radio that draws a significant current. 10 mA max, which is not enough to warm a big steel box up enough that you could feel it. And something in there has a really solid sounding CLICK when it is turned on and off, likely a relay, which implies a pretty serious current, since you can buy an 8 amp power mosfet for less than a relay.


----------



## lbdroid

Well, just in case anybody is still interested in this....

https://github.com/lbdroid/rabidbeaver_radio

This is a *NATIVE* project. It requires NDK for access to the library that controls the radio. That library is a fixed up version of the one I mentioned two posts above.

It ALSO (currently) will require root access to set the permissions on /dev/ttyUSB0 to 666.

This permission change has to be done *manually*. The application won't even try to set it.

If I find anybody distributing BINARIES of this before I say that the project is ready for general consumption, I will kill the project.

I'm not going to help you figure out how to compile it. If you can't figure that out, you won't be able to contribute anything that will be useful at this stage in the project development, and therefore have no use for the project to begin with.

IT IS ROUGHED IN, FUNCTIONAL, BUT BUGGY AND HACKISH. Needs work before "regular users" should attempt.


----------



## hawkfe

I am very interested in this app, but unfortunately my developer skills only go as far as rooting a device. I would be willing to buy the required hardware and test this app to help with the development. I can send crash reports and any other feedback that could be helpful. I have a nexus 7 in my dash already that is rooted. I could begin working with this app as soon I order and receive the hardware tuner.


----------



## -=Jeff=-

How well is your code working.. Still wanting something like this, I need to start doing more reading to understand the code better..

Quick question, how do you determine of the station is FM or HD? then how do you move within HD sub channels?


----------



## moi

will this project become reality?

as above, would love to incorporate the directed hd am/fm tuner into my nexus 7 install,

anything gotta beat the real poor signal of my current sdr dongle

heres hoping

regards


----------



## xapt3r5

I think this thread should be moved by mods or a get new one created, since this is no longer about a Jeep install...

@lbdroid

Good work. It's great to realize that some people are actually still trying to get things working for their projects, in late 2017.


----------

