JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

LIRC RC5 Hex Codes
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> Non-JP1
View previous topic :: View next topic  
Author Message
jyll



Joined: 09 Aug 2010
Posts: 25

                    
PostPosted: Mon Aug 09, 2010 1:19 pm    Post subject: LIRC RC5 Hex Codes Reply with quote

RC5

1 1 1 00000 000001 = 0 1 (TV 1)
1 1 1 00005 110000 = 5 48 (VCR Pause)

LIRC

0000000000001001 00 TV_1
0000000000001001 01 TV_1
0000000000001169 00 VCR_Pause
0000000000001169 01 VCR_Pause

0001 0000 0000 0001 = 1001h (TV_1)

start bit: 1
field bit: 1
toggle bit: 1
address bits: 00000
command bits: 000001

0001 0001 0110 1001 = 1169h (VCR_Pause)

start bit: 1
field bit: 1
toggle bit: 1
address bits: 00101
command bits: 110000

How does LIRC come up with these hex codes (4 digits)?

I think I can come up with the TV codes, but using the same strategy for the VCR codes doesn't work.
Back to top
View user's profile Send private message
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Mon Aug 09, 2010 1:49 pm    Post subject: Reply with quote

I'm not sure where you are going with this, but if you want to see how the pause came 1169 turns into device 5, command 48

RC5 looks like this
IRP notation: {36k,msb,889}<1,-1|-1,1>(1:1,~F:1:6,T:1,D:5,F:6,^114m)+

___1 ___1 ___6 ___9
0001 0001 0110 1001 = 1169h (VCR_Pause)
_____ 00101 101001 = 1169h (VCR_Pause)

working from right to left, I pulled off the 6 digits of the command and the 5 digits of the device.

05h 29h
Device = 5h = 5
Command = 29h = 41 Ooops

Is that what you were looking for?
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.


Last edited by vickyg2003 on Mon Aug 09, 2010 4:01 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
jyll



Joined: 09 Aug 2010
Posts: 25

                    
PostPosted: Mon Aug 09, 2010 1:56 pm    Post subject: Reply with quote

How do you go from this ...

1 1 1 00005 110000 = 5 48 (VCR Pause)

to this ...

1169h (VCR_Pause).

11100005110000 => 0x1169

Quote:
05h 29h
Device = 5h = 5
Command = 28h = 48


This doesn't help, unless you tried to tell me something, I don't see the sequence to get from bitstream to LIRC hex code.

5h = 5
30h = 48


Last edited by jyll on Mon Aug 09, 2010 2:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Mon Aug 09, 2010 4:04 pm    Post subject: Reply with quote

Oops I had some math errors
I should have had 29h = 41

What is the Brand/Model of VCR that you are trying to control. Maybe if I just look it up I can make more sense of this LIRC thing.
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21237
Location: Chicago, IL

                    
PostPosted: Mon Aug 09, 2010 5:55 pm    Post subject: Reply with quote

RC5 dev 5 for a VCR is probably VCR/1081 (and Record is OBC 48)

The binary for dev 5, OBC 48 is:

111 00101 110000
or
110 00101 110000

A LIRC file for a Philips TV is here:
http://lirc.sourceforge.net/remotes/philips/VCR2

That file shows the fixed data to be 0x45 which is 1000101

RC5 dev 0 for a TV is probably TV/0054 (and "1" is OBC 1)

The binary for dev 0, OBC 1 is:

111 00000 000001
or
110 00000 000001

A LIRC file for a Philips TV is here:
http://lirc.sourceforge.net/remotes/philips/TV

That file shows the fixed data to be 0x40 which is 1000000
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
jyll



Joined: 09 Aug 2010
Posts: 25

                    
PostPosted: Mon Aug 09, 2010 7:47 pm    Post subject: Reply with quote

I get LIRC hex codes by using terminal software, so I know what codes LIRC is outputting via TCP, so that's not a problem, and I have a working Phillips TV/VCR config file (is the one I use).

So wether is LIRC or the LIRC config file, I know what the LIRC hex codes correspond to the buttons in my remote.

The RC5 bitstream I get by using the protocol specification and address:command tables.

VCR Pause button in remote is: 0x0000000000001169.

I know RC5 bitstream should be: 11100005110000 (from theory of RC5).

Rob confirmed the OBCs I used for the RC5 bitstream, "1" for TV_1 and "48" for VCR_Pause.

But I'm interested in finding out why LIRC says 11100005110000 = 0x...1169, why not 0x...ABCD?

How does LIRC arrive to the hex code from the bitstream?

I'm not interested in "what is the hex code for a bitstream" by looking at a LIRC config file.

I have certainty about the LIRC hex code (actual data), not so much about the RC5 bitstream (from theory).

I could get reliable RC5 bitstreams from LIRC hex codes, if I knew how to get LIRC hex codes from RC5 bitstreams (reverse the process/algorithm).


Last edited by jyll on Mon Aug 09, 2010 8:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21237
Location: Chicago, IL

                    
PostPosted: Mon Aug 09, 2010 8:06 pm    Post subject: Reply with quote

Could we see the complete LIRC file? I have a feeling the answer may be in some of what we're not seeing.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
jyll



Joined: 09 Aug 2010
Posts: 25

                    
PostPosted: Mon Aug 09, 2010 8:18 pm    Post subject: Reply with quote

I edited the post to avoid any misunderstandings, check out the last part.

I'm not looking at this from the point of view of a user that wants to setup LIRC on a PC (already did that, config file is working fine, no problem).

I actually want to know how LIRC arrives at hex codes from bitstreams. No one has addressed this question, which makes me think I'm not being understood.

-----------------------------------------------------------------------------------------

Can you take a RC5 LIRC config file, look at the 4 hex digits for VCR Pause button (0x...1169), and arrive at the original RC5 bitstream from that info?

Even if you knew already what the bitstream is, can you show me how to do this, what's the number massaging/process/algorithm to get the bitstream?

After I'm done with this I can work on the info from Shadowsoul post, which makes sense so far.
Back to top
View user's profile Send private message
3FG
Expert


Joined: 19 May 2009
Posts: 3367

                    
PostPosted: Mon Aug 09, 2010 8:50 pm    Post subject: Reply with quote

The Pause function, using RC5 (Philips VCR) is 41 not 48, so I think Vicky's decoding does show how to go from LIRC to RC5 and vice versa.
Back to top
View user's profile Send private message
jyll



Joined: 09 Aug 2010
Posts: 25

                    
PostPosted: Mon Aug 09, 2010 9:25 pm    Post subject: Reply with quote

How do you get "41", by using a table of commands (OBCs), or looking at some output? The tables I've seen show 48.

Vicky only posted the binary value of a hex number, but that's a given (you can do it manually or use a calculator).

What I haven't found is how LIRC encodes RC5 bitstreams into the LIRC hex codes we see in the config files (this codes are also known).

If I knew how, I could find the Device:OBC from a LIRC hex code (actual, verified data, not from a table in a website).

Case in point, some say is 48, others say 41. With LIRC's hex code 0x...1169, I can find what is the actual Device:OBC.
Back to top
View user's profile Send private message
3FG
Expert


Joined: 19 May 2009
Posts: 3367

                    
PostPosted: Mon Aug 09, 2010 9:44 pm    Post subject: Reply with quote

I don't think you actually read Vicky's post for comprehension. However, here's another shot at it.

The function numbers in RC5 are 6 bits, and the device number is 5 bits.
___1 ___1 ___6 ___9
0001 0001 0110 1001 = 1169h (VCR_Pause)
0001 0001 0110 1001 Function number = 29H = 41
0001 0001 0110 1001 Device number =05H = 5

I got 41 from upgrades here, using RemoteMaster. I myself haven't seen any tables for VCRs using RC5, but I do see a Wikipedia entry for TVs which lists Pause as 48. But that's not for VCRs, which are instead in Table 7b, which is not shown.
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21237
Location: Chicago, IL

                    
PostPosted: Mon Aug 09, 2010 9:50 pm    Post subject: Reply with quote

I know you're not trying to get LIRC to work, but there's other data that would be helpful to me to know why LIRC is giving you the values that it is, so that's why I keep asking to see the complete LIRC file, like the ones that I linked to.

3FG wrote:
The Pause function, using RC5 (Philips VCR) is 41 not 48, so I think Vicky's decoding does show how to go from LIRC to RC5 and vice versa.

Some UEI codes have it using 41, others have it using 48, so I don't doubt that the OP's Pause button really uses 48.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
3FG
Expert


Joined: 19 May 2009
Posts: 3367

                    
PostPosted: Mon Aug 09, 2010 9:53 pm    Post subject: Reply with quote

The OP is just reading RC5 values from tables and is actually looking (I think) at a working LIRC setup, which is sending 41, and that is controlling his VCR.

So I think his VCR really does use 41.
Back to top
View user's profile Send private message
jyll



Joined: 09 Aug 2010
Posts: 25

                    
PostPosted: Mon Aug 09, 2010 10:15 pm    Post subject: Reply with quote

I was expecting a OBC of 48, and it wouldn't have made sense with that assumption. So where do I get a table that says pause is 41, will be more helpful than the ones I have.

I turn the hex code into binary and interpret the last 6 bits as command (OBC) and the next 5 bits as address (device).

What's the purpose of the first 5 bits (0001 0)?

The idea was to use one TV code and one VCR code (different addresses/devices) as a test to see how LIRC works, but not having a reliable table for commands (OBC) complicates things, but that's what I wanted to know.

I just saw that the config file for the RC5 Phillips BP-6 remote has hex codes with only 3 digits. So maybe I was lucky enough to spot the right config file for my simple universal remote on the first try (set to Phillips TV).

This is my LIRC config file (minus the extra commands I don't use):

http://lirc.sourceforge.net/remotes/philips/RC-5

Code:
          TV_0                     0x0000000000001000
          TV_1                     0x0000000000001001
          TV_2                     0x0000000000001002
          TV_3                     0x0000000000001003
          TV_4                     0x0000000000001004
          TV_5                     0x0000000000001005
          TV_6                     0x0000000000001006
          TV_7                     0x0000000000001007
          TV_8                     0x0000000000001008
          TV_9                     0x0000000000001009
          TV_Dot                   0x000000000000100A
          TV_Power                 0x000000000000100C
          TV_Mute                  0x000000000000100D
          TV_Info                  0x000000000000100F
          TV_VOL+                  0x0000000000001010
          TV_VOL-                  0x0000000000001011
          TV_Enter                 0x000000000000101A
          TV_CH+                   0x0000000000001020
          TV_CH-                   0x0000000000001021
          TV_PrevCH                0x0000000000001022
          TV_Ok                    0x000000000000102B
          TV_Input                 0x0000000000001038
          VCR_Enter                0x0000000000000145
          VCR_0                    0x0000000000001140
          VCR_1                    0x0000000000001141
          VCR_2                    0x0000000000001142
          VCR_3                    0x0000000000001143
          VCR_4                    0x0000000000001144
          VCR_5                    0x0000000000001145
          VCR_6                    0x0000000000001146
          VCR_7                    0x0000000000001147
          VCR_8                    0x0000000000001148
          VCR_9                    0x0000000000001149
          VCR_Dot                  0x000000000000114A
          VCR_Power                0x000000000000114C
          VCR_Info                 0x000000000000114F
          VCR_CH+                  0x0000000000001160
          VCR_CH-                  0x0000000000001161
          VCR_Pause                0x0000000000001169
          VCR_PrevCH               0x0000000000001171
          VCR_REW                  0x0000000000001172
          VCR_FF                   0x0000000000001174
          VCR_Play                 0x0000000000001175
          VCR_Stop                 0x0000000000001176
          VCR_REC                  0x0000000000001177
          VCR_Input                0x000000000000117E


Last edited by jyll on Mon Aug 09, 2010 10:29 pm; edited 3 times in total
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21237
Location: Chicago, IL

                    
PostPosted: Mon Aug 09, 2010 10:23 pm    Post subject: Reply with quote

You're right Dave. OK jyll, let's look at this more closely.

The binary for dev 5, OBC 41 would be

111-00101-101001
or
110-00101-101001

Dropping the first bit and rearranging it, we get...

11001-01101001
or
10001-01101001

padding with zeroes at the start we get...

00011001-01101001
or
00010001-01101001

convert to hex, and we get...

19-69
or
11-69

(The reason there are two choices is the toggle bit).
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> Non-JP1 All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control