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

Basic Question: Logical 1 and 0 Burst Pair Definition

 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Software
View previous topic :: View next topic  
Author Message
jmezz13



Joined: 28 Oct 2004
Posts: 94

                    
PostPosted: Mon Feb 27, 2023 5:47 pm    Post subject: Basic Question: Logical 1 and 0 Burst Pair Definition Reply with quote

I've been diving into more of the details of IR code protocols, and I just read a bit about (RM) Protocol Builder.

This is probably a silly oversight on my part, but I've read the Infrared Protocol Primer and done some manual decodes using IRScrutinizer and I thought I understood how the burst pairs are coded. Then I opened up RMPB and loaded the NEC1 protocol and noticed it is implying (PD04 through PD09) that the logical one burst pair is +560, -564 and the logical zero is +560, -1690. That is reversed from what the IR Primer says and what I found decoding in IRScrutinizer where the 0's have a 1:1 ratio and 1's have a 1:3 ratio.

What concept am I mssing?
Back to top
View user's profile Send private message
The Robman
Site Owner


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

                    
PostPosted: Mon Feb 27, 2023 6:32 pm    Post subject: Reply with quote

Deciding which pair is logical 1 vs 0 is all a matter of perspective. When we capture the signals from a protocol for the first time, we usually sort them by function name, so the numeric buttons are all in order, then we look at the binary and decide what makes sense. If the binary appears to increment on the left, we call it LSB, if it increments on the right, we call it MSB. If the binary for the numeric buttons appears to be large numbers descending, then we probably got the 0/1 decision wrong.

For NEC, the big pair is 1 and the small pair is 0.

Most UEI executors get the 0/1 pairs reversed (in our opinion), so we call those COMP. Therefore, the UEI executor for NEC is LSB-COMP. Keep in mind that UEI doesn't really care if they get it right or wrong because they don't bother to derive OBCs from the captures because they're not going to try to find secret discrete codes. They will simply supply the right hex codes to their executors in order to re-create the signal that they captured.
_________________
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
jmezz13



Joined: 28 Oct 2004
Posts: 94

                    
PostPosted: Mon Feb 27, 2023 7:32 pm    Post subject: Reply with quote

Thanks Rob. I had to take a minute or two to wrap my head around your response.

I hadn't seen the LSB-Comp before, but since you mentioned it, although subtle, I now see it in the RMPB (Device Data) and in the PB spreadsheet.

I guess it boils down to a convention that the JP1 community uses for coding that doesn't have to make sense to the processors in the remote since there are translators in the middle making appropriate conversions.

Jay
Back to top
View user's profile Send private message
The Robman
Site Owner


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

                    
PostPosted: Tue Feb 28, 2023 12:30 pm    Post subject: Reply with quote

Right, we try to get into the minds of the guys who invented the protocol, or who created the original remote, which is something that UEI has no need to do. We do it because it helps us give meaningful code numbers to the data, and helps us spot gaps which might be for secret codes.
_________________
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
Barf
Expert


Joined: 24 Oct 2008
Posts: 1415
Location: Munich, Germany

                    
PostPosted: Tue Feb 28, 2023 1:20 pm    Post subject: Reply with quote

As Rob says, there is a certain element of arbitrariness when selecting what the duration pairs are assigned to what code, the selection of the bit order of the data, and how the bits are grouped together in parameters. The first and foremost priority should always be to be as compatible to the rest of the world, in particular official documentation, to the extent it exists. Unfortunately, there are other people who makes other choices. A good example is the first version of the "IRremote" library for the Arduino, written by Ken Shirriff. While "we" use three 8-bit parameters in lsb-first order (the fouth parameter is almost always the complement of the third), Shirriff just took it as one 32 bit word, in msb-first order. (This is available as the protocol NEC-Shirriff-32.)

My advice is to (superficially) try to learn to read IRP notation. You can send any signal you want with IrScrutinizer + your Arduino.

The Robman wrote:
we try to get into the minds of the guys who invented the protocol, or who created the original remote, which is something that UEI has no need to do
Well, UEI is rather trying to hide and obfuscate in order to keep their know-how to themselves. The whole EFC-business serves no other purpose...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jmezz13



Joined: 28 Oct 2004
Posts: 94

                    
PostPosted: Tue Feb 28, 2023 6:51 pm    Post subject: Reply with quote

Barf wrote:

My advice is to (superficially) try to learn to read IRP notation. You can send any signal you want with IrScrutinizer + your Arduino.


I think I have the IRP notation down plus being able to read Raw and Pronto code. Now, I'm looking at assembler in RMPB/PB. I did some assembler way, way back on the 8088/8086 IBM PCs Surprised This is just for my interest, I like learning new stuff even if it's not functionally required. I don't really need it for my remotes.
Back to top
View user's profile Send private message
The Robman
Site Owner


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

                    
PostPosted: Tue Feb 28, 2023 8:02 pm    Post subject: Reply with quote

The main assembler used here is Samsung S3C8, we've been able to do some pretty cool stuff with it.
_________________
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
jmezz13



Joined: 28 Oct 2004
Posts: 94

                    
PostPosted: Tue Feb 28, 2023 9:49 pm    Post subject: Reply with quote

The Robman wrote:
The main assembler used here is Samsung S3C8, we've been able to do some pretty cool stuff with it.


Absolutely! The more I get in to this, the more amazed I am about the amount of work and skill that went (and is still) into this.

Funny enough, I've had the Samsung S3F80JB manual open today checking out the assembler instructions to help in reviewing existing protocols in RMPB. Fun times! Cool

I have questions....
Back to top
View user's profile Send private message
The Robman
Site Owner


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

                    
PostPosted: Wed Mar 01, 2023 9:54 am    Post subject: Reply with quote

A while back now, when people still used DVD players, there was an Apex player which didn't have dedicated arrow buttons, I think the number pad doubled as the arrow pad (where 1=up, 4=left, 5=OK, 6=right, 8=down) but you had to hit SHIFT first, and people didn't like it. So I checked the full list of button codes to see what range of OBCs was used and I think they were all below 128, which meant that the MSB of the binary was available. So, I wrote some code where, if the MSB was set, the executor would send the SHIFT signal, followed by the OBC entered (with the MSB unset), followed again by SHIFT. Then in the upgrade, all you had to do to get true arrow buttons was add 128 to the OBC for the arrow buttons.

Then, back when ReplayTV was still around, we discovered that if you press a numeric button followed by the SKIP button, the program would jump ahead by that many minutes. So I found an unused bit in the binary, probably the MSB like with the Apex code, and if it was set, the executor would send the given binary with the MSB unset, followed by SKIP. Therefore, to create a 3-minute-skip button, perfect for jumping over commercials, you would just add 128 to the OBC for the "3" button. We did a bunch of other stuff for ReplayTV, but I'm forgetting what now.

Then there was the Sony DSP, which sent a 5 or 6 part signal, which was almost impossible for remotes to properly learn, but fortunately we were able to get enough good learns to figure it out, so we wrote an executor to replicate that one.

There are many devices that use a combination of device codes for a single device, so we've written combo executors for those that let you mix and match your device codes.

And that's not even mentioning the Device Combiner and all the extenders, which are also written in assembler. Pretty cool, eh?
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!


Last edited by The Robman on Wed Mar 01, 2023 2:22 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
jmezz13



Joined: 28 Oct 2004
Posts: 94

                    
PostPosted: Wed Mar 01, 2023 11:56 am    Post subject: Reply with quote

Lots of creative sleuthing that's happened around here.

I forgot about the extenders, which of course had to be assembler. Crazy!
Back to top
View user's profile Send private message
The Robman
Site Owner


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

                    
PostPosted: Wed Mar 01, 2023 2:27 pm    Post subject: Reply with quote

The sleuthing usually comes into play when we see a set of learns that obviously have a checksum included in them, as we have to reverse engineer how it's calculated. The idea being that, when we write an executor to replicate the signals, we usually want the executor to calculate the checksum (unless it takes too much code). Also, we need to know how to generate the checksum if we want to try unused OBCs to search for secret discrete codes, etc.

Most checksums are easy, typically an XOR of each byte in the main signal, but some of them are a lot more complicated, like the 4DTV signal.
_________________
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 -> JP1 - Software All times are GMT - 5 Hours
Page 1 of 1

 
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