As LG discrete codes are lacking a lot of functions I'm making this adapter to have full control of my device. I will post here my advances and question, and when finished the code and other needed info.
My first question is: there a way to see NEC device/subdevice combinations not in use by any remote to use it on my device?
EDIT: seems like I'm having a bad time understanding the relationship between what I have configured in Remote Master and what the Arduino decodes, i.e.
4B6040BF
Vol+ 61381 183 6 none 2 NEC1 BF 00
Seems easier with Sony protocols:
9EB92
Menu Up 63134 190 Sony20 26 73 121 9E 5B
(I know that 92 is the subdevice 73 from the setup protocol window on RM and 9E is part of the hex, I just don't understand what is that B in the middle)
Making an IR to RS232 adapter
Moderator: Moderators
Hard to get a really reliable answer, but you can use the "Lookup tool" of this forum. Tried it for a minute, and it seems like no-one is using device 75.My first question is: there a way to see NEC device/subdevice combinations not in use by any remote to use it on my device?
You appears to be using the Arduino and the Shirriff IR library. This does not use a parametrization compatible with the usage e.g. in this forum. Speaking of NEC1, if I recall it correctly, the bytes of the four bytes are D, S, F. and F inverted, but in the wrong bit-order, i.e., Shirriff uses MSB-first order, while NEC1 officially interprets the bytes in the LSB-first order.
Using an Arduino Mega, a max232-based converter, an old Oppo DVD, and a random old remote, and my previous work in https://github.com/bengtmartensson/AGirs I was able to cook up a prototype (Opponator), contained in the Git-stuff mentioned. Can this serve as inspiration?
Edit - OOPS. Barf just posted why you probably don't want this, but just in case, You might be interested in this: http://www.righto.com/2009/09/arduino-u ... d-and.html I was able to use this code to receive and store IR codes, recognize which command was received, and send out a stored command. It can decode and encode NEC commands pretty well.
Thanks a lot guys. I already got good part of the work done, currently I'm doing a PC program to convert a spreadsheet to the code for the Arduino.
The spreadsheet holds Function Name, Sony20 device, Sony20 subdevice, OBC and RS232 command. Most of the code is already written and this program will take that spreadsheet and generate the cases for a switch instruction.
The spreadsheet holds Function Name, Sony20 device, Sony20 subdevice, OBC and RS232 command. Most of the code is already written and this program will take that spreadsheet and generate the cases for a switch instruction.
First version of the project uploaded to:
https://github.com/madmalkav/IR2RS232
Everyone be aware that barf's code is orders of magnitude better than mine, I'm doing this as a learning experience but sooner or later will try to modify the code to use his aproach.
I have tested this with my PC, tomorrow I will try with my TV. I'm pretty sure repeats aren't going to work. I'm also pretty sure repeats in Sony20 are just 0xFFFFFFFF so I will have to modify my code to detect that and issue previous command if detected. Perhaps also a timer to so the repeats aren't too fast.

https://github.com/madmalkav/IR2RS232
Everyone be aware that barf's code is orders of magnitude better than mine, I'm doing this as a learning experience but sooner or later will try to modify the code to use his aproach.
I have tested this with my PC, tomorrow I will try with my TV. I'm pretty sure repeats aren't going to work. I'm also pretty sure repeats in Sony20 are just 0xFFFFFFFF so I will have to modify my code to detect that and issue previous command if detected. Perhaps also a timer to so the repeats aren't too fast.
