Page 1 of 1

Using Java to write an application that uses the UIRT

PostPosted: Tue Feb 08, 2005 2:54 am
by jengaseuss
I see that the API is in C. Has anyone used Java to write a user application that tells the UIRT to learn and send IR signals??? It is difficult to tie the C and Java together, or did it not take much to make the API work.

Thanks,

Dan

PostPosted: Thu Feb 10, 2005 10:13 pm
by Guest
I think SageTV is coded in Java and uses USBUIRT, so it must be possible.
I'm a long time Java programmer, but have never done any JNI (Java Native Interface) stuff, but that's the key: declaring the UUIRT methods as native and acessing them that way. Not sure how to do the callbacks, but I'm certain its possible.

Search Java forums for JNI info.

Maybe this will help:
http://java.sun.com/docs/books/tutorial ... index.html

Java JNI Wrapper

PostPosted: Thu Apr 28, 2005 3:46 am
by pghosh
I have started building a JNI wrapper for the USB-UIRT dll. Please email me at pghosh@softhome.net if you're interested in using it.

-Peter

PostPosted: Tue May 10, 2005 3:28 pm
by pghosh
I have posted my project at sourceforge. http://sourceforge.net/projects/uirt-j/

PostPosted: Tue May 10, 2005 11:32 pm
by jrhees
Peter,

Awesome! Fine work!

Just one note -- you may want to remove uuirtdrv.dll from your source distribution and (if necessary) change your wrapper to dynamically load the dll from the Windows path (where it is installed). I don't know if this is possible...

-Jon

PostPosted: Thu May 12, 2005 1:58 pm
by pghosh
Thanks Jon.

I haven't done much C development in the past, specially any for the Windows platform. As you'll notice most of the C code is lifted from your test application.

I have populated the CVS tree at sourceforge and will gladly grant you developer access if you're interested in helping me maintain the code base.

-Peter

Official

PostPosted: Fri Oct 07, 2005 5:02 am
by Guest
So where can i find the origional? :wink:B):wink: