Recognizing codes without learning them?

General discussion and comments that don't fit in the other topic areas.

Moderator: jrhees

Recognizing codes without learning them?

Postby jerny » Mon Feb 25, 2008 4:53 am

I'm trying to use USB-UIRT in a particular way, and after reading hundreds of threads on this board, I wasn't able to find anyone else doing something similar, so I'm resorting to this post to ask how!

What I'm trying to do:
I have programmed a few Nevo SL remotes with hundreds of buttons to control various NON infrared devices in my house (e.g., lights, shades, music, etc). All of those devices can be controlled by my PC. So, I want to use the Nevo remote to send IR commands to my USB-UIRT device attached to the PC. When the USB-UIRT recognizes an IR code, my PC can then do whatever it needs to do to implement the button that was pressed on the Nevo remote.

What I started doing is picking aribitrary IR commands for each button on my Nevo and then I would learn each Nevo button, one by one, with my USB-UIRT. However, it takes forever.

So, what I want to do is paste pronto codes into my Nevo for each button. Then I want to "paste" those same codes into something (my Windows registry? the Lrnhelper?) so that the USB-UIRT will recognize them without me having to learn them one at a time.

The easiest solution would be to paste the codes into my Windows Registry, but then I'd need to know how to convert pronto format to the USB-UIRT condensed format that it uses to recognize codes. It seems the LrnHelper application is of no use to me because it is for teaching the USB-UIRT how to TRANSMIT codes but doesn't teach the USB-UIRT how to recognize codes (that second part still requires learning the old fashioned way).

So, in a nutshell, is there a way to teach the USB-UIRT how to *recognize* an IR code without physically recording the code?

Thanks
jerny
 
Posts: 6
Joined: Sat May 12, 2007 11:27 pm

Postby canoewhiteh2o » Tue Feb 26, 2008 9:52 pm

The usbuirt uses the API callback function UUIRTSetReceiveCallback to receive codes from the air. Here is the description from the API document:
When the USB-UIRT receives a code from the air, it will call the callback function with a null-terminated, twelve-character (like IRMAN) ir code in IREventStr. The driver will also pass the parameter userData, which is a general-purpose 32-bit value supplied by the caller to UUIRTSetReceiveCallback. This parameter is useful for carrying context information, etc. Note that the types of codes which are passed to IREventStr are *not* the same as the type of codes passed back from a UUIRTLearnIR call (the codes from a UUIRTLearnIR are much larger and contain all the necessary data to reproduce a code, whereas the codes passed to IREventStr are simpler representations of IR codes only long enough to be unique).

Your application software will have to associate the IREventStr with a unique device function (such as TV power on). When your application recognizes this unique IREventStr, it will then have to transmit the actual ir code as learned from the learn function.

As far as storing your ir codes, I don’t think the registry is a good place. I use a database. To be specific, I use a SQLite database. This seems to work quite well. A database also lends itself for cut and paste operations.

Unless you can find the Pronto raw hex codes needed for transmitting I think you will be forced to learn each code. You will also have to capture the IREventStr in the UUIRTSetReceiveCallback function to associate with the transmit code (you will have to use a hashtable or something to associate the 2 codes).

GaryB
canoewhiteh2o
 
Posts: 66
Joined: Thu Dec 28, 2006 1:52 pm

Postby barrygordon » Tue Oct 28, 2008 2:18 pm

If you are still interested in doing this drop me an email at barry@the-gordons.net. I have solved this problem many years ago but just saw your post

I do this all the time. A slight difference I only use one format from the Remote to the USB-UIRT and then I use the specific formats of the end device on the PC. I use Pronto remotes and use the standard NEC protocol which allows for 16000 device codes and 256 keys per device. I use a $40 device similar to the USB-UIRT to input the remote to the PC as it completely decodes NEC protocol into the Device and key codes as HEX.
barrygordon
 
Posts: 1
Joined: Wed Jul 27, 2005 12:05 pm

'Recognizing' the IREventStr?

Postby gozertg » Tue Dec 16, 2008 2:21 pm

I am trying to program an interface that will learn buttons on a remote, and then be able to 'recognize' them later. I have read several articles on Pronto and understand how that standard works, and can see that the Uirt learns Pronto codes well.

However, when I learn a remote button, I have no way of being able to translate what I learned in Pronto, or other code, that allows me to equate a particular button with the IREventStr parameter of the ReceiveCallback procedure!

Does anyone know how these codes are generated? Or how to translate? In addition, it seems like the IREventStr code seems to alternate between two different values that it alternates between for each button.

Thanks in advance for any help.

-K
gozertg
 
Posts: 2
Joined: Tue Dec 16, 2008 2:04 pm

Postby mark_anderson_us » Fri Sep 03, 2010 3:31 pm

Hi K

I'm trying to do the same. Did you ever figure it out?

Regards

mark
mark_anderson_us
 
Posts: 8
Joined: Sun Aug 29, 2010 11:39 pm


Return to General-Discussion

Who is online

Users browsing this forum: No registered users and 29 guests