IR unique codes

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

Moderator: jrhees

IR unique codes

Postby BeRnA » Wed Apr 16, 2003 4:39 pm

I have a Learning capable Remote Control and I would like my USB-UIRT teach about 100 IR diferent codes to each key in my remote... How com I generate somo IR codes to use?
Thanks in advance.
BeRnA
 
Posts: 9
Joined: Sun Mar 30, 2003 12:06 am

Re: IR unique codes

Postby jrhees » Thu Apr 17, 2003 1:48 am

BeRnA wrote:I have a Learning capable Remote Control and I would like my USB-UIRT teach about 100 IR diferent codes to each key in my remote... How com I generate somo IR codes to use?
Thanks in advance.


That's not too hard to do. In fact, I believe someone in AVS forum created a Pronto code generator for use with a program called NetRemote.

The main thing you need for starters is a 'base code' which doesn't come close to any equipment you already have -- so you don't end up generating conflicting codes with other equipment.

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

Postby BeRnA » Thu Apr 17, 2003 2:30 am

I have this base code: 023317340D0D001A0D54154400000000000000000000000000

How many changes I have to do, to generate new codes from this code?
Thanks.
BeRnA
 
Posts: 9
Joined: Sun Mar 30, 2003 12:06 am

Postby jrhees » Thu Apr 17, 2003 3:58 am

BeRnA wrote:I have this base code: 023317340D0D001A0D54154400000000000000000000000000

How many changes I have to do, to generate new codes from this code?
Thanks.


The 'active' part of this code is the 6 hex nibbles starting with '54..':

"541544"

With this particular code, you can change any EVEN bit #'s of each nibble -- i.e., you can set bits 0 or 2 of each nibble to a '0' or '1', BUT bits 1 and 3 must remain at '0' (or you'll mess up the transmitter).

So, the "541544" writes out in binary like this:

3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0
0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0
0 x 0 x 0 x 0 x 0 x 0 x 0 x 0 x 0 x 0 x 0 x 0 *

x = can be changed to 0 or 1 to make new codes
* = this last bit is not used (don't care)

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

Postby Guest » Thu Apr 17, 2003 5:40 pm

I think this topic will be of interest to many of your customers, Jon, so I'd like to ask a few related questions, hopefully without diluting BeRnA's topic too much.

While I've been reading Bob Sorel's thread (and several other related threads) over at AVS Forum and have been playing with Dave Houston's IR code generator, I became baffled about quite a few points. It's possible that since these discussions tend to be Pronto-centric, and I use a simple Sony learning remote, that my knowledge gap is forming there. Unfortunately, the AVS Forums and Remote Central forums are a bit overwheming and even after putting some significant time into them, I decided to broach the topic here. Of course my forum search came up with this thread and it made more sense to ask here than create a new thread.

In my case, I need to use my shiny new USB-UIRT to teach some (hopefully) unique codes to my learning remote.

a) How do I determine a base code that I can use? For example, BeRnA was able to give you an immediate response of a sample base code to use. How was this accomplished?

b) (This is obviously stupid, since noone has asked it in your forums) I'm familiar with using Girder for accepting IR codes and using the USB-UIRT for this purpose, but how do I transmit using the USB-UIRT? In my case, how can I, once I have a unique code for my remote to learn, transmit it with the USB-UIRT?

c) In your example, 11 bits can be modified, allowing 2048 possibilities with one base code, correct? Is this true of all usable base codes?

d) That "mess up the transmitter" comment scares me. Can you elaborate on that?

FWIW, I'm a freeware author and once I understand the concepts in use, and if there's any use for one, I might consider writing a simple program for creating batches of such codes. I suppose it could even be integrated with the USB-UIRT API to automate the transmission process.

Hopefully these questions weren't as stupid as I think they are. I'm in the frustrating position of being an experienced technophile new to something that's pretty well established, in this case remote control of HTPC.
Guest
 

Postby Greg_G » Thu Apr 17, 2003 5:46 pm

I apologize. I had thought I was logged in. That post was authored by me.
Greg_G
 
Posts: 1
Joined: Thu Apr 17, 2003 5:07 pm

Postby jrhees » Thu Apr 17, 2003 9:13 pm

Greg,

Your questions are not stupid!

Anyway, hopefully I can shed some light on this.

First, I'm not sure where BeRnA got his 'base' code from, but I would guess he simply 'learned' a code in the Girder plugin from a remote button of a remote brand/piece of equip he no longer uses. He may have dusted off an old VCR remote he had lying around, etc.

To answer your question (b), I need to give a bit of an overview of the codes the Girder plugin uses for transmitting IR.
- When you 'learn' an IR code in Girder, you will note a large string of hex digits will appear in the 'Code 1' box. In some cases, another string will appear in the 'Code 2' box. These codes are in a UIRT-specific format. The 'base' code that BeRnA gave earlier in this post was likely cut and pasted from the 'Code 1' box and is in this format.
- The USB-UIRT supports/generates *two* different formats in these 'Code' boxes -- 'STRUCT' and 'RAW'. The 'STRUCT' is a derivative of the original 'STRUCT' format developed by Ruud v. Gessel some time ago for the early UIRT. It is a 'compressed' format which can hold a lot of IR code information but will only work if the IR protocol being learned fits within certain parameters. It was developed because memory was very limited on the original UIRT.
The 'RAW' format spells out each IR burst individually, and as such is much longer. But, it is also much simpler to understand. It is also similar in concept to Pronto's 'Learned' format.

The code BeRnA pasted was a 'STRUCT' code.

Now with that said, if you wanted to transmit a code in Girder, you simply need to have a code present in the 'Code1' box and you can hit the 'Test' button. If you also hit 'Apply' then that Girder command is now ready to transmit whenever it is executed.

If you wanted to alter a code, you could simply hand-edit the code in the 'Code1' box to your liking.

To answer your question (c), the answer is that theoretically there are 2048 possibilities, but your mileage may vary. This is because when the USB-UIRT receives a code and generates an event to Girder, it does not give an event in RAW or STRUCT format (which would be too long), but rather condenses (lossy) the received IR stream into a 6-byte 'UIR' format code. Generally, this compaction leaves about 32-40 bits of unique data -- meaning you probably *would* see 2048 unique codes. For very long base codes, however, the compaction algorithm starts Xor'ing bits with each other to fit everything into 6 bytes. This can start to create the possibility of duplicates.

Don't worry about my comment about 'Messing up' the transmitter. What I mean by that is that if you mess up the format of the STRUCT code, you may find your transmitter takes a *very* long time to send the code (tens of seconds) before it will recover. You cannot damage it, but the unit could appear 'Hung' with the LED lit, and you might have to unplug it and plug it back in.

If you're thinking about writing a program, you might want to consider having it generate codes in the Pronto format instead. This is very similar to 'Raw' and is widely understood. You can import pronto codes into Girder and the USB-UIRT programming API can take them directly.

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

Postby BeRnA » Thu Apr 17, 2003 10:50 pm

Instead of manualy creating new codes from a base IR code, I download MakeHex from here: http://www.remotecentral.com/ftp/utilities/makehex.zip and generate 255 codes using Sony protocol... It is a MS-DOS program but work very well... :D
BeRnA
 
Posts: 9
Joined: Sun Mar 30, 2003 12:06 am


Return to General-Discussion

Who is online

Users browsing this forum: No registered users and 12 guests

cron