linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: Matthias Reichl <hias@horus.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [BUG] ir-ctl: error sending file with multiple scancodes
Date: Wed, 29 Nov 2017 20:05:21 +0000	[thread overview]
Message-ID: <20171129200521.z4phw7kzcmf56qgi@gofer.mess.org> (raw)
In-Reply-To: <20171129144400.ojhd32gz33wabp33@camel2.lan>

Hi Matthias,

On Wed, Nov 29, 2017 at 03:44:00PM +0100, Matthias Reichl wrote:
> Hi Sean!
> 
> According to the ir-ctl manpage it should be possible to send a file
> containing multiple scancodes, but when trying to do this I get
> a warning and an error message.
> 
> I initially noticed that on version 1.12.3 but 1.12.5 and master
> (rev 85f8e5a99) give the same error.
> 
> Sending a file with a single scancode or using the -S option
> to specify the scancode on the command line both work fine.
> 
> I've tested with the following file:
> 
> scancode sony12:0x100015
> space 25000
> scancode sony12:0x100015
> 
> Trying to send it gives this:
> $ ./utils/ir-ctl/ir-ctl -s ../sony-test.irctl
> warning: ../sony-test.irctl:2: trailing space ignored
> /dev/lirc0: failed to send: Invalid argument
> 
> Checking with the -v option gives some interesting output - it
> looks like the the second half of the buffer hadn't been filled in:
> 
> $ ./utils/ir-ctl/ir-ctl -v -s ../sony-test.irctl
> warning: ../sony-test.irctl:2: trailing space ignored
> Sending:
> pulse 2400
> space 600
> pulse 1200
> space 600
> pulse 600
> space 600
> pulse 1200
> space 600
> pulse 600
> space 600
> pulse 1200
> space 600
> pulse 600
> space 600
> pulse 600
> space 600
> pulse 600
> space 600
> pulse 600
> space 600
> pulse 600
> space 600
> pulse 600
> space 600
> pulse 1200
> space 600
> pulse 0
> space 0
> pulse 0
> space 0
> pulse 0
> space 0
> pulse 0
> space 0
> pulse 0
> space 0
> pulse 0
> space 0
> pulse 0
> space 0
> pulse 0
> space 0
> pulse 0
> space 0
> pulse 0
> space 0
> pulse 0
> space 0
> pulse 0
> /dev/lirc0: failed to send: Invalid argument

Oh dear, that looks very broken! Looks like I did not test multiple
scancodes in one file.

> The goal I'm trying to achieve is to send a repeated signal with ir-ctl
> (a user reported his sony receiver needs this to actually power up).

That's interesting.

> Using the -S option multiple times comes rather close, but the 125ms
> delay between signals is a bit long for the sony protocol - would be
> nice if that would be adjustable :)

Yes, that would be a useful feature.

I've got some patches for this, I'll send them as a reply to this. Please
let me know what you think.

Thanks,

Sean

  reply	other threads:[~2017-11-29 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29 14:44 [BUG] ir-ctl: error sending file with multiple scancodes Matthias Reichl
2017-11-29 20:05 ` Sean Young [this message]
2017-11-29 20:17   ` [PATCH 1/2] ir-ctl: fix multiple scancodes in one file Sean Young
2017-11-29 20:17     ` [PATCH 2/2] ir-ctl: specify the gap between scancodes or files Sean Young
2017-11-30 15:34   ` [BUG] ir-ctl: error sending file with multiple scancodes Matthias Reichl
2017-11-30 22:27     ` Sean Young

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171129200521.z4phw7kzcmf56qgi@gofer.mess.org \
    --to=sean@mess.org \
    --cc=hias@horus.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).