Jump to content
Flirc Forums

How to compile flirc SDK and use the SendIR command to use Flirc as a scripted IR transmitter only in Ubuntu 20 linux X64


tirtho

Recommended Posts

Unfortunately the documentation and support is rather lacking on this feature possibly due to lack of dev cycles anyway here is a "how to" of the   " SendIR waveform function" from latest git as of feb 8 2021 on Ubuntu 20 x64:

( this guide assumes basic Linux know how, and may be invalidated over time due to updates to git)

Side note: There exists other devices  I bought like USB-UIRT which do a better job but have their own issues, flirc however I find a little easier to capture IR waveforms  so has some uses the issue is the transceiver its not going to work unless your literally sitting the usb unit in front of the device you want to control. 

Objective: What is Send IR, its a way to remotely send Infrared signals directly outbound, as opposed to what Flirc was designed for which is mainly inbound device control.

 

1. You will need Ubuntu 20 or equivalent

2. You will need V2 of the Flirc

Steps: 

a. install flirc using the known methods namely:

Debian [64], Redhat [64bit], or Raspberry Pi Debian

     curl apt.flirc.tv/install.sh | sudo bash 

 

b. get git,

sudo apt install git 

c. Make a directory and install and compile the sdk

Commands from your home directory:

cd ~

mkdir buildsdk

cd buildsdk

git clone https://github.com/flirc/sdk.git
 

cd sdk

cd cli

sudo apt-get install libusb-1.0-0-dev libreadline-dev libhidapi-dev

make all

now your tool will be compiled in:

~/buildsdk/sdk/cli/buildresults/Linux_x86_64/x86_64_linux_gnu_gcc_10/flirc_util/debug/

And it is called flirc_util (latest version from git) 
 

d.  Capture IR command signal

Open the traditional Flic setup and control tool,  my tool which was installed in step (a) is Flirc v3.25.3 it says connected as my flirc is inserted in the computer, if you cannot find it refer to installation again in step (a). open the app, goto File, drop down:  click device log, click on the checkmark (x) Enable IR debugging.

This will record all IR signals being sent to the flirc you will need this to create your IR commands.

So Example:

Mon. Feb. 8 2021 01:51:26

Flirc GUI Version v3.25.3

Operating System: Linux

*** Device Disconnected ***

*** Device Connected ***

 

So lets say I want to record the power off, power on button for my heater; When I press power on/off button while pointed towards the flirc the waveform command is, captured and immediately shows up in the debugging window as:

0,9073,4414,618,1595,622,470,618,469,649,443,618,470,622,465,623,469,622,466,622,470,617,1596,622,1595,622,1595,618,1595,622,1595,622,1595,622,1594,618,1599,618,1594,622,470,618,1595,626,465,622,466,622,469,618,470,622,470,617,470,621,1595,618,469,622,1595,621,1595,622,1591,622,1595,622

 

Now you have successfully captured the IR signal.

 

e. Send IR command signal

in step C, you created the flirc_util from git

so, Point the USB flirc at whatever device you want to control in my case heater

now from command prompt goto ~/buildsdk/sdk/cli/buildresults/Linux_x86_64/x86_64_linux_gnu_gcc_10/flirc_util/debug/

and run this command:

flirc_util sendir 0,9073,4414,618,1595,622,470,618,469,649,443,618,470,622,465,623,469,622,466,622,470,617,1596,622,1595,622,1595,618,1595,622,1595,622,1595,622,1594,618,1599,618,1594,622,470,618,1595,626,465,622,466,622,469,618,470,622,470,617,470,621,1595,618,469,622,1595,621,1595,622,1591,622,1595,622

 

Now in my case the heater if turned on  turns off,  and if the heater is off turns on, 

You have successfully transmitted the IR signal by the computer.

 

 

Main use cases would be remote ( ie not even home) control of appliances and some robotics applications. Where you can remote into your computer from away and run scripts to control things,  I guess use your imagination.

 

Good luck

 

 

 

 

 

 

 

 

Edited by tirtho
Link to comment
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.

Guest
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...