Jump to content
Flirc Forums

Transmit IR signal on gen 2

Recommended Posts

Hi everyone! 

I haven't bought the Flirc just yet, my original plan was to buy one along with a Broadlink device so that I could map a button on my non-smart IR tv remote to have the Broadlink send an IR signal to another device (a HDMI switcher box that changes input). But I'm now reading that the 2nd gen of the Flirc does some transmitting! If this is the case then it would mean I don't even need to buy the Broadlink. Could anyone confirm? It doesn't need much range as I'll place the Flirc right in front of the device I'm hoping to transmit to (the HDMI switcher box). 


Edited by rb.sam
Link to post
Share on other sites
  • 2 weeks later...

I don’t have time to support it right now. It’s all possible through scripting, and quite honestly, I’m not pleased with the transmitter. I’m working on integrating a much higher power transmitter in the next generation. You need line of site, 6 feet max. It’s not good.

Link to post
Share on other sites
24 minutes ago, jason said:

I don’t have time to support it right now. It’s all possible through scripting, and quite honestly, I’m not pleased with the transmitter. I’m working on integrating a much higher power transmitter in the next generation. You need line of site, 6 feet max. It’s not good.

The lack of distance for line of sight wouldn’t be an issue for my desired setup, but it’s the code I’m having trouble with. Whenever you do get time are you able to write something where I can replace certain bits like the IR frequency? No problem if not, I understand if you’re super busy and don’t get the time 

Link to post
Share on other sites
42 minutes ago, jason said:

You use the GUI to capture the IR waveform, and use the CLI or SDK to retransmit that same waveform. Only the 38khz frequency is supported.

I can’t seem to find the documentation on the SDK, the page I went to is down - got a link? 

Link to post
Share on other sites
  • 3 weeks later...



  * fl_transmit_raw() sends a raw packet. Only supported on flirc gen2 hardware
  * @param buf data to transmit, please be responsible, numbers are in
  * micro seconds
  * @param len length of buffer, don't send more than 100 bits, must be
  * even number of bits (edges).
  * @param ik delay to use inbetween packets. Required.
  * Defaults to 40ms if to low.
  * @param repeat repeat count, generally should be 3, 0 is infinit until
  * stopped, currently not supported.
  * @return EOK
  * @return -1 error
  int _DLL fl_transmit_raw(uint16_t *buf, uint16_t len, uint16_t ik, uint8_t repeat);


Link to post
Share on other sites
  • 3 months later...


Thank You so much, Flirc team, for this great little thing!  

I need to receive and send IR-commands to make my good old parents be able to 'Skype' on their TV. I am C programmer, so I am not worried (yet) about using that API-command. (Will use a Mini-PC with Win in order to allow Skype or Whatsapp to run.)

Please allow me two questions:

a) Will it work to use a cheap USB-powered IR-repeater to catch the signal from the Flirc (Gen 2) and send it out stronger again?

b) Do you have some time-estimate when Generation 3 will come out with a full-featured 'IR Command Sending'?

Thanks you so much!!!

All (=) Love, Ernesto ~:)

PS:  Welcome to co-realize this project I need for my parents...





Link to post
Share on other sites
  • 4 weeks later...

Trying to figure out how to use the flirc to send IR commands is pretty daunting.  For starters, the blog post won't load: http://blog.flirc.tv/index.php/2017/08/06/sdk-release-linux-rpi-ir-transmit-support/

I've tried to cobble together various ways to do it, but I have seen three different flirc_util commands mentioned that don't work, finally finding the one that currently works with software version 3.25.3, which is the "sendir" command.

My use case I would think is common, I want to use a remote to control a device the remote doesn't support, so I want Flirc to receive one command and transmit another.  I'll program my remote to control some arbitrary device it supports, then have the Flirc send a different command that controls my actual device.  In my case it's my LG TV remote that I want to use to control the volume on an amplifier, but the LG remote doesn't support it nor does it have a learning function to control arbitrary devices.

To get started on a proof of concept, I can use the GUI device log to capture the IR sequence I want to transmit.  I press a button on my remote and the device log will show something like:






The long string there is the IR code I guess (I really don't know what I'm doing here).  I can then transmit this code by doing something like:

    flirc_util.exe sendir --ik=23000 --repeat=3 --pattern="0,9003,4390,619,470,614,470,614,470,614,1588,614,470,614,474,614,470,614,1588,614,1582,614,1588,614,1587,614,470,614,1588,614,1583,614,1587,615,469,615,474,610,1587,615,1587,615,469,615,470,614,474,615,1583,614,474,614,1583,614,474,610,474,614,1584,614,1587,615,1587,614,470,614,1583,618"


This is enough for me to write a simple script that can be triggered with a keyboard press, but I suspect it will be slow and I'll need to dust off my ancient or now non-existent C skills and see what I can do. 

What would be end game for me is if I could flash the flirc with my own custom firmware and then connect the flirc to power and use it standalone without any PC.  Is something like this possible?  Assuming it's not possible, I have a Raspberry Pi Zero W on the way to control the flirc instead.

I'll report back when I've got my setup in production, but hopefully the above will save someone some time.

Edited by dood
Link to post
Share on other sites

I got my POC working, but as expected it's slow.  Each key press needs to invoke a script separately, and long press doesn't work well at all.  It does work, however, and it's usable even.  My next iteration is going to be attempting to write a C daemon with the SDK instead.  I'll share the code if I get it working.

Link to post
Share on other sites
  • 1 month later...

So I actually bought the Flirc recently and so far I've set it up so my LG tv remote control will communicate with my homebridge automation server to go to the YouTube app if I press the red button, go to the BBC iPlayer app if I press green, turn on our living room lamp if I press yellow and go to Plex if I press blue. I haven't bought a HDMI switch yet, but if I could find one that is wi-fi controllable and it can communicate with homebridge then that will avoid the need to send IR signals to a switch

Link to post
Share on other sites

If you need help with the sdk, let me know.  It would be better to write a daemon that keeps the device open and you send it a command. Sorry. I’m deep in another product right now. You’ll understand when it comes out 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...