From: Mike B. <i_a...@ho...> - 2006-01-04 18:12:52
|
Hello, I have been trying to get the MyHD serial port IR receiver to work with lirc. After taking the case apart and looking at the circuit, looking through serial sniffs from portmon in Windows, and tinkering with the receiver with my own serial application, it is apparent that it is an irman/UIR with minor modifications. It uses a 12C509A OTR PIC. Here are the oddities I've noticed in this receiver (compared to the home-brew serial port receiver I broke last week - I have no experience with a real irman/UIR): 1. After lowering and raising the serial control lines by closing and opening /dev/ttyS0, the receiver sends an 'X' before I transmit the 'I' 'R' and receive 'O' 'K' with my test application. 2. All codes received from all of my remotes are bit-reversed. In other words, the bit order of each byte is reversed, so 0x01 becomes 0x80, etc. This makes it impossible to use any existing remote definition files for my remotes, and also makes it impossible for anyone else to use any definitions I could create and upload for my remotes. 3. When using the MyHD remote, if I hold down a button instead of repeating the code for that button the receiver sends 01 00 00 00 00 00 hex. I don't think that the remote is doing this. All of my other remotes repeat the code identically or with some bits toggled each time. 4. All codes received look like this (which I believe is the standard irman protocol): 3A 5D 1A 4B 01 00 prefix code 01 00 Here is the output from my test program: nitrogen@n2 ~/devel/myirc $ ./myirc x: X (58) ok: OK (4F 4B) [MyHD Remote button OK] ir: 30 CF 14 EB 01 00 - 00110000 11001111 00010100 11101011 00000001 00000000 ir: 01 00 00 00 00 00 - 00000001 00000000 00000000 00000000 00000000 00000000 ir: 01 00 00 00 00 00 - 00000001 00000000 00000000 00000000 00000000 00000000 [Pioneer Remote button TV] ir: A5 5A 0C F3 01 00 - 10100101 01011010 00001100 11110011 00000001 00000000 ir: A5 5A 0C F3 01 00 - 10100101 01011010 00001100 11110011 00000001 00000000 ir: A5 5A 0C F3 01 00 - 10100101 01011010 00001100 11110011 00000001 00000000 No data from IR receiver for ten seconds You will see above that the MyHD remote is sending code 14EB for the OK button. With my old home-brew serial receiver (and according to the MyHD definition file available on lirc.org) the code was 28D7, which is 14EB with each byte reversed. With the old receiver the prefix for the MyHD was 0CF3. Now it is 30CF - the same bit reversal is performed on the whole code. Here is my proposition to solve this problem: If no other irman device sends an 'X' before receiving anything, then the 'X' could be used to detect a MyHD/MyIRC serial receiver. Otherwise, the user would have to specify the type of receiver. Should the fix be in lirc or in libirman? Mike Bourgeous _________________________________________________________________ On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement |