The TPF file

The format for sharing products between users, is by creating a TPF (ThirdPartyFile) and then importing it into the App.


The TPF file is just a simple textfile that consists of sections that contains metadata about the product and its commands.


The TPF file MUST contain the [CreatedBy] and [Product] section, and then a section for each command that starts with "Signal_" and then the command name.


[CreatedBy]

Name=Test User

Email=

[Product]

Manufacturer=Samsung

Model=UE46C6005

Comment=LED TV (With discrete codes)

Category=TV


Pronto protocol

Here is an example of the discrete command for 16:9 for the Samsung UE46C6005 television.

[Signal_16-9]

IRProtocol=PRONTO

Pronto1=0000 006d 0000 0022 00ac 00ac 0015 0040 0015 0040

Pronto2=0015 0040 0015 0015 0015 0015 0015 0015 0015 0015

Pronto3=0015 0015 0015 0040 0015 0040 0015 0040 0015 0015

Pronto4=0015 0015 0015 0015 0015 0015 0015 0015 0015 0015

Pronto5=0015 0015 0015 0040 0015 0015 0015 0015 0015 0040

Pronto6=0015 0040 0015 0040 0015 0040 0015 0040 0015 0015

Pronto7=0015 0040 0015 0040 0015 0015 0015 0015 0015 0015

Pronto8=0015 0689


RAW protocol

Here is an example of the discrete command for 4-3 for the Samsung UE46C6005 television.

[Signal_4-3]

IRProtocol=RAW

Carrier=38

Pause1=65000

Pause2=65000

RAW1=$0E41,$0619,$0255,$011C,$0256,$0446,$0270,$0102,$0258,$011C

RAW2=$0256,$011C,$0256,$011A,$0257,$011A,$0258,$011A,$0258,$011C

RAW3=$020D,$0167,$0252,$0138,$0257,$011A,$0258,$011A,$0257,$0446

RAW4=$0270,$0102,$0258,$011A,$0257,$011A,$0258,$011A,$0257,$011A

RAW5=$0258,$011C,$025B,$0119,$021E,$0156,$026D,$0124,$0257,$0446

RAW6=$026F,$0101,$026F,$0101,$0270,$0101,$0257,$011A,$0258,$011A

RAW7=$0257,$011A,$0258,$011A,$020F,$0166,$021F,$0155,$026B,$0448

RAW8=$026F,$042E,$0270,$042D,$026F,$042D,$0270,$042E,$0270,$0102

RAW9=$0258,$011A,$0258,$011A,$0257,$0446,$0270,$042D,$026F,$042D

RAW10=$026F,$0103,$020D,$0167,$0238,$013D,$026B,$0446,$0254,$20C7

RAW11=$0E41,$0619,$0255,$011B,$0256,$0446,$0257,$011C,$0255,$011C

RAW12=$0257,$011C,$020C,$0169,$0251,$0137,$0256,$011A,$0257,$011A

RAW13=$0258,$011A,$0257,$011A,$0258,$011A,$0258,$011A,$0257,$0446

RAW14=$026F,$0103,$0274,$0100,$020B,$0168,$026B,$011E,$0257,$011A

RAW15=$0257,$011A,$0258,$011A,$0257,$011A,$0257,$011A,$0271,$042E

RAW16=$0270,$0102,$0258,$011C,$025A,$011A,$020A,$0169,$026C,$011B

RAW17=$0257,$0121,$0258,$011A,$026F,$0101,$0257,$011A,$0270,$042D

RAW18=$026F,$042D,$026F,$042F,$026E,$0430,$026E,$0431,$020B,$0168

RAW19=$0250,$0138,$0270,$0102,$0257,$0446,$0270,$042E,$0270,$042F

RAW20=$026F,$0102,$0258,$011A,$0257,$011A,$0258,$0446,$0270,$7D0


The "RAWX" key contains a chunk of the complete RAW string from the XML file. You can break the string into as many chunks you would like, or you can have the complete string in 1 chunk.

Just make sure that you break the string up starting from the left, so that when the App reads the RAW1...3 values in numbered order, it will re-create the string as it was.


RC5 protocol

[Signal_M1]

IRProtocol=RC5

Address=30

Code=51

Comment=M1


RC5 is the simplest of the TPF files, since there is only 2 keys controlling the IR command. The Address and the Code.



NEC protocol

Here is an example of the contents of a TPF file for the "Up" command for the WDTV Live box.

[Signal_Up]

IRProtocol=NEC

Pause1=65000

Pause2=65000

Carrier=38

MarkFlank=560

SpaceFlank=560

Space2Flank=1680

PresignalHI=9000

PresignalLO=4500

RepeatSignal=0

BITS=110111100110000101011111101000001


Generating BIT value for NEC protocol from HEX numbers


If you have the command and data code for your NEC protocol in HEX format, then you need to convert these codes into the bit values used by the remote. Here is how to do it.


Example :

Command code = 856A

Data code =  97


To convert this to NEC BIT values, first you enter the HEX 856A into your favourite calculator program and convert it to binary.


856A = 1000010101101010, we split this into 2 bytes


Byte 1 = 10000101

Byte 2 = 01101010


And then since IR ptotocol sends bit with least significant bit first(at least NEC does), then we reverse each of the bytes. So we then have


Byte 1 = 10100001

Byte 2 = 01010110


So the first command part of the BIT value for TPF file is 10100001 01010110


Then it comes to the data value:


97 = 10010111, and then again we turn it around(least significant first) and get 11101001, this is then appended to the BITS value, and we now have 10100001 01010110 11101001, but since the NEC protocol requires the data code to be sent inverted directly after, we also append the value as inversed, that is change 0 to 1 and 0 to zero.


So when we inverse 11101001 we get 00010110, and this inversed value is then appended to the BITS value


The complete BITS value is then 10100001 01010110 11101001 00010110


This BITS value is then inversed, that is again, change 0 to 1 and 0 to zero, so


10100001 01010110 11101001 00010110 = 01011110 10101001 00010110 11101001


The code for the BITS value is then 01011110101010010001011011101001 without the spaces. However for the Beo remote to send the stop bit, we need to add a 1 to the end of the sequence.


So the final BIT sequence consists of 33 bits = 010111101010100100010110111010011


If you have any questions, then please contact me, I know this can be a bit tricky :)