Page 141 of 141 FirstFirst ... 4191131132133134135136137138139140141
Results 1,401 to 1,405 of 1405

Thread: HD Radio Cables READY!

  1. #1401
    Newbie
    Join Date
    Dec 2007
    Location
    Orlando, FL
    Posts
    24
    i asked around for a control DLL before i started working on reversing the protocol, but nobody seemed to know where to get the latest version.
    Does the DLL work with .NET, or will I need to use p_invoke/unmanaged code to use it? is there documentation?

    "The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents." - Nathaniel Borenstein

  2. #1402
    MySQL Error
    Auto Apps:loading...

    Join Date
    Oct 2004
    Posts
    5,283
    its a .net based .dll
    I don't know who you asked, but its on the cd that is supplied with the cable
    also avail for download at https://dl.dropboxusercontent.com/u/...%20Gadgets.zip
    -Thanks
    Mitch
    www.rush2112.net

    "Did you test it in carwings??"

    Sun, Come shine my way
    May healing waters bury all my pain
    Wind, Carry me home
    The fabric of reality is tearing apart
    The piece of me that died
    Will return To live again

  3. #1403
    Newbie
    Join Date
    Dec 2007
    Location
    Orlando, FL
    Posts
    24
    Quote Originally Posted by mitchjs View Post
    its a .net based .dll
    I don't know who you asked, but its on the cd that is supplied with the cable
    also avail for download at https://dl.dropboxusercontent.com/u/...%20Gadgets.zip
    I had to stop working on my hd radio project for a while, but i am back at it.

    I have a problem with my testing that I am not sure how to resolve.

    When testing out my application on my dev laptop (not final PC hardware), I put my laptop to sleep to test how my application handles sleep/resume.

    After resuming from sleep, the radio doesn't seem to respond to commands anymore. I know there are issues with COM ports and sleep/resume, so I added code to detect the power events.

    When I detect the sleep event I try to shut the radio down and on resume, i try to re-open the port and basically rest, but that doesn't seem to work -- the radio is still unresponsive.

    here is some sample code:

    Code:
            void OnPowerModeChanged(object sender, PowerModeChangedEventArgs e)
            {
                if (e.Mode == PowerModes.Suspend)
                {
                    Console.WriteLine("going to sleep, time : {0}", DateTime.Now);
                    if (true == mRadio.IsOpen)
                    {
                        mRadio.PowerOff();
                        mRadio.Close();
                        UnregisterCallbacks();
                    }
                }
    
                else if (e.Mode == PowerModes.Resume)
                {
                    Console.WriteLine("waking up, time : {0}", DateTime.Now);
                    if (true == mRadio.IsOpen)
                    {
                        mRadio.Close();
                    }
                    mRadio = null;
                    mWakeTimer.Enabled = true;
                    mWakeTimer.Start();
                }
            }
    
            void OnWakeTimerElapsed(object sender, System.Timers.ElapsedEventArgs e)
            {
                mRadio = new HDRadio();
                mRadio.ComPortString = "COM10";
                RegisterCallbacks();
                mRadio.Open();
            }
    Basically, on resume, I start a one second timer. When it expires, I re-create the radio object, register my callbacks for tuner, mute and power events, and then I try to open the port again.

    How should i correctly handle power/sleep events? I plan on (preferably) sleeping or hibernating the final hardware in the car so I need this to work.

    "The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents." - Nathaniel Borenstein

  4. #1404
    MySQL Error
    Auto Apps:loading...

    Join Date
    Oct 2004
    Posts
    5,283
    for sure you want to power off and close, on shutdown...
    you do know
    mRadio.PowerOff(); is not blocking, and takes time

    I don't do anything special in the demo.... its been so long... now (2008)


    Code:
    void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
    		{
    			if (e.Mode == PowerModes.Suspend)
    			{
    				_WasPoweredOn = HDRadioCore.IsPowered;
    
    				HDRadioCore.PowerOff();
    				while (HDRadioCore.IsPowered == true) {};
    
    				HDRadioCore.Close();
    			}
    			else if (e.Mode == PowerModes.Resume)
    			{
    				if (_WasPoweredOn == true)
    				{
    					HDRadioCore.Open();
    				}
    			}
    		}
    -Thanks
    Mitch
    www.rush2112.net

    "Did you test it in carwings??"

    Sun, Come shine my way
    May healing waters bury all my pain
    Wind, Carry me home
    The fabric of reality is tearing apart
    The piece of me that died
    Will return To live again

  5. #1405
    Newbie
    Join Date
    Dec 2007
    Location
    Orlando, FL
    Posts
    24
    Quote Originally Posted by mitchjs View Post
    for sure you want to power off and close, on shutdown...
    you do know
    mRadio.PowerOff(); is not blocking, and takes time

    I don't do anything special in the demo.... its been so long... now (2008)
    I have decided to change my target platform from Windows x86 to Windows 10 IoT Core (ARM) on Raspberry Pi 2. I have most of my project converted over, and now i am turning my attention to the HD radio. I will eventually need drivers for the USB to Serial port stuff, but FTDI is slow with that work. In the meantime, I am trying to rework the HD Radio control on Windows 10. Do you have a version the control DLL you provide that works with Windows Universal Platform (i think it's compatible with Windows 8.1 Store Apps)?


    thanks

    "The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents." - Nathaniel Borenstein

Similar Threads

  1. PC Card for HD Radio
    By Spotted in forum General MP3Car Discussion
    Replies: 13
    Last Post: 09-03-2008, 07:01 PM
  2. HD Radio
    By skyhawk2114 in forum StreetDeck
    Replies: 12
    Last Post: 06-04-2008, 01:17 PM
  3. HD radio in my BMW
    By DAMBRO24 in forum Car Audio
    Replies: 3
    Last Post: 11-14-2007, 05:19 PM
  4. Someone here has be be able to crack this HDRadio for the car!
    By Kamakazie2 in forum Hardware Development
    Replies: 243
    Last Post: 09-20-2007, 08:04 PM
  5. HD Radio?
    By peecee in forum Car Audio
    Replies: 3
    Last Post: 12-31-2006, 02:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •