I'm brand new to JP1 programming but I've figured out most of keymap-master and ir.exe, but I don't understand what "Device Code" and "Unit Code" (sometimes it says "Sub Device" and "Main Device"). It's displayed directly below the "Protocol Name" on the first page of the spreadsheet.
What values am I supposed to put in here? Where do I get the values from?
Thanks for any help.
Keymap-Master -- What is device code / unit code?
Moderator: Moderators
-
Mark Pierson
- Expert
- Posts: 3023
- Joined: Sun Aug 03, 2003 12:13 am
- Location: Connecticut, USA
- Contact:
Re: Keymap-Master -- What is device code / unit code?
Those items vary from one protocol to another. Typically, they're a specific piece of information, much like an "address" or "index". For example, if you have a TV and a VCR from the same manufacturer, they probably use the same protocol. To keep the TV signals from operating the VCR and vice versa, both units would have a distinct Device Code.sofakng wrote:I don't understand what "Device Code" and "Unit Code" (sometimes it says "Sub Device" and "Main Device").
The values most often are obtained from a decoded learned signal. Whatever values are used MUST match the equipment being controlled for the IR signals to work.What values am I supposed to put in here? Where do I get the values from?
Mark
Hmmm, I'm still a little confused on how I'm supposed to use them...
Let's say I'm going to create a device upgrade for the ReplayTV (hacked/advanced version). When I select the ReplayTV (hacked/advanced) for the protocol, the device code (and unit code) are blank.
Am I supposed to put a number in there?
Where do I get that number from...?
Let's say I'm going to create a device upgrade for the ReplayTV (hacked/advanced version). When I select the ReplayTV (hacked/advanced) for the protocol, the device code (and unit code) are blank.
Am I supposed to put a number in there?
Where do I get that number from...?
-
Mark Pierson
- Expert
- Posts: 3023
- Joined: Sun Aug 03, 2003 12:13 am
- Location: Connecticut, USA
- Contact:
When you pick up the phone to call someone, you need to know their telephone number, right? The parameters required by the protocol are similar in concept. They identify the device being communicated with. Without the proper parameters, the signal will likely be ignored by the device.sofakng wrote:Let's say I'm going to create a device upgrade for the ReplayTV (hacked/advanced version). When I select the ReplayTV (hacked/advanced) for the protocol, the device code (and unit code) are blank.
Am I supposed to put a number in there?
As I said earlier, locatiing those parameters is done through decoding learned signals in IR, as well as various other sources put together by others (CCF files and raw knowledge for starters).
My question to you is why re-invent the wheel? There's already several Replay upgrades in the PVR folder in the files area. You can start with one of those and then customize it to your liking.
FYI, for the ReplayTV, the default Device Code is 1 and the Unit Code is 0.
Last edited by Mark Pierson on Tue Aug 24, 2004 6:53 am, edited 2 times in total.
Mark
-
classicsat
- Posts: 279
- Joined: Fri Feb 20, 2004 2:24 pm
I can say this, since I am close to the NEC2 protocol (Not saying it is for Replay, just giving an example).
(Speaking of how an NEC2 chip would be wired in an OEM remote)
The NEC2 code sends 32 bits in 4 bytes, the address, which is set by diodes on the row lines (or direct if only one is used), the sub address is a complement (IOW logical opposite) of the address, unless the row lines have pull up resistors, which those lines would not be complemented. The last two bytes are the OBC code, and the OBC code complimented.
So in short, the Devoce Code is hard set for the whole remote, used to hopefully distinguish itself from other remotes that use the same protocol.
(Speaking of how an NEC2 chip would be wired in an OEM remote)
The NEC2 code sends 32 bits in 4 bytes, the address, which is set by diodes on the row lines (or direct if only one is used), the sub address is a complement (IOW logical opposite) of the address, unless the row lines have pull up resistors, which those lines would not be complemented. The last two bytes are the OBC code, and the OBC code complimented.
So in short, the Devoce Code is hard set for the whole remote, used to hopefully distinguish itself from other remotes that use the same protocol.