From: Joe F. <joe...@gm...> - 2023-09-26 02:09:24
|
The Sharp remote send timing appears to be off from what I can track down. I started investigating this because my Denon receiver I'm trying to send commands to appears to be more sensitive to IR command timing and doesn't always response where as my other devices appear to work just fine using LIRC. According to this page https://www.sbprojects.net/knowledge/ir/sharp.php a logical "1" should be 2ms in total length and "0" should be 1ms in total length. If I use ir-ctl to measure the raw values from my remote I can confirm this timing (also confirmed using my ocilloscope). If I try to transmit using this command "ir-ctl -d /dev/lirc0 -S sharp:0x2e1" and view the results on my oscilloscope I'm seeing 2.3ms and 1.3ms instead of the expected 2ms and 1ms. Not 100% sure where this code is hiding but I found a couple places on github that relate to this timing issue... This is the code I found in the Linux kernel https://github.com/torvalds/linux/blob/master/drivers/media/rc/ir-sharp-decoder.c#L17-L18 sharp_unit = 40 40 * 8 = 320 for the pulse is correct. But then the space is either 40 * 50 = 2,000 or 40 * 25 = 1,000 which I believe should be 40 * (50-8) = 1,680 and 40 * (25-8) = 680 to account for the initial bit pulse. This is the code I could find for ir-ctl... https://github.com/cz172638/v4l-utils/blob/master/utils/ir-ctl/ir-encode.c#L149-L151 It has a similar problem, it doesn't appear to be taking into account the initial bit pulse into the timing. What am I missing? |