PDA

View Full Version : IR Blaster and touch



Antoniop
2014-06-29, 12:00
Hi,
I recently purchased a used touch. I'm quite happy with it, but I can't have IR Blaster working.
I also have a SB3 and I could use IR blaster with the "IR learning" plugin and it's so convenient to change the volume, turn on and off from the SB remote or from LMS !
But this doesn't work with the touch, as the IR blaster touch module can't use raw codes.
I have an old Denon PMA-980R amplifier with a remote ref RC-151. I didn't found the conf file on the lirc internet page.
So i tried to do myself the conf file.
As I didn't had a IR receiver, I bought a usb IR receiver (http://www.mediahd.fr/index.php?id_product=14&controller=product), sorry the page is in french, and I managed to record a conf file with irrecord.
I used that command line :


# irrecord --device=/dev/lirc0 --disable-namespace MyRemote

I get this basic conf file, just to try :


begin remote

name MyRemote
bits 15
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100

one 237 1862
zero 237 813
ptrail 241
gap 67300
toggle_bit_mask 0x0

begin codes
PowerAmp_On 0x2024 0x23DB
PowerAmp_Off 0x2024 0x23DB
Volume_Up 0x22C4 0x213B
Volume_Down 0x20C4 0x233B
end codes

end remote

IR blaster plugin accept this conf file, but nothing appends when I test it.
I tried this file with the touch and the SB3 and this is the same, nothing works.

I was wondering if the conf file would be of RC6 codes, as IR blaster for the touch only supports RC5 codes.
So, I tried to configure the IR receiver for RC5.
If I run


# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event13) with:
Driver mceusb, table rc-rc6-mce
Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
Enabled protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
Name: Media Center Ed. eHome Infrared
bus: 3, vendor/product: 147a:e03e, version: 0x1201
Repeat delay = 500 ms, repeat period = 125 ms

and then :

# ir-keytable -p RC5 -s rc0
Protocols changed to RC-5

But then if I try to capture again the codes with irrecord, there is no data and it aborts.
I'm stucked now, I don't know what to do !

Thanks a lot for help.

fcm4711
2014-06-29, 13:51
Hi there

I don't think it's RC6 as that would be indicated in the flags. I was surprised to see that there is no 'header' entry but looking at similar Denon .conf files it seems it's not needed. The other thing is that your .conf file has two code columns for each button. I have not seen that before. Could you try to remove the second column (or the first column) and see what happens? Like this:

...
begin codes
PowerAmp_On 0x2024
PowerAmp_Off 0x2024
Volume_Up 0x22C4
Volume_Down 0x20C4
end codes
...
If you have a digital camera could you point it at the IR emitter and see if SB3 or Touch actually is sending out some IR. You should see the IR emitter light up in your digital cameras LCD screen.

Felix

Antoniop
2014-06-30, 14:40
Hi Felix,
Thanks a lot for your answer.
I removed the second column and tested it. Bad luck, it doesn't work. I checked with your very good trick and when I test there is a blue flash on the IR emitter, so yes it seems to send something. When I go back to sb3 with my raw codes file it lights the same but then it works.

I tried removing the first column and keeping the second one, but same story. It's like the IR codes are wrong, but I also tested almost all the other denon conf files I found on the lirc site and none of them works.
What is a little bizarre is that if I take RC-152 conf file, that should be close to the file I should have for my remote, I have code lines much longer than those I have but not so different, for example :
Mine :
PowerAmp_On 0x2024 0x23DB
PowerAmp_Off 0x2024 0x23DB
Volume_Up 0x22C4 0x213B
Volume_Down 0x20C4 0x233B
RC-152
AMP_POWER 0x0000000000002024
AMP_VOL_UP 0x00000000000022C4
AMP_VOL_DOWN 0x00000000000020C4

But maybe this doesn't mean anything.

I also tried to cut these 3 lines from RC-152.conf and paste them in my file but not better.
Thanks a lot.

Antoniop
2014-07-03, 03:42
I tried to record another remote, just to see what the conf file looks like.

I had this with the SB3 remote :

begin remote

name MyRemoteSqueeze
bits 16
flags SPACE_ENC
eps 30
aeps 100

header 9007 4508
one 559 1683
zero 559 563
ptrail 561
pre_data_bits 16
pre_data 0x7689
gap 40183
toggle_bit_mask 0x0

begin codes
PowerOn 0x40BF
PowerOff 0x40BF
VolUp 0x807F
VolDown 0x00FF
end codes

end remote


Looks consistent.

fcm4711
2014-07-04, 16:17
Hi Antonio

What happens when you use the provided slim.conf file (or the one you've learned yourself) on your SB Touch? Does that allow the SB Touch to control your SB3? If not then maybe there is a problem with the IR emitter (too weak, or too strong). If that works then yes, most likely something's wrong with the codes or the timing.

And no, the short 0x2024 and long 0x0000000000002024 variants are the same. It's a bit like writing 4711 or 000004711.

Felix

Antoniop
2014-07-06, 04:39
Hi Antonio

What happens when you use the provided slim.conf file (or the one you've learned yourself) on your SB Touch? Does that allow the SB Touch to control your SB3? If not then maybe there is a problem with the IR emitter (too weak, or too strong). If that works then yes, most likely something's wrong with the codes or the timing.

And no, the short 0x2024 and long 0x0000000000002024 variants are the same. It's a bit like writing 4711 or 000004711.

Felix

Hi Felix, so I did a few more tests.
Let me summarize this :
1. the conf file I recorded for my Denon remote : never works, neither the touch nor the SB3
2. slim.conf + sb3 as emitter : ok for sb3 and touch as receivers
3. slim.conf + touch as emitter : ok for sb3, ko for touch as receivers
I also tried with the file I recorded with slim remote, same as 2 and 3, so my IR receiver for recording should be ok.
I always did my tests using the irblaster parameter screen and clicking on "test" button", several times just to make sure.
My sb3 and touch are next to each other

It's a bit odd : the touch doesn't work as the receiver when it's the emitter (test 3), but SB3 does. So maybe it "doesn't like" my emitter.
But it works when the sb3 is the receiver.
As the file I recorder for my remote, I would say either the file is wrong or irblaster plugin can't handle it.

I could buy another emitter, but I'm not sure it could work with my file. I could also buy an universal remote, but then I lose the ability to control my amp from the LMS or from squeezeplay.
What do you think ?

Thanks a lot for your help

fcm4711
2014-07-07, 04:11
Hi Antonio



It's a bit odd : the touch doesn't work as the receiver when it's the emitter (test 3), but SB3 does. So maybe it "doesn't like" my emitter.
But it works when the sb3 is the receiver.


That is a limitation of SB Touch IR handling. It cannot be emitter and receiver at the same time.

Have you tried to add a minimal repeat into the .conf file like this? Default is to not repeat.


min_repeat 2

I've seen devices which only acted upon IR commands if they were repeated at least once.

Cheers
Felix

Antoniop
2014-07-08, 14:15
Hi Felix
It doesn't work with the repeat :(
I see two flashes with my camera, but doesn't change anything.
I tried all the combinations 1 column, 2 columns...

Thanks

fcm4711
2014-07-10, 01:49
Hello Antonio

Bummer. Have you tried to learn your Denon remote a second time? Is the resulting .conf file identical? I still cannot understand why there are two code columns for each button.

Felix

fcm4711
2014-07-10, 02:36
Hello again

Ok, I figured out why there are two columns - it has to do with the special Denon format which inverts the command in a second transmission.

So the full IR signal is 5 bits address then 10 bits command, a gap, then the address again and the command inverted.

IR Blaster doesn't support the two columns but it should be able to invert part of the signal by using a toggle mask.

Please give this a try:



begin remote

name MyRemote
bits 15
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100

one 237 1862
zero 237 813
ptrail 241
gap 67300
toggle_bit_mask 0x0
toggle_mask 0x3FF
min_repeat 2

begin codes
PowerAmp_On 0x2024
PowerAmp_Off 0x2024
Volume_Up 0x22C4
Volume_Down 0x20C4
end codes

end remote

Cheers
Felix

Antoniop
2014-07-10, 05:13
Hello again

Ok, I figured out why there are two columns - it has to do with the special Denon format which inverts the command in a second transmission.

So the full IR signal is 5 bits address then 10 bits command, a gap, then the address again and the command inverted.

IR Blaster doesn't support the two columns but it should be able to invert part of the signal by using a toggle mask.

Please give this a try:



begin remote

name MyRemote
bits 15
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100

one 237 1862
zero 237 813
ptrail 241
gap 67300
toggle_bit_mask 0x0
toggle_mask 0x3FF
min_repeat 2

begin codes
PowerAmp_On 0x2024
PowerAmp_Off 0x2024
Volume_Up 0x22C4
Volume_Down 0x20C4
end codes

end remote

Cheers
Felix

Hi Felix
Yes, I tried to record another conf file and it was a bit different but didn't work either. I'll try your tip this evening !
Thanks a lot :)
antonio

Antoniop
2014-07-10, 13:10
Hi Felix,
I tried this new file, but no luck, doesn't work.
I double checked everything.

Here a second file I recorded for my remote :

begin remote

name MyRemoteRessai
bits 15
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100

one 243 1856
zero 243 806
ptrail 248
gap 67304
toggle_bit_mask 0x0

begin codes
Power 0x23DB 0x2024
Up 0x22C4 0x213B
Down 0x20C4 0x233B
end codes

end remote

Power codes order seems inverted compared to previous file
I think you might not be too far for the solution.

I also tried without success this one :

begin remote

name RemoteFelix2
bits 15
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100

one 243 1856
zero 243 806
ptrail 248
gap 67304
toggle_bit_mask 0x0
toggle_mask 0x3FF
min_repeat 2

begin codes
PowerAmp_On 0x2024
PowerAmp_Off 0x2024
Volume_Up 0x22C4
Volume_Down 0x20C4
end codes

end remote


Thanks !

fcm4711
2014-07-16, 22:51
Hello Antonio

Unfortunately I am running out of ideas. Have you tried that latest .conf file with both SB Touch and SB3?

Also, since we are now using the minimal repeat to send the command normal and then inverted we would try to increase it to 4 to actually send everything twice.

Could you try with min_repeat set to 4 or even higher?

Felix

Antoniop
2014-07-19, 12:29
Hi Felix !
Thanks a lot for all your help, but it still doesn't work.
All conf files seem to work, except the one for my amp.
I throw in the sponge, until I get some new idea to overcome this or I buy i more recent amp (not so quickly), I hope it would work. And that's a pity, because it's really excellent, and it worked perfectly with the SB3.
If something else comes to your mind, please let me know.
Thanks again for your patience.
Antonio