repeat codes

johngo7470
Posts: 9
Joined: Tue Mar 13, 2018 1:45 am

repeat codes

Post by johngo7470 »

Is it possible to configure AnalysIR to capture the "repeat" codes, after the initial function codes?

(I have a need to send Volume Up and Volume Down for a few seconds)
User avatar
AnalysIR
Site Admin
Posts: 794
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: repeat codes

Post by AnalysIR »

The simple answer is yes.

AnalysIR will capture whatever signals you send/record.

By default the export will use whatever was recorded.

If the protocol is recognized by AnalysIR, always use the 'clean' feature under Power Tools for better performance, before exporting for use.

If you need to extend the signal duration, simply export in RAW format and use your favorite editor (like Notepad++) to paste in multiple copies of the signal, using a gap/space of between 20,000 & 100,000 uSecs.
Usually its easier to just record a longer signal into AnalysIR.

If you are using something like IRremote to send the signal just put the irsend in a loop with a delay (20) (gap) as above

If you mean something else - provide more details.
johngo7470
Posts: 9
Joined: Tue Mar 13, 2018 1:45 am

Re: repeat codes

Post by johngo7470 »

Turns out I was confused by only seeing 4 codes in the trace image, but as you mentioned, the export function will provide a longer window of data.

I've noticed some protocol's have a "repeat" code, but seems Samsung doesn't support it.

I tried cut/paste of a single code (with about 45ms space between codes), but the behavior of the tv is not smooth. When I use irsend on an older version of RPi, the response on the tv is smooth, but when I try it with ir-ctl, I get "blotchy" behavior on the TV (e.g. sending volume down codes, results in fits and starts'ish behavior).

I'll try the longer export, and cut/repeat the full export, to see if it helps.

Thank you!
johngo7470
Posts: 9
Joined: Tue Mar 13, 2018 1:45 am

Re: repeat codes

Post by johngo7470 »

On a related note, buried in a different forum, I learned that Samsung IR TV codes may be possible with ir-ctl, by using the NECX protocol, which is also indicated at irdb.tk.

The header times are different, so it's not a perfect match, but it does seem to work on my Samsung TV.

However, when I try to read the code with LearnIR, it's not identified as Samsung, but rather NEC, which further suggests the code is not fully Samsung proper, but apparently close enough to satisfy the tv.

Similarly, the IR signal from irsend SEND_START, is simply identified as RAW.
User avatar
AnalysIR
Site Admin
Posts: 794
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: repeat codes

Post by AnalysIR »

I don't fully follow all of the details you posted.

Have you tried using mode2 command of LIRC?

If you have some difficult signals to get working, feel free to email me a set of them by email (Menu->File->Save Session in AnalysIR) and I will have a look.
johngo7470
Posts: 9
Joined: Tue Mar 13, 2018 1:45 am

Re: repeat codes

Post by johngo7470 »

First, I wish to withdraw my earlier comments on using necx to send Samsung codes. The signal is somewhat close, but has a different header, and the mark/space ratio is different. Using ir-ctl with necx *might* work, but it might not, and might not be reliable.

LIRC is a bit of a sore spot. It's been a solid performer for me, and even though it wasn't broken, someone decided to "fix" it in kernel 4.19, which at the very least required making changes in /boot/config.txt to point to a new driver/overlay, and possibly needing to run lirc-old2new. In my particular case, I "accidentally" removed python3 (due to a separate issue), and that broke lirc. Now I can't seem to breathe life back into it, and am relying on ir-ctl, which is not as functional as lirc was.

I'll test the extended raw data with ir-ctl this weekend...

Thank you for your excellent and speedy support! :D
User avatar
AnalysIR
Site Admin
Posts: 794
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: repeat codes

Post by AnalysIR »

Thanks for the update...

FYI: you should be able to use LearnIR to send from an RPi over serialUSB. You would just need to dig a bit into the API specs that are included with the download (Manual & example Arduino sketch for driving LearnIR directly)

We also have an A.IR Shield nano in our shop, that allows you to writs custom scripts. (We also have a python script for driving that directly form any Python Host PC)


Last time I checked sending RAW signals via LIRC was OK.
johngo7470
Posts: 9
Joined: Tue Mar 13, 2018 1:45 am

Re: repeat codes

Post by johngo7470 »

[added additional recovery detail]

Some good news - I was mysteriously able to restore irsend functionality - apparently update/dist-upgrade/(re)install lirc/exec lirc-old2new/verify updated dtoverlay in /boot/config.txt, did the trick.

Very thankful it's working again!

This case can be closed.
Last edited by johngo7470 on Fri Sep 27, 2019 10:59 am, edited 1 time in total.
johngo7470
Posts: 9
Joined: Tue Mar 13, 2018 1:45 am

Re: repeat codes

Post by johngo7470 »

Just a quick update...

I did a bit more testing, and the extended raw data of Analysir came in handy.

Seems when irsend is sending repeat (SEND_START), there were hiccups occurring, which I could see in the data collected by Analysir. A trip-up in what's transmitted, would explain the behavior I've been seeing (volume raises/lowers quickly, then slows down for a couple numbers, then fast again).

Not sure what's happening, but would seem something is probably causing an issue on my RPi, that disrupts irsend.

As it turns out, I'm using Harmony Hub for some functions, so I decided to give the up/down responsibility to the Hub. It's slower, but works.
Post Reply