Jump to content
Flirc Forums
matt_garman

Feature Request: use FLIRC as a generic USB IR receiver

Recommended Posts

Not sure if this is even doable, but I thought I'd ask...  Rather than presenting itself to the OS as a keyboard, what if FLIRC presented itself as a generic serial device, and just passed the IR signals on to the OS?  In the past, I've done exactly this with this device: USB-UIRT.  Under Linux, the USB-UIRT shows up as a serial device (typically /dev/ttyUSB0).  It's a "dumb" device in that it just passes the IR signals to the OS, so it's the OS's job to do something useful with them.  Under Linux, you do this with LIRC.

In my mind, for the FLIRC, I envision this as an "unsupported warranty-voiding community-support only advanced mode".  You'd have to use the CLI tool to convert the FLIRC device to act in this manner.  But as long as LIRC could recognize the signals, you have a much more generic device.

There's no shortage of DIY plans for building a USB-UIRT equivalent, for not much money.  As much as I love DIY electronics projects, if I could get the same result out of the box for $23 (i.e. FLIRC), I'd be really happy.  :)

Share this post


Link to post
Share on other sites

one of the major reasons I haven't done this is because of windows. Fuck windows. I spent half my time with the first generation working on stupid driver issues, signing inf's and windows not correctly installing them. It's a gigantic waist of time and I lost a lot of sleep over it. 

Unless I figure out how to show up as a serial device in windows without a driver, I'm not in a position to do this. I'm working on finishing features for flirc gen2 and new products.

I also haven't found a protocol definition for LIRC and UART. I also don't want to be in a position to be debugging LIRC. After all, Flirc stands for F[uck] LIRC. Built entirely out of my frustration with it. Flirc is an embodiment of "This shouldn't be this hard"

  • Like 1

Share this post


Link to post
Share on other sites

 

So you're saying this feature has a chance?  ;)

 

4 hours ago, jason said:

After all, Flirc stands for F[uck] LIRC. Built entirely out of my frustration with it. Flirc is an embodiment of "This shouldn't be this hard"

 

Is that for real?  That's hilarious!

 

Share this post


Link to post
Share on other sites

@jason, I think LIRC can also work with HID input. So instead of trying to implement such advanced mode using serial port emulation I would much rather like to see Flirc sending a custom HID report containing 4-byte hash it is calculating from IR signal. It could do that for any unrecognised (not recorded) button. That would not need any drivers to work. It would be usable with LIRC and on Windows with apps like EventGhost.

Share this post


Link to post
Share on other sites
1 hour ago, yawor said:

@jason, I think LIRC can also work with HID input. So instead of trying to implement such advanced mode using serial port emulation I would much rather like to see Flirc sending a custom HID report containing 4-byte hash it is calculating from IR signal. It could do that for any unrecognised (not recorded) button. That would not need any drivers to work. It would be usable with LIRC and on Windows with apps like EventGhost.

Wahoo, I'd be up for that. Yeah, would love to find out some more information about that, any chance you know where I can find some? Most of the time, I have to find that I have to pull apart existing firmware/etc, and I'm not in a position to reverse engineer anything time wise.

Share this post


Link to post
Share on other sites

@jason I've never used LIRC. I've googled lirc hid input and got some results but maybe I've jumped too fast to conclusion that this is possible. On the other hand, EventGhost (on Windows) is 100% capable of using any generic HID device as a source of events.

Share this post


Link to post
Share on other sites
On 7/19/2017 at 7:39 AM, yawor said:

@jason I've never used LIRC. I've googled lirc hid input and got some results but maybe I've jumped too fast to conclusion that this is possible. On the other hand, EventGhost (on Windows) is 100% capable of using any generic HID device as a source of events.

I got excited. Oh well. Fuck LIRC.

Share this post


Link to post
Share on other sites

A bit late to this, but I'd like to see this as well. I run kodi on linux, with a plugin to watch netflix. Currently the only way to watch netflix on linux is via the browser (chrome) due to the drm. So the plugin (flix2kodi) handles the login and meta data display etc, and then use a fullscreen chrome to play the videos. Here's the problem: since flirc acts as a keyboard, the browser will (of course) hog all keyboard input when running. That means all the fancy kodi remote key mapping is mostly useless. If the option to use Flirc as a lirc device would exist, this problem would be possible to work around. 

Edited by kackapa

Share this post


Link to post
Share on other sites

I think working with kodi on a solution is better. LIRC support and documentation is garbage. I'm not in a position to try and solve this.

I will probably at some point publish a USB interface descriptor and how data is sent up raw to the host for developers to make plugins and further integrate. But seriously, I created flirc out of my own frustration with LIRC. 

Share this post


Link to post
Share on other sites

I got this to work btw, by setting up X to ignore Flirc "keyboard" input, and then configuring LIRC to use Flirc as a devinput device.

Share this post


Link to post
Share on other sites
4 hours ago, kackapa said:

I got this to work btw, by setting up X to ignore Flirc "keyboard" input, and then configuring LIRC to use Flirc as a devinput device.

Wait, what?

Share this post


Link to post
Share on other sites

Well, I noticed in the LIRC doc that it does (via the devinput driver) support  IR receivers that emulates keyboards, so from there it was just a matter of getting everything correctly setup...

 

Edit: And by "got this to work" I mean for my use case, i.e. that Kodi is the sole receiver of remote input, regardless of what other app is running in foreground.

Edited by kackapa

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×