Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

PVR250 / Hauppauge "silver" remote

If you have a question or need help, this is the place to be.
Post Reply
APillowOfClouds
Posts: 1
Joined: Thu Oct 11, 2007 2:40 am

PVR250 / Hauppauge "silver" remote

Post by APillowOfClouds »

Hi,

First, let me say I absolutely LOVE EG!! After struggling through Girder (And I'm a PROGRAMMER!) EG was a very welcome change - glanced thru a 2 page tutorial and I was good to go.

I use mostly USB-UIRT's but on my bedroom machine which is the one in which I have my TV Tuner and have Beyond TV server installed, I use the "Hauppauge silver" remote that came with my PVR 250 card. Is it possible to pick up events for that remote with EG? I apologize if this question's already been answered, I did a quick search and couldn't find anything, at least nothing that wasn't in German LOL

TIA

Rob
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: PVR250 / Hauppauge "silver" remote

Post by Bitmonster »

No, there isn't one. But it shouldn't be to hard to write a plugin for it. A quick search revealed, that the IRREMOTE.DLL of the driver package can be used. Here is the header file I found:

Code: Select all

/*
 * This file was produced from documentation provided by
 * Hauppauge Computer Works. It is released under the
 * GNU General Public License
 *
 * Peter Heitman, Oct 2003
 * Denybear, Apr 2005
 */
 
#ifndef _IRREMOTE_H

#ifdef __cplusplus
extern "C" {
#endif

/*
 * General Notes
 *
 * The basic sequence is IR_Open(), and this starts a timer;
 *  poll using IR_GetKeyCode() called from the WM_TIMER messages,
 *  and then call KillTimer( hWnd, 1) and IR_Close() when you are done.
 *
 * With the release of the v2.45 IR remote driver for PVR150
 *  (in conjunction with the HCWPVR2 remote), the IR_GetKeyCode () has been more
 *  or less deprecated (and for sure does not work with that version of the driver).
 *  You should use IR_GetSystemKeyCode () as a replacement.
 * 
 * The basic sequence is then IR_Open(), and this starts a timer;
 *  poll using IR_GetSystemKeyCode() called from the WM_TIMER messages,
 *  and then call KillTimer( hWnd, 1) and IR_Close() when you are done.
 */

/*
 * Defines
 */

#define IR_NOKEY	0x1fff
 
/*
 * IR_Open
 *
 * Parameters:
 *
 *   hWnd is the window handle of your app. Timer events WILL be sent to
 *     this window if IR_Open is successful; the interval is nominally 85ms
 *
 *   msg is UNUSED, set it to 0
 * 
 *   Verbose is a flag to indicate if a message box should be displayed
 *     with status during the open
 *  
 *   myIRPort is the I2C address to connect to; by default it should be 0,
 *     which does a search for any suitable device. You should set it to 0
 *     unless you have a good reason not to (hint: you don't :-)
 *
 * Return Value:
 *
 *   returns non-0 if it was succesful
 */

BOOL WINAPI IR_Open( HWND hWnd, UINT msg, BOOL Verbose, WORD myIRPort );

/*
 * IR_GetVersion
 *
 * Return Value:
 *
 *   returns the FW version of the found IR controller in the lower 6 bits; 
 *     only useful for testing
 */
 
DWORD WINAPI IR_GetVersion();

/*
 * IR_Close
 *
 * Closes down the existing connections to the IR device
 *   (Does NOT stop the TIMER; do that yourself via KillTimer( hWnd, 1))
 *
 * Parameters:
 *
 *   hWnd - currently NOT USED, set to 0
 *
 *   msg - currently NOT USED, set to 0
 *
 * Return Value:
 *
 *   returns TRUE
 */

BOOL WINAPI IR_Close( HWND hWnd, UINT msg );


/*
 * IR_Power
 *
 * Use ??? 
 *
 * Parameters:
 *
 *   msg - can have 2 values : either 0x12, either 0x34.
 *         No more information is available at the moment
 *
 * Return Value:
 *
 *   returns non-0 if it was succesful
 */

BOOL WINAPI IR_Power( UINT msg );


/*
 * IR_GetKeyCodeEx
 *
 * Parameters:
 *
 *   piRepeatCount  points to a value that contains the current repeat count; 
 *     used to do auto repeat. This pointed-to value SHOULD be 0 initially;
 *     and should probably never be touched; and it MUST be Global/static
 *     (not stack based) (the IR_GetKeyCodeEx function assumes this state
 *     variable is preserved across calls)
 *
 * Return Value:
 *
 *   returns the current IR button press, or IR_NOKEY for no button pressed
 *     since last poll
 *
 *   The format of the returned KeyCode is the 14bit RC5 code; 
 *   bit:   13 12 11  10 9  8  7  6  5  4  3  2  1  0
 *   cmd:    S  S  T  A4 A3 A2 A1 A0 C5 C4 C3 C2 C1 C0
 *
 *   S= status, always 1
 *   T= toggle, changes for every physical keypress (but not auto repeats
 *         from held keys)
 *   Ax = Address bits (0=older black remote, 31=HCWPVR remote)
 *   Cx = Key codes (look at the full list for each remote in
 *                   \windows\IRRemote.ini file)
 *
 *
 *   This is a low-level function; It is called by both IR_GetKeyCode()
 *   and IR_GetSystemKeyCode ().
 *
 */
 
WORD WINAPI IR_GetKeyCodeEx ( int* piRepeatCount );



/*
 * IR_GetKeyCode
 *
 * Parameters:
 *
 *   piRepeatCount  points to a value that contains the current repeat count; 
 *     used to do auto repeat. This pointed-to value SHOULD be 0 initially;
 *     and should probably never be touched; and it MUST be Global/static
 *     (not stack based) (the IR_GetKeyCode function assumes this state
 *     variable is preserved across calls)
 *
 * Return Value:
 *
 *   returns the current IR button press, or IR_NOKEY for no button pressed
 *     since last poll
 *
 *   The format of the returned KeyCode is the 14bit RC5 code; 
 *   bit:   13 12 11  10 9  8  7  6  5  4  3  2  1  0
 *   cmd:    S  S  T  A4 A3 A2 A1 A0 C5 C4 C3 C2 C1 C0
 *
 *   S= status, always 1
 *   T= toggle, changes for every physical keypress (but not auto repeats
 *         from held keys)
 *   Ax = Address bits (0=older black remote, 31=HCWPVR remote)
 *   Cx = Key codes (look at the full list for each remote in
 *                   \windows\IRRemote.ini file)
 */
 
WORD WINAPI IR_GetKeyCode( int* piRepeatCount );



/*
 * IR_GetSystemKeyCode
 *
 *   returns the current IR button press since last poll
 *
 * Parameters:
 *
 *   piRepeatCount  points to a value that contains the current repeat count; 
 *     used to do auto repeat. This pointed-to value SHOULD be 0 initially;
 *     and should probably never be touched; and it MUST be Global/static
 *     (not stack based) (the IR_GetSystemKeyCode function assumes this state
 *     variable is preserved across calls)
 *
 *   piRemoteCode points to a return code that is <0x1F :
 *     (0=older black remote, 31=HCWPVR remote, 30=HCWPVR2 remote)
 *
 *   piKeyCode points to a return code that is <0x7F :
 *     this is the key code (look at the full list for each remote in
 *                   \windows\IRRemote.ini file)
 *
 * Return Value:
 *	TRUE (non-0) if key pressed, FALSE if no key pressed
 */
 
BOOL WINAPI IR_GetSystemKeyCode( int* piRepeatCount, int* piRemoteCode, int*piKeyCode );


#ifdef __cplusplus
}
#endif

#endif
Which programming languages do you know? I could write a basic plugin prototype for the DLL, but some fiddling has to be done with the actual hardware at hand and I don't have a Hauppauge card here.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Barf
Posts: 10
Joined: Thu Jun 08, 2006 7:35 am
Contact:

Re: PVR250 / Hauppauge "silver" remote

Post by Barf »

I am not sure if it helps (using the Hauppauge CARD). but the said remote sends standard RC5 commands with device code = 31 (decimal). Can be read with any EG supported IR input device. On request, I will mail/post the key codes.
nightrader_
Posts: 13
Joined: Mon Nov 05, 2007 12:19 am

Re: PVR250 / Hauppauge "silver" remote

Post by nightrader_ »

Bitmonster wrote: Which programming languages do you know? I could write a basic plugin prototype for the DLL, but some fiddling has to be done with the actual hardware at hand and I don't have a Hauppauge card here.

I would be happy to help here. My python skills are VERY limited, but I would be happy to test, I have two HVR-1600 cards with the silver remotes.

Nightrader
Post Reply