Writing an lirc patch

Interested in integrating USB-UIRT support into an application? Look here!

Moderator: jrhees

Writing an lirc patch

Postby KShots » Tue Oct 31, 2006 2:51 pm

Hello all,

I'm interested in writing an lirc patch for the usb-uirt device, as the current lirc patch is broken (and apparently never did work correctly). Before I begin, however, I would like to make absolutely certain that my device is communicating with my kernel correctly. I had followed the installation instructions found in this thread, and did not quite get the expected results (look towards the end of page 5 for my posts). In general, the kernel recognizes a USB serial device of some sort, but mentions nothing about a USB-UIRT device of any sort (as is demonstrated on page 1).

If I can confirm that the device is communicating correctly with the kernel, I believe it would be worth my while to make a lirc patch that actually works (as from my searching, there are no other USB IR transceivers that even claim to work - I'm stuck with this device as my only option).
The Great Pop-Tart GAWD of Mt. Kellogs
KShots
 
Posts: 12
Joined: Sun Oct 29, 2006 5:07 am
Location: Everywhere

Postby MM » Fri Nov 10, 2006 6:16 pm

MM
 
Posts: 13
Joined: Sat Sep 30, 2006 6:10 pm

Postby garybilkus » Sat Nov 18, 2006 2:34 pm

I've just posted a message in the installation forum (under the lirc howto topic) about this. I'm also thinking of trying to produce a patch which will be accepted into the main lirc codebase and which will allow the device to work as well as I can already get it under windows.

I have already managed to get the device working with the 0.7.1 patched raw mode, and this includes both receive and transmit. However, receive in raw mode is problematic - only a small number of the remotes I've tried appear to work properly. Under windows receive is easy because the 6 byte non-raw mode works well.

So, what I'd like to end up with is a driver which
a) receives using the 6 byte format
b) transmits using raw
c) works from a single configuration file in which you only need to get the 6 byte codes for receive only remotes, but have to provide data twice for receive and transmit remotes.

Looking at the code, I think this will require creating a new LIRC mode and enhancing the format of the config file, and I'm loath to do that unless the maintainer of the lirc code is comfortable that the result would be deemed acceptable as a patch.

Any thoughts?
garybilkus
 
Posts: 5
Joined: Sat Nov 18, 2006 9:13 am

Postby MM » Sat Nov 18, 2006 3:35 pm

If i could i would write my own application because lirc is very limited. Also an application with a GUI would be nice because linux is no longer a "Terminal OS".
MM
 
Posts: 13
Joined: Sat Sep 30, 2006 6:10 pm

Postby garybilkus » Sun Nov 19, 2006 8:27 am

I'm not really interested in a gui - the system I'll be running this on may well turn out to be headless - and I am interested in lirc compatibility, so I can control applications which already use lirc.

That said, rather than attempting to shoehorn my overall structure into the existing lirc file format and process, it may well be easier, cleaner and better to write a separate standalone program which can, if required, communicate with an existing lirc over tcp.

If people then wanted to take that program as a basis for something snazzier, they'd be welcome.
garybilkus
 
Posts: 5
Joined: Sat Nov 18, 2006 9:13 am

Postby Gribnif » Wed Nov 29, 2006 7:01 pm

There's no reason to write a new patch, as it has very recently been added to CVS. Download the current lirc 0.8.1 CVS version and compile --with-driver=usb_uirt_raw from:

http://sourceforge.net/cvs/?group_id=5444

That said, I'm still having some trouble getting it to work fully. It won't transmit codes for all of my remotes, because they require too many command bytes be sent. I'm working on it, though.
Gribnif
 
Posts: 2
Joined: Wed Nov 29, 2006 6:46 pm

Postby Gribnif » Wed Nov 29, 2006 7:20 pm

Well, it looks like my problem was the min_repeat option in lircd.conf. If I set this to 0, it seems to work, though whether this will lead to reliability problems due to the data not being repeated, I don't know.

I'll have to see if lirc can be modified to send the same set of command bytes multiple times, rather than repeating them all in one go.
Gribnif
 
Posts: 2
Joined: Wed Nov 29, 2006 6:46 pm

Postby garybilkus » Sun Dec 10, 2006 5:24 pm

I've been trying the latest cvs version with some success for remotes for which I already have a working configuration. However, I simply cannot get the irrecord to work reliably, which appears to be because that relies on the same RAW mode as is used for normal receive, rather than the newer V5 RAW mode which is much more reliable if the remote control is very close to the uirt.

I've created a simple program which puts the uirt into this V5 mode, listens for messages, and converts them into the 'mode2' format used by the standard hardware drivers.
You can pipe that into the standard (default, not uirt )driver using a named pipe, and then get irrecord to listen to that - seems to work.
If there's interest I can post what I've done but warning, it's not been nicely packaged or documented.
garybilkus
 
Posts: 5
Joined: Sat Nov 18, 2006 9:13 am

Postby KShots » Sat Apr 28, 2007 2:34 pm

Ah, I had not realized there were replies here - I just assumed there was a lack of interest. I'd be interested in seeing what you have done.
The Great Pop-Tart GAWD of Mt. Kellogs
KShots
 
Posts: 12
Joined: Sun Oct 29, 2006 5:07 am
Location: Everywhere

Postby garybilkus » Sun Apr 29, 2007 8:52 pm

Is there somewhere I can post the code? It's not large, but too large for a message.
garybilkus
 
Posts: 5
Joined: Sat Nov 18, 2006 9:13 am

Postby gargleblaster » Tue Sep 18, 2007 2:30 am

Hi folks,

I am trying to set up a linux music server, and the only problem I currently have is controlling my Sony amp. I have tried the latest CSV version of Lirc with no luck. I can record some commands and they are recognized by lirc, but sending just doesn't work. LED blink but nothing is recognized. A repeat count of more than 0 results in a timeout from irsend.

Irrecord also has problems when I switch to raw mode. I guess there are acoupld of alternative I can pursue - try and get Lirc to work, or hack at Misterhouse to get the learning interface of that program to work. I am not familiar with the low-level interface however and would like to avoid any unnecessary work if possible :)

I found this post from around April from garybilkus about a workaround to get the correct learning mode working. Gary, can you post that to the Lirc sourceforge board if there is no way to attach it here?

KShots, any luck with the Lirc work you were asking about?

Jon, can you provide a program similar to lrnhelper.exe for linux? At least some code I can try and compile under ubuntu if you do not have a version installed... Being able to use my previousle saved Girder commands (ie RAW and Pronto support) would be even better...

Thanks
gargleblaster
 
Posts: 1
Joined: Tue Sep 18, 2007 1:38 am
Location: NC


Return to Developers

Who is online

Users browsing this forum: No registered users and 27 guests

cron