Dangerous Prototypes

Dangerous Prototypes => USB Infrared Toy => Topic started by: anton.todorov on November 20, 2010, 05:10:23 pm

Title: PANASONIC EUR648251 decoder perl script
Post by: anton.todorov on November 20, 2010, 05:10:23 pm
Hi,
This Perl script decodes commands from PANASONIC EUR648251 (http://http://www.dvdremotecontrols.com/Mfrs/Panasonic/PanasonicAudio/EUR648251.htm) remoce. The protocol is similar to NEC but with different timings and 6 data bytes encoded.
According  to this lirc file (http://http://lirc.sourceforge.net/remotes/panasonic/EUR648251) the decoder is working (pre_data is the same and the codes are correct too). The attached bin file contains 'Power','1','2' and '3' button codes.
Quote
G:ProjectsEclipse-3.6IRToy>ir_PAN.pl test000.bin
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0xfd(11111101) 0xbb(10111011)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0xfd(11111101) 0xbb(10111011)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x09(00001001) 0x4f(01001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x09(00001001) 0x4f(01001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x89(10001001) 0xcf(11001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x89(10001001) 0xcf(11001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x49(01001001) 0x0f(00001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x49(01001001) 0x0f(00001111)

Only last 2 bytes are different so maybe the first four are device descriptors and/or addresses?

BR,
Anton
Title: Re: PANASONIC EUR648251 decoder perl script
Post by: ian on November 20, 2010, 05:37:15 pm
Thanks! Is it ok to keep adding your examples and images to the wiki? (CC-BY-SA license)
Title: Re: PANASONIC EUR648251 decoder perl script
Post by: anton.todorov on November 20, 2010, 06:11:11 pm
Hi Ian,
Of course the scripts can be used in any way.

BR, Anton
Title: Re: PANASONIC EUR648251 decoder perl script
Post by: rct on November 21, 2010, 09:32:27 pm
[quote author="anton.todorov"]
Quote
G:ProjectsEclipse-3.6IRToy>ir_PAN.pl test000.bin
...
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x89(10001001) 0xcf(11001111)
IR-PAN: 0x40(01000000) 0x04(00000100) 0x05(00000101) 0x43(01000011) 0x89(10001001) 0xcf(11001111)

Only last 2 bytes are different so maybe the first four are device descriptors and/or addresses?
[/quote]

FWIW, This is what your capture looks like in IRscope.  See this thread (http://http://dangerousprototypes.com/forum/index.php?topic=1482.0) where I posted a tiny script to convert .bin files into .ict files. 

The last four bytes are:  Device Code (0x05), Sub-device code (0x43), Function code (0x89), and an 8 bit checksum (0xCF == 0x05 ^ 0x43 ^ 0x89). 



IRScope / DecodeIR came up with a summary of the signal using the IRP notation form the JP1 forums of: 
Quote
{0.0k,430,msb}<1,-1|1,-3>(8,-4,A:48,1,-74.7m)+{A=$4004054389CF}; Alt leadout form: ^135m

DecodeIR.html says Panasonics IRP form is:
Quote
{37k,432}<1,-1|1,-3>(8,-4,2:8,32:8,D:8,S:8,F:8,(D^S^F):8,1,-173)+

While there is a bunch I don't understand this means:
* the carrier frequency is 37 Khz, 
* The Mark/space (on/off) times are multiples of 432 microseconds.
* A '0' is represented by 432 us on, followed by 432 us off.
* A '1' is 432 us on, 3 x 432 us = 1296 us off.
* The lead in is 8 x 432 == 3456 us on, and 1728 us of off time.
* The first two pieces of data should be 2 and 32 encoded in 8 bits each, which are the oem id.
* The device , sub-device, and function code are 8 bits each.
* The checksum is are those three bytes xor'd together, also encoded in 8 bits. 
* The lead out is 432 us on, 74736 us off.

MSB vs. LSB.
* For the Device & Subdevice code, IRScope is showing 160, 194.  it's interpreting the data as sent MSB first.  160 = 0b1010000, interpreted LSB first that's 5 (0x101), and 194 = 0b11000010, lsb first is 0x43.
* Your first two bytes 0x40 and 0x04Y that should be the oem interpreted LSB first gives 2, 32.
Title: Re: PANASONIC EUR648251 decoder perl script
Post by: mythman on April 27, 2016, 10:52:06 am
Is this related to this description of older Panasonic remotes?

I can't post a link here yet so
search for "Panasonic's old infrared remote protocol"

I have a Panasonic TV which I am using a Universal remote for but I cannot seem to get any gap length for IRtoy even though the led flashes. Bit frustrating. I am assuming it is an old remote. Will test with your script and see what happens.

Thanks.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01112075904session_write_close ( )...(null):0
20.01142207496ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01142208272Database_MySQL->query( ).../DatabaseHandler.php:119
40.05492347000Database_MySQL->error( ).../Db-mysql.class.php:273