Complete newbie : how to get remote codes...

Interested in integrating USB-UIRT support into an application? Look here!

Moderator: jrhees

Complete newbie : how to get remote codes...

Postby Jacques » Tue Dec 06, 2005 2:59 am

Hi,

I've searched the forums for Perl sample code, and I did find one example that seems to work, for another electronic component that is.

I want to control a specific piece of equipment, an old SA-EX 140 Technics stereo receiver. I just want to use two "source" buttons, and the volume buttons.

The Perl script I have so far is this (copied from the forum) :

use Win32::API;
Win32::API::Type->typedef("HUUHANDLE","PHANDLE");
Win32::API->Import("uuirtdrv","HUUHANDLE UUIRTOpen()");
Win32::API->Import("uuirtdrv","BOOL UUIRTTransmitIR(HUUHANDLE hHandle, PCHAR IRCode,
INT codeFormat, INT repeatCount, INT inactivityWaitTime,
HANDLE hEvent, PVOID reserved0, PVOID reserved1)");
Win32::API->Import("uuirtdrv","BOOL UUIRTClose(HUUHANDLE hHandle)");

$uirt = UUIRTOpen();
if ($uirt ne -1) {
print "USB-UIRT Opened\n";

$IRCode = "0000 0072 0000 000D 0020 0021 0020 0021 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0041 0020 0CAE";
$intcodeFormat = 0;
$repeatCount = 1;
if (!UUIRTTransmitIR($uirt,$IRCode,$intcodeFormat,$repeatCount,0,0,$reserved0,$reserved1)) {
print("ERROR\n");
} else {
print("OK\n");
}

UUIRTClose($uirt);
} else {
print "Error opening USB-UIRT\n";
}


My question is simple, and I hope the answer is simple :

I just want to know if there is a list of codes somewhere for my receiver's remote control, so that I can copy and paste the hex code into this little script to make the USB-UIRT emit the code. I went to RemoteCentral, searched for my unit, and found some .ccf file, but when I opened it in another software I downloaded (ProntoEdit), I just couldn't find it, but I do admit I have no idea what I'm doing in that particular piece of software :-)

If I can't get a list of codes, is there a simple piece of software out there that will let me learn my remote's codes through the USB-UIRT, and export them (in the format used in the Perl script above preferably) to a text file ?

Thanks for pointing me in the right direction...

Jacques.
Jacques
 

Postby jrhees » Thu Dec 08, 2005 12:18 am

Jacques,

First, you may request the 'lrnHelper' app from support@usbuirt.com which will allow you to learn codes in Pronto format via the USB-UIRT

Second, In ProntoEdit, you can double-click on a button, and if it says 'LEARNED', you can click the 'View IR" button to see the code.

-Jon
jrhees
Site Admin
 
Posts: 1652
Joined: Tue Jan 28, 2003 11:49 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 18 guests

cron