View previous topic :: View next topic |
Author |
Message |
jmandawg
Joined: 26 May 2012 Posts: 5
|
Posted: Sun Jun 03, 2012 3:15 pm Post subject: Can someone explain how to convert from LIRC to PRONTO fomat |
|
|
Hi all,
I'm trying to write a program that will convert LIRC files to PRONT hex format. Does anyone here know how to do this? For example:
Code: | begin remote
name WD_HDTVMediaPlayerV1
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 8887 4273
one 624 1530
zero 624 434
ptrail 623
repeat 8884 2092
pre_data_bits 16
pre_data 0x219E
gap 104496
toggle_bit_mask 0x0
begin codes
KEY_POWER 0x48B7
KEY_HOME 0x609F
KEY_UP 0xA05F
KEY_DOWN 0x00FF
KEY_LEFT 0xE01F
KEY_RIGHT 0x906F
KEY_ENTER 0x10EF
KEY_BACK 0xD827
KEY_STOP 0x20DF
KEY_OPTION 0x58A7
KEY_REWIND 0xF807
KEY_PLAYPAUSE 0x50AF
KEY_FASTFORWARD 0x7887
KEY_PREVIOUS 0x40BF
KEY_NEXT 0x807F
KEY_SEARCH 0xF00F
KEY_EJECTCD 0x08F7
end codes
end remote |
If I want to convert the power command to this (from IrMaster D:132 S:121: F:18):
Code: |
0000 006C 0022 0002 015B 00AD 0016 0016 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0041 0016 0016 0016 0016 0016 0041 0016 0016 0016 0016 0016 0016 0016 0041 0016 0016 0016 0041 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0699 015B 0057 0016 0EA3
|
I know this is probably complicated and is somewhat dependent on the protocol but any help is appreciated. |
|
Back to top |
|
|
vickyg2003 Site Admin
Joined: 20 Mar 2004 Posts: 7073 Location: Florida |
Posted: Sun Jun 03, 2012 6:30 pm Post subject: |
|
|
This is very dependent upon the protocol. Each protocol has different rules to get them into the form that we use here, but I suppose that you don't need the form we use here.
Obviously you can see that this is a set of NEC1 132 device 121 from the LIRC but you don't really need that to do the Pronto.
You can kind of skip that part
The Nec1 has a lead in time
Lead in 8887 4273
the rest of the signal for power
will be the predata followed by the function codes
In hex the power button would be
219E48b7
translated to binary that would be
device-- - subdevice- function -- ~function
00100001 1001111E 01001000 10110111
So you replace 0 with a timing pair of 624 434
replace the one with a timing pair of 624 1530
then you add the gap time
then you add the repeat, timing get the signal
Hope that is kind of clear, typing on the iphone this gets a bit tedious, I hope to get a new video card in the mail on Monday!!! |
|
Back to top |
|
|
Barf Expert
Joined: 24 Oct 2008 Posts: 1415 Location: Munich, Germany |
Posted: Mon Jun 04, 2012 1:04 pm Post subject: |
|
|
Hi jmandawg,
Quote: | I'm trying to write a program that will convert LIRC files to PRONT hex format |
I have already done this, see this posting
Quote: | This is very dependent upon the protocol. Each protocol has different rules to get them into the form that we use here, but I suppose that you don't need the form we use here. |
The semantics of the entries are badly, and probably incompletely and erroneously described, so trying to interpret them is bound to be incomplete. LIRC is a 10(?) year old project, hacked by numerous individuals, each extending it in "smart" ways. That is why I decided to use LIRC itself to do the transformation. |
|
Back to top |
|
|
|