Open Willem23 opened 7 years ago
Hey, here are some answers to your questions:
Correct RC5 Length of pulse/width is hardcoded to match the standard RC5 protocol: http://www.sbprojects.com/knowledge/ir/rc5.php Why? Is this bad? Does this device need different pulse widths? I guess not since it's working partly
You are right about the repeat property. It's device-wide and unfortunately i can't change it that quickly for the RC5 protocol. However you can use a different approach. Instead of using RC5 Protocol, you can use the Pronto-Protocol, here you can just not set the repeat property, and instead using the Pronto-Specification to create a "fake repeat". This has also the advantage that you can even mix completely different Protocols in a single file.
The false data might be there due to a bug of the Samsung firmware. I don't know exactly how to avoid this properly, but it seems that before sending the IR signal, there is some cache-array and if you first filled it with a very long IR code (like a 8-repeat rc5 code) the new signal will only overwrite parts of it. To be honest i don't think i can cchange this since it's a firmware bug, it wont happen with other brands. But as you noted 99% of devices can easily detect wrong data (no IR-header) so it won't cause any trouble
Example code:
<irplus>
<device manufacturer="PHILIPS" model="IRT8050" columns="12" format="PRONTO_HEX">
<button label="D29 OBC10" span="3">0000 0073 000A 0000 001F 001F 001F 001F 001F 001F 001F 001F 001F 001F 003E 003E 003E 001F 001F 003E 003E 003E 003E 0C88</button>
<button label="D29 OBC9" span="3">0000 0073 000A 0000 001F 001F 003E 003E 001F 001F 001F 001F 003E 003E 003E 001F 001F 003E 003E 001F 001F 003E 001F 0C88</button>
</device>
</irplus>
To repeat a pronto code you can just copy it's payload and increase the pronto counter by *2
0000 0073 0014 0000 001F 001F 003E 003E 001F 001F 001F 001F 003E 003E 003E 001F 001F 003E 003E 001F 001F 003E 001F 0C88 001F 001F 003E 003E 001F 001F 001F 001F 003E 003E 003E 001F 001F 003E 003E 001F 001F 003E 001F 0C88
Thanks for the reply. I tested the PRONTO version but have problems with that as well: When sending the code payload once (counter 0x000A) it shows up as 0x74A, a few bits of glitches, and a repetition after 500ms
When sending the sequence twice (counter 0x0014) it shows 0x74A, 0x74A, a few bits of glitches, 0x749, 0x749, 0x749, 0x749 and a repetition after 500ms
So there are still a few nasty glitches and even more trouble when sending the code multiple times. Maybe there is a problem in the Samsung driver, but are you sure there is no other issue when repeating sequences.
Also, I find it very difficult to edit the configuration files. It does not seem to be possible to easily access a stored irplus or pronto file from the phone or copy&paste anything received by email. The import method is not user friendly.
Well I'm absolutely sure that the app will send exactly what is defined in the IRplus file. Note that the built-in IR diagram will show exactly what is sent.
This for example is the output of a single pronto file with 2 repeats. By the way the pronto-counter won't be parsed by the app at all. It's just for the sake of correctness. So you can re-import the IR code into irscrutinizer.
My suggestion will be to prepare the codes with irscrutinizer. When you're happy with them, export them to *.irplus. IrScrutinizer supports it as export format!
https://github.com/bengtmartensson/harctoolboxbundle/releases/tag/Version-1.4.1
What tool are you using to verify the IR output btw ?
If you have suggestions on how i should change the editing feature, i'm happy to hear them :) Currently there are several ways:
Edit the XML via the editor
Import .irplus files via file manager. The .irplus format will be registered as an Intent-filter for the view action
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
....
Oh and by the way. The Samsung thing is not a "maybe" it's a fact unfortunately. I've did some research on it when i owned a samsung device with IR myself. I don't know what they messed up but they did. When you don't use repeats. Everything will just work fine, as each IR-code will overwrite the wrong values in the array anway. But if you use repeats it will mess up things..
Try to send a long "clear" cache pattern after each code e.g.
0000 0073 0000 0000 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8
I will do some more testing next week.
I am using an SFH506-36 IR receiver with a hardware logic analyser attached. The analyser shows the received demodulated 36 KHz IR signal, it shows timing and also conveniently decodes the manchester/bi-phase codes using the number of desired bits (ie 11 for RC5, skipping the 2 sync bits and the togglebit), see posted pictures. So what I see is what is coming out the phones IR port or from the original IRT8050.
As far as the editor is concerned, when I go to Import it takes me to github (irplus), sourceforge (lirc), tries to paste a filename/url (paste) or proposes some very convoluted filepath on SD which I cant find anywhere.. I would like to access the filemanager and browse for a local file. It would also be nice if you could at least just paste some previously copied source into the XML editor.
I have done some more testing. Using the RC5 format with a ''repeat'' does also show a glitch on the IRPLUS built in IR diagram:
That does not look like something in the Samsung driver, but points at some problem in the code.
Using the pronto version does result in serious glitches when using the 'repeat' option (see above). It seems to work when you just repeat the bit pattern a few times but still generates some spurious data. There is however another issue with Pronto_hex. It does not seem to use the togglebit. All keypresses result in the same code sequence. When using the toggle_bit or toggle_bit_mask options they are just ignored and deleted..
I still see no easy way to import codes prepared on the PC. The IRPLUS import options SD, URL etc are completely unclear to me.. They just go to some website or result in unexplained file errors. How do I simply import a file that I emailed to my phone.
Hi, yes the single line you see is due to the pronto format. Pronto works with pulse width (space and pulse) and it would be "illegal" to use a completely zero-ed burst pair
http://www.remotecentral.com/features/irdisp2.htm
So to represent "empty" signals i'm using 0001 internally instead of 0000. Which causes the line after each signal. In reality its such a small IR pulse that all decoders will safely ignore.
Pronto also does not automatically set the toggle bit as you noted. But it is still possible to use it. However you have to specify it yourself. As said you can use Irscrutinizer to generate a valid irplus pronto file with toggle bit.
You can specify a pronto-format toggle bit by using a pipe e.g.
<button label="" alt="POWER" backgroundColor="FFC84334" span="4">0000 006C 0000 000C 0005 011F 0005 00BD 0005 011F 0005 011F 0005 011F 0005 011F 0005 00BD 0005 00BD 0005 00BD 0005 00BD 0005 00BD 0005 07F8|0000 006C 0000 000C 0005 011F 0005 011F 0005 011F 0005 011F 0005 011F 0005 011F 0005 00BD 0005 00BD 0005 00BD 0005 00BD 0005 00BD 0005 07F8</button>
Are you using Gmail on Android? You can just click on the attachment (send an *.irplus file) and it will ask you to open it with irplus. No need to use the actual app to import. Its pretty easy.
The Philips IRT8050 is a remote control for office lighting systems. It uses RC5 codes with device IDs 29 or 30 for some microswitch settings. The IRT8050 has two buttons. Functions and codes change depending on an internal microswitch. I need to use them for dimming or increasing the lighting level (all 8 microswitches are in off position). The codes are 0x74A and 0x749. Pressing the button once will switch the lights off or on. Pressing the button continuously will dim or increase the level.
I replicated the IRT8050 on a Samsung S6 using irplus and the settings below.
`
<device manufacturer="PHILIPS" model="IRT8050" columns="12" format="WINLIRC_RC5"
toggle-bit-pos="2" one-pulse="800" one-space="800" zero-pulse="800" zero-space="800"
bits="13" repeat="8" frequency="36000" rowSplit="2" scaleRatio="4.0">
`
However, there are some issues:
The settings for pulse and space have no effect. I understand all are hardcoded for RC5 ?
The repeat function works, but I can not send a single code to switch lights on or off. The ''repeat'' function can not be active for some buttons and inactive for others. The ''repeat interval'' (default 500ms) does not seem to allow much shorter settings. The lighting controller will switch on/off rather than dim/increase when repeat interval between codes is longer than about 150ms. I would like to see the same behaviour as on the IRT8050: one button press sends one code (for on/off), holding the button will start the repeat function (i.e. dim) as long as the button is pressed. Alternatively a separate button for single code or repeated code would be fine.
The irplus keeps transmitting for a bit longer after releasing the button. That leads to some delayed response of the lights
There is a burst of spurious bits after the 8th repeated code and before the next set of 8 is send out. Luckily the receiver ignores that false data, but it should not be there.
Here is a capture of the spurious data that shows up after a set of 8 repeated codes
Here is a zoomed in capture of the spurious data
There are many other codes depending on the microswitch settings that could be added for other configurations of the lighting controllers. There are also other Philips lighting remotes that have more buttons. The Philips system is also sold under other brandnames.