PDA

View Full Version : [Remote] Apple IR Emulator


bholland
04-06-2007, 07:33 PM
Hey everyone!

I have recently been developing a kernel extension that can emulate the HID control reports that the Apple IR Controller sends to the system. I have been able to get it to work for some commands, but there are still a few bugs that I need to work out. I hope to have it done and working very soon!

I'd rather not make a release yet as one of the bugs limits what you can actually control with it. I don't want bad copies circulating until I have something that actually does what it is supposed to do.

Thanks goes to eveyone that has sent me AppleIRController HID information as I wouldn't have gotten so far without it (I don't have a remote)! I hope to release this to the community very soon. I will be posting the status of this project as things develop.

Cheers,

bholland

CycloneFr
04-06-2007, 08:12 PM
i dont understand ? this is for generic IR remote used for PC?

Former Bender
04-06-2007, 08:38 PM
This is actually a software that transform key code from your keyboard to Apple Remote, so you can control AppleTV Finder.app on Macpro and Hackintosh.

JaS
04-06-2007, 08:44 PM
This is great. Can't wait to get this working on my Mac Pro :) thanks for the hard work on this guys.

CycloneFr
04-06-2007, 09:11 PM
the frontrowpass.kext does this also no?

Former Bender
04-06-2007, 09:28 PM
frontrowpass.kext is just a kext that fake/simulate the presence of an Apple Remote.

Front Row 1.3 (on Mac) is already working with keyboard without any hack.

Front Row 2.0 (on appleTV) is "only" working with the Apple Remote, though i have found support of keyboard/mouse and tablet in the AppleTV Finder code.

Bholland work is a "on the fly" keyboard<>Apple Remote translator/emulator.

dcpark
04-07-2007, 04:38 PM
XianLi, could you share your findings(regarding to support of keyboard, mouse and tablet in the AppleTV Finder code)? It'll be really helpful for hackint0sh users as well! I can launch and quit AppleTV Finder (FrontRow 2.0) on my hackint0sh, and that's all, cannot control it with my keyboard and/or mouse. Could you?

bholland, really cool news waiting for! please keep on doing your great work, thanks in advance. :)

JaS
04-08-2007, 05:55 PM
Anything going on yet with this or is it a dead issue?

bholland
04-08-2007, 09:18 PM
Vey much so not a dead issue! :) I wen't away for easter weekend so I havn't been able to work on it. Sarting Monday I will start working on it again. I think I found the bug in the play button and I did a rewrite of one of the vital parts of the driver. I will try and have it done soon. Regards,

bholland
http://www.brandon-holland.com

mathdude1284
04-08-2007, 09:53 PM
Good to hear from you, bholland! Thanks for working so hard on this...

munky
04-09-2007, 01:29 AM
cant wait! :D

mupupu
04-09-2007, 02:52 AM
yeah, awesome. i tried to do something like this myself, but found it was beyond my abilities. thanks for your hard work!

will you be publishing the code, or will it be binary only?

bholland
04-09-2007, 02:08 PM
Hey Everyone!

I managed to work out most of the serious bugs enough to make the driver usable.
I made a beta release today which is available here:

http://www.brandon-holland.com/irkeyboardemu.html

The binary includes a readme.txt which should contain most of the installation instructions. If your a dumb-ass feel free to post your questions in this thread. Also please post any problems or errors that you may find. Please do not use this driver for anything illegal. I am not responsible for any illegal use of this driver.

Have fun!

-bholland

munky
04-09-2007, 03:17 PM
hi brandon - great work, cant wait to try it.

do you think this could be adapted somehow to allow events from third-party IR dongles to be passed as apple IR events?

specifically, i have a Manta TR1 usb dongle (from twistedmelon.com) and an apple remote. i guess i could set up their sw to emulate keypresses, but i'd rather just get the thing to act like the apple IR receiver.

i might have a look around your src and see if i can figure something out :) thanks for posting it!


EDIT: Ok, i've just read your readme. the bit about the sysctl variable is very interesting :) maybe i can hack something together...

dcpark
04-09-2007, 03:34 PM
a big news ever heard! thanks for your great job!
i'll test it when my hackint0sh turns alive back. :)

diabolik
04-09-2007, 03:50 PM
i can confirm it works well on an hackint0sh :D

thanks again bholland, also bikedude880!

waiting10
04-09-2007, 04:24 PM
It worked on my hackintosh...Great works and Thanks.

mathdude1284
04-09-2007, 08:28 PM
Thanks for your great work, bholland!

Edit: I don't get it...volume keys are the same as up/down keys?

JaS
04-09-2007, 09:43 PM
Vey much so not a dead issue! :) I wen't away for easter weekend so I havn't been able to work on it. Sarting Monday I will start working on it again. I think I found the bug in the play button and I did a rewrite of one of the vital parts of the driver. I will try and have it done soon. Regards,

bholland
http://www.brandon-holland.com

Great news :) . Will be sweet to get to try aTV on my Mac Pro. Keep up the good work bro.

diabolik
04-09-2007, 09:47 PM
if you get this error :
second level name sendIR in kern.sendIR is invalid

you need to set the kext to a new USB HID device

AstrAir
04-09-2007, 10:51 PM
Very enlightning, thanks.

But is this info ment for Mr. Holland or for users with that problem ?
In case of the latter, please explain how to "set the kext to a new USB HID device".

FierceDeityLink1
04-09-2007, 11:02 PM
Very enlightning, thanks.

But is this info ment for Mr. Holland or for users with that problem ?
In case of the latter, please explain how to "set the kext to a new USB HID device".
I'd imagine he's just telling you to use a different USB device if the first one doesn't work (i.e.: use mouse 2 if mouse 1 doesn't work). Though, I'm using the same ven/dev ID as the mouse that is also configured as FrontRowPass (IIRC).

diabolik
04-09-2007, 11:07 PM
Very enlightning, thanks.

But is this info ment for Mr. Holland or for users with that problem ?
In case of the latter, please explain how to "set the kext to a new USB HID device".

its for everyone

follow the readme.txt included in the irkeyboardemu folder to set an HID device to the kext.

AstrAir
04-09-2007, 11:35 PM
I haven't read the readme.txt, yet.

I'm sorry for being to hasty, then I should have known before posting.
:-)

mupupu
04-10-2007, 02:24 AM
hi brandon - great work, cant wait to try it.

do you think this could be adapted somehow to allow events from third-party IR dongles to be passed as apple IR events?

specifically, i have a Manta TR1 usb dongle (from twistedmelon.com) and an apple remote. i guess i could set up their sw to emulate keypresses, but i'd rather just get the thing to act like the apple IR receiver.

i might have a look around your src and see if i can figure something out :) thanks for posting it!


EDIT: Ok, i've just read your readme. the bit about the sysctl variable is very interesting :) maybe i can hack something together...

Check out iRed (http://www.filewell.com/iRed/). You could easily whip together a profile for it with applescripts for each button that set the applicable sysctl variable with a shell script. Hell you could even use it with an Apple Remote ($29 at the apple store, i think), and be able to use an apple remote on any computer you like...

mathdude1284
04-10-2007, 05:45 AM
Anybody experiencing up/down arrows as volume control as well?

JaS
04-10-2007, 06:06 AM
Anybody experiencing up/down arrows as volume control as well?

Same issue here, This is on a Mac Pro.

SaberSHO
04-10-2007, 08:17 AM
Am i the only one having problems getting htis to work? It is succesfully loading the kext, and kbcontroller is working. Pushing up and down arrow on my keyboard changes the volume, and i can launch aTV-Frontrow by pushing spacebar, but when aTV-running-as-Frontrow actually launches, i still have no control. It seems the OS is getting the apple remote events, but not aTV.

Am i the only one with these problems (im trying to figure out if its a configuration/compatability problem).

FYI, I am running 10.4.8 SSE2 with aTV finder renamed as Front Row.app using the basic hacks + BRWindowRender hack.

Its just so odd, because the kext is definatly working, but its still not controlling atv-frontrow:confused:

dcpark
04-10-2007, 08:35 AM
a big news ever heard! thanks for your great job!
i'll test it when my hackint0sh turns alive back. :)

cooool!! works on my hackint0sh, except the KeyboardReader is too sensitive to control.. :rolleyes: (one key stroke makes 2 or 4 kern.sendIR at a same time.)

%p.s) my hackint0sh has a built-in remote control receiver, so i made my mind to use it instead of using keyboard(KeyboardReader) to control Front Row 2.0 (from AppleTV):

my remote control sends IR code => a dedicate ir receiver driver gets it and foward it to iRed => iRed translate it into 'sysctl -w kern.sendIR=x' => finally bholland's IRKeyboardEmu emulates the code as if it's from an Apple Remote. :)

basically, it takes two usb devices, one for 3rd party ir receiver and another for IRKeyboardEmu. Futhermore, the usb device for IRKeyboardEmu is no longer function(current limitation). i think it will be better to use a 3rd party ir receiver directly to control FR(aTV) by faking it as an apple's built-in ir receiver somehow(redesigning IRKeyboardEmu extension or so).. any ideas?

xplizid
04-10-2007, 09:19 AM
Originally Posted by dcpark
cooool!! works on my hackint0sh, except the KeyboardReader is too sensitive to control.. :rolleyes: (one key stroke makes 2 or 4 kern.sendIR at a same time.)
Originally Posted by mathdude1284
Anybody experiencing up/down arrows as volume control as well?
I am having the same issues but its only beta, it'll get better :).

diabolik
04-10-2007, 10:04 AM
i must be the only one with the keyboard workin nicely :D

Apple Pro Keyboard - Griffin Airclick USB as USB device for irkeboardemu.kext

up and down work as up and down (volume stays same)
Volume controlled by acutal sound buttons (on the keyboard)
keystrokes fire once not twice. (as the should)

hdfdisk
04-10-2007, 04:58 PM
Well...I got it work and it storke once not twice
but it's also volume up and down...

munky
04-10-2007, 06:40 PM
@dcpark: thats what i was suggesting - a kext to allow third party IR dongles to behave as apple's one.

i was considering trying a Natit-style injection approach to inject the values the apple IR module installs... but maybe a kext is the way to go, im not sure.

dcpark
04-10-2007, 07:27 PM
cooool!! works on my hackint0sh, except the KeyboardReader is too sensitive to control.. :rolleyes: (one key stroke makes 2 or 4 kern.sendIR at a same time.)

%p.s) my hackint0sh has a built-in remote control receiver, so i made my mind to use it instead of using keyboard(KeyboardReader) to control Front Row 2.0 (from AppleTV):

my remote control sends IR code => a dedicate ir receiver driver gets it and foward it to iRed => iRed translate it into 'sysctl -w kern.sendIR=x' => finally bholland's IRKeyboardEmu emulates the code as if it's from an Apple Remote. :)

basically, it takes two usb devices, one for 3rd party ir receiver and another for IRKeyboardEmu. Futhermore, the usb device for IRKeyboardEmu is no longer function(current limitation). i think it will be better to use a 3rd party ir receiver directly to control FR(aTV) by faking it as an apple's built-in ir receiver somehow(redesigning IRKeyboardEmu extension or so).. any ideas?

the above key stroke problem is caused by my old usb keyboard, not by keyboardreader... just for clarification.:p thanks again to bike and brandon!

@munky: i hope you make it, cheers! :D

mupupu
04-11-2007, 02:28 AM
working just fine for me on a CD macbook (isight as USB device). Only real complaint for me right now is having to have Keyboardreader open in a terminal window the whole time... has anyone figured out a better way of running it? is a keep-open applescript feasible?

dcpark
04-11-2007, 09:08 AM
@dcpark: thats what i was suggesting - a kext to allow third party IR dongles to behave as apple's one.

i was considering trying a Natit-style injection approach to inject the values the apple IR module installs... but maybe a kext is the way to go, im not sure.

after a little investigation, i've found the KeyboardReader can be extented to handle any HID devices, such as a remote control, joystick, and so on..

* the current KeyboardReader just focus on the usage:Keyboard(id=0x06) of usagepage:Generic Desktop Page(id=0x01), and handle button ids for the six keys on the keyboard. so, the productID and vendorID in the InitHIDNotification are not good namings for those variables, actually it should be usagePage and usage. i modified ids for usagePage(was productID) and usage(was vendorID) to be match with consumer electronics page, and also a few lines in FindHIDElements and InterruptReportCallbackFunction... now my remote control can trasmit 'sysctrl -w kern.sendIR=x' to IRKeyboardEmu.kext to emulate Apple Remote.

* imho, the routines for getting HID values & sending commands (currently the role of KeyboardReader) from 'any hid devices'(let Info.plist be editted later or so) can be merged into the same single kext, so that it can also receive HID values and transform into apples' code & report to the system (currently the role of IRKeyboardEmu.kext). then we could do away with terminal thing no more. :rolleyes: any sugesstions?

hdfdisk
04-11-2007, 01:34 PM
Keep it running is a great idea if the key isn't Space, Enter, and Up Down Left Right....
I change it to Home(as Up), End(as down), Delete(as right), Page Down(as left), Page Up(as Enter), Insert(as Space), and trying to let it run as a kext

munky
04-11-2007, 07:50 PM
dcpark: sounds like some interesting progress... keep us posted :)

i will let you know if i find the time to try the injection route, but time is very precious for me at the moment...

bholland
04-11-2007, 08:43 PM
Hey all,

Sorry I havn't been around lately. Took a small break after the last week of coding. I'm going to start working on making the kext load and work without taking over the device. I have a few ideas and I'm going to start working on it. To those having problems with volume increasing instead of aTV control, I will look into it.

Cheers,

-bholland

loc[a]lhost
04-12-2007, 02:22 PM
I've attached a command line tool that will let you do the "sysctl -w ..." thing without using sudo.
Here is how to use it:
1. Extract the zip file using the built-in tool in OS X.
2. If you extracted the zip file with any other tool, go to Terminal and type:
chmod 4711 /path/to/RemoteControl
3. In Finder, right click the extracted RemoteControl file and select Get Info.
Under Ownership & Permissions, set the owner to "system".
4. The tool is ready to use.

Usage:
RemoteControl x
where x is the number you would pass to sysctl.

If you copy/move the tool, you have to do step 2 again.

munky
04-12-2007, 07:14 PM
now my remote control can trasmit 'sysctrl -w kern.sendIR=x' to IRKeyboardEmu.kext to emulate Apple Remote.


can you post some detail about how to do this? i'd love to be able to have my third-party IR receiver + apple remote 'just work' like the real thing.

cheers

dcpark
04-13-2007, 04:39 AM
can you post some detail about how to do this? i'd love to be able to have my third-party IR receiver + apple remote 'just work' like the real thing.

cheers

munky: please refer to the attached source file, it is a slight modification of bholland's KeyboardReader(originally by bikedude808). it can get the event from a remote control as well as an usb keyboard. in order to make your remote to work, you should know the button id's(in hex value) for any six buttons of your choice in your remote control, and add those value to the InterruptReportCallbackFunction at the bottom of main.c... and that's all.

but usaully, the button id's of arrow keys on a keyboard and arrow buttons on a remote control are same, so you shoud map the other remote control buttons for navigation except arrow buttons(since they are already in use by the keyboard). in my sample codes, i mapped my remote control buttons like this:
- [Stop] button of my remote => [Menu] button of Apple Remote.
- [Play] button of my remote => [Play] button of Apple Remote.
- [Skip Fwd(Next)] button of my remote => [Right] button of Apple Remote.
- [F.Rewind] button of my remote => [Left] button of Apple Remote.
- [F.Foward] button of my remote => [Minus/Down] button of Apple Remote.
- [Pause] button of my remote => [Plus/Up] button of Apple Remote.

i know it is somewhat weird mappings, but this layout is fit for my own remote control.:D and any kind of remote control has those buttons in common values, first of all, you can test your remote control's stop, pause, play, etc.. and see what happens. or you can use your own button id's for that.

fyi: comments 'Jungfrau' in the source code refers my own remote control(built-in on my system). actually 'Jungfrau' is the code-name of our project TVPC (you can see the review for it at http://www.notegear.com/Content/Content_Read.asp?TNum=533&kind=2 , if you can read korean. :rolleyes: )

tip: you can use hclient(in WinDDK) to get your remote control buttons' id on windows. in fact, i'm a newcomer on the mac os.. don't know which tools are good for investigate hid devices.. maybe 'hid explorer' at ADC is good enough on mac os..:confused: when i'm accustomed to develop on mac os environment, will go further.. :p

best regards,
david

dcpark
04-13-2007, 05:46 AM
lhost;4956']I've attached a command line tool that will let you do the "sysctl -w ..." thing without using sudo.
Here is how to use it:
1. Extract the zip file using the built-in tool in OS X.
2. If you extracted the zip file with any other tool, go to Terminal and type:
chmod 4711 /path/to/RemoteControl
3. In Finder, right click the extracted RemoteControl file and select Get Info.
Under Ownership & Permissions, set the owner to "system".
4. The tool is ready to use.

Usage:
RemoteControl x
where x is the number you would pass to sysctl.

If you copy/move the tool, you have to do step 2 again.

loc[a]lhost: great! how can you get the system call (sysctl -w..) to work as a standard user auth. (not using sudo)? thanks!

prasys
04-13-2007, 09:14 AM
I am trying to get it to work with Sailing Clicker !

munky
04-13-2007, 01:27 PM
DCPark: You, sir, are a gentleman and a scholar. Thank you very much!!

I will try this out if I can find a little time to spare ;)

Thx again

diabolik
04-13-2007, 03:28 PM
alright! i got aTV control with a Griffin AirclickUSB remote:

bholland's irkeyboardemu.kext + loc[a]lhost's RemoteControl.app + custom applescripts for Griffin's airclick.app

all together = remote for hackint0shTV for about $25

bholland
04-13-2007, 09:42 PM
Yo,

Congrats diabolik! Glad to hear its working well for you!

For those still having problems with the kext adjusting the volume while controlling, or adjusting the volume but not controlling, try removing rcd.app from /System/Library/CoreServices/rcd.app. This will stop osx from accepting any remote commands. This might give the ability to control aTV to those who can't and it most definitely will stop the annoying volume up and down every time you press up or down in aTV. Let me know if this works for you.

Peace,

-bholland

netkas
04-13-2007, 10:57 PM
ia there any kext, which doesn't block usb device ?

archaos
04-13-2007, 11:10 PM
Do you think guy is there a way for your scripts to work with remote buddy ?

This is the last step i need to get back row working on my mac mini ... because then i will be able to switch btw eyetv also !

Thanks for your help,

archaos

SaberSHO
04-13-2007, 11:57 PM
netkas- bholland mentions in the readme and somewhere in this thread that he is working on making the kext not steal all control of the usb device it is ascociated with....so im sure its just a matter of time.

Luis Morales
04-14-2007, 02:36 AM
hEY first of all great job but im stuck on something

7) Add the following line to the rc file:
kextload /System/Library/Extensions/IRKeyboardEmu.kext

Can please someone tell me how to do this im stuck here and im a bit of a newbie where is this file and in wich part of it should i add the line

Thanks guys and sorry for my clumsy english.

waiting10
04-14-2007, 06:48 AM
IREmulator + RemoteControl with Bluetooth dongle + Wiimote + RemoteBuddy.

It's a cool combination for ATV and worked Perfect except volume Control. Bluetooth connection reaches a lot wider than IR. And wiimote is more compotable than tiny apple remote.

Remotebuddy fully supports Wiimote. So you can Using applescript with Remotebuddy, made ATV actions and assign them to wiimote. I made 6 actions (Play, Menu, +-. left,Right).

All my applescript is below
-- do shell command "/path/RemoteControl X"
(X is 0 to 5)
That's all.

Thanks guys.

aed0101
04-14-2007, 11:51 AM
IR Emulator is working fine for me. But after leaving ATV app to play 3-4 songs the application can not be controlled anymore. Anybody has the same problem?

aed0101
04-14-2007, 11:59 AM
hEY first of all great job but im stuck on something

7) Add the following line to the rc file:
kextload /System/Library/Extensions/IRKeyboardEmu.kext

Can please someone tell me how to do this im stuck here and im a bit of a newbie where is this file and in wich part of it should i add the line

Thanks guys and sorry for my clumsy english.

Terminal --> defaults write com.apple.finder AppleShowAllFiles TRUE --> killall Finder

This will make Finder to show hidden files and folders. The rc file is in one of the folders that were previously hidden on your OSX drive. Add the line kextload /System/Library/Extensions/IRKeyboardEmu.kext and reboot.

CycloneFr
04-14-2007, 01:14 PM
working nice, i just hope we can port the key emulation to a usb dongle :) would be huge

hdfdisk
04-14-2007, 05:57 PM
that because you should re-sudo again(only sometimes)

kalbaba
04-14-2007, 06:24 PM
IREmulator + RemoteControl with Bluetooth dongle + Wiimote + RemoteBuddy.

It's a cool combination for ATV and worked Perfect except volume Control. Bluetooth connection reaches a lot wider than IR. And wiimote is more compotable than tiny apple remote.

Remotebuddy fully supports Wiimote. So you can Using applescript with Remotebuddy, made ATV actions and assign them to wiimote. I made 6 actions (Play, Menu, +-. left,Right).

All my applescript is below
-- do shell command "/path/RemoteControl X"
(X is 0 to 5)
That's all.

Thanks guys.

Could you please export your scripted behavior and post it here; I tried doing as you said, but it won't work with my wiimote. Thanks a lot man.

archaos
04-14-2007, 06:40 PM
Please, could someone explains to me how to use remote buddy to control back row ?

thanks

loc[a]lhost
04-14-2007, 09:32 PM
loc[a]lhost: great! how can you get the system call (sysctl -w..) to work as a standard user auth. (not using sudo)? thanks!
By setting the SUID bit (the "4" in the "chmod 4711 ..." command) for the file.
This makes the tool always run as it's owner, which should be root.

waiting10
04-14-2007, 10:56 PM
Could you please export your scripted behavior and post it here; I tried doing as you said, but it won't work with my wiimote. Thanks a lot man.

This is my remotebuddy action pack.

You have to change RemoteControl's path in the applescript.
Firt import action script in Remote buddy and you can see 6 actions.
you have to change RemoteControl path each of them in the applescript section.

Then you can assign those action to frontrow's menubutton.

kalbaba
04-15-2007, 01:43 AM
Thanks a lot, it works awesomely!

diabolik
04-15-2007, 02:40 AM
to set applescripting to RemoteControl (i put mine in root : /RemoteControl)

so my applescrits is as follows :

do shell script "/RemoteControl X" (X=1-5 depending on your call)

i used the griffin airclickUSB as my remote so i just modified the airclick.app's FrontRow Scripts (fr_XXXX.script) XXXX being the action of the script

if anyone who has an airclickUSB and would like my scripts just ask.

timmyj9
04-15-2007, 05:14 AM
mine works but is way to sensitive, I'm using Logitech G15 Keyboard is there a way i can make it not so sensitive, i press down once and it goes all the way down to the bottom of the list

netkas
04-16-2007, 11:18 PM
eh...hey...stop flooding

non-locking usb device kext ready ?

holt.justin
04-22-2007, 08:40 AM
If anyone can help thats great, but I have a slight issue. I can get the kext to load fine and everything but when i actually go to use front row I get to the itunes code thing and can't get past. Any help would be appreciated.

Justin

SaberSHO
04-22-2007, 09:20 AM
Holt.Justin- Thats not a problem with the kext, you need to sync it to an itunes library before you can use it....either an iTunes library on your network, or use the BRWindowRenderer Hack + resolution changes (set your rez to a 640x480 before launching frontrow) to sync it to your local iTunes....

holt.justin
04-22-2007, 10:12 AM
Just wondering, it is something I did, I got most of everything to work. I got the "aTV" recognized by my iTunes, but now, I can't control it. Do I let it "Sync" because when i have itunes and the aTV open at the same time, a that little circle that shows activity comes up next to movies, and I can't navagate around at all. Is there something I screwed up?

Justin

SaberSHO
04-22-2007, 09:51 PM
Well, you have to make sure that the kext is loaded properly and that you are running the other app included int he package, the keyboard reader. (you can also use the app posted earlier in this thread, remotecontrol).

holt.justin
04-22-2007, 10:49 PM
@SaberSHO
I tried that RemoteControl and I saw no difference. Here is the output from the RemoteControl:
justin-holts-computer:~/Desktop root# ./RemoteControl 2
2sysctl -w kern.sendIR=2
kern.sendIR: 0
sysctl: kern.sendIR: Operation not permitted

I have the kext tied to my HP PSC 1315 Printer because I tried my mouse and keyboard and it threw errorss at me. I have a Saitek Eclipse II Gaming Keyboard and a Logitech MX518 Mouse, If that is of any help.

Justin

SaberSHO
04-22-2007, 11:58 PM
try to sudo the command? i think maybe its a permissions problem...so
sudo ./remotecontrol 2


not sure tho

bholland
04-23-2007, 09:08 PM
You can't match IRKeyboardEmu to your printer because it is not an HID device. It must be matched to an HID Device such as a mouse, keyboard, or joystick.

Cheers,

-bholland

bholland
04-24-2007, 01:31 AM
Good news everyone! I got IRKeyboardEmu to load without the need of a usb device and OS X responds to it! Now it just automatically loads. No Product ID, Vendor ID, usb device matching garbage. It loads and just works! It should be on my site shortly.

http://brandon-holland.com/irkeyboardemu.html

It will be listed as version 0.2. Thanks goes to all my testers:

-SaberSHO
-bikedude880
-XianLi
-PascalW
-and anyone else I missed.

The only thing left to do is develop a preference pane for keymapping and enable / disabling of the kext. Cheers,

-bholland

dcpark
04-24-2007, 12:01 PM
Good news everyone! I got IRKeyboardEmu to load without the need of a usb device and OS X responds to it! Now it just automatically loads. No Product ID, Vendor ID, usb device matching garbage. It loads and just works! It should be on my site shortly.

http://brandon-holland.com/irkeyboardemu.html

It will be listed as version 0.2. Thanks goes to all my testers:

-SaberSHO
-bikedude880
-XianLi
-PascalW
-and anyone else I missed.

The only thing left to do is develop a preference pane for keymapping and enable / disabling of the kext. Cheers,

-bholland

great work bholland!

@ for those who have trouble with installation/uninstallation, i've made an simple
Apple TV Front Row Launcher, called 'Start aTV.app'. and it also has the screen
resolution correction, enjoy your aTV Front Row with your full screen resolution!

* to install 'Start aTV' on your desktop: run 'sudo ./Install.sh' at a terminal
(run 'sudo ./Uninstall.sh' at a terminal for complete uninstallation)

it utilize bholland's IRKeyboardEmu v0.2 magic:cool: , and you also can immediately
quit Front Row & stop emulation by just pressing "ESC".

see http://forum.insanelymac.com/index.php?showtopic=49328 for detailed description of how it works.

* tip: you can adjust the delay for resolution-rollback (default: 4 seconds)
by editting '~/Desktop/Start aTV.app/Contents/MacOS/Start aTV' script.

credit goes to bholland and bikedude808 for AppleIREmulator, thanks!

--
best regards,
David

aed0101
04-25-2007, 12:44 AM
I decided to upload apple scripts to control atv with Apple Remote + Manta TR1 + Mira. Just in case, if somebody needs it. You´ll need loc[a]lhost´s RemoteControl app installed on your /. Then just change Front Row key preferences to use these scripts. Works like magic. Thanks alot bholland and loc[a]lhost.

bholland
04-25-2007, 04:43 AM
Hey all!

Development of the preference pane is under way. Here's a current screenshot so you can see what its going to look like and do.

http://brandon-holland.com/images/misc/irkeyboardemu-ppane.png

It should be done soon! I'll have to rewrite some portions of keyboardReader so that is configurable via a config file or something of the sort so that it can load the key mappings the preference pane creates. Will post as development continues.

-bholland

mathdude1284
04-25-2007, 06:03 AM
Great news! Thanks for all you work...

munky
04-25-2007, 03:48 PM
aed0101: thank you for the mira scripts - thats what i'll be using :)

kramer2k
04-26-2007, 01:08 AM
Aed0101: This thing rocks!

But not sure if this query goes to you or bholland...
When running aTV using 0.2, if I click up or down once, it registers it as many (2-5). If I tap it really fast, sometimes I can get 1, but most often 2.

Anyone else with this same issue?
K

DaveGee
04-28-2007, 01:01 AM
Any clues as to why I'd be getting this when trying to run KeyboardReader?

IREmu: Sending IR Play Command
second level name sendIR in kern.sendIR is invalid
IREmu: Sending IR Volume Down Command
second level name sendIR in kern.sendIR is invalid
IREmu: Sending IR Volume Down Command
second level name sendIR in kern.sendIR is invalid
IREmu: Sending IR Volume Down Command
Password:

P.S. The keyboard has no effect when I run FrontRow2

Oh and the kext is loaded

% kextstat | grep IRKeyboardEmu

93 0 0x3d130000 0x2000 0x1000 com.bholland.driver.IRKeyboardEmu (1.0) <34 20 11 2>


Dave

bholland
04-28-2007, 01:29 AM
What version are you using? 0.1 or 0.2? 0.1 requires an HID USB Device to match to. It will load, but won't work unless there is.

I would recommend upgrading to 0.2 because it does not require a usb device to match to. Just delete the old version and copy it to /System/Library/Extensions/, then reboot and it should all work. You can download 0.2 here:

http://brandon-holland.com/irkeyboardemu.html

Hope that fixes your problem.

-bholland

mmm43
04-28-2007, 04:12 AM
A small thing: If you delete all folders named "build" before compressing and uploading the source code, version 0.2 is only 36kb large instead of >1mb. These folders are created by Xcode as part of the build process and are not necessary.

CycloneFr
04-28-2007, 12:02 PM
waiting for the version with the control panel:p

DaveGee
04-28-2007, 04:22 PM
What version are you using? 0.1 or 0.2? 0.1 requires an HID USB Device to match to. It will load, but won't work unless there is.

I would recommend upgrading to 0.2 because it does not require a usb device to match to. Just delete the old version and copy it to /System/Library/Extensions/, then reboot and it should all work. You can download 0.2 here:

http://brandon-holland.com/irkeyboardemu.html

Hope that fixes your problem.

-bholland

Well I am using .2 (just tried this for the 1st time yesterday) so I never had anything other that v0.2... I dunno maybe I should try and reboot again but since I'm knee-deep in the middle of transcoding stuff to h.264 I'll have to hold that off till Monday (at the earliest).

Oh the pains we go thru for having immediate access to our movie collections. :lol:

I've got three machines running different sets of tv-series and/or movie conversions in batch mode... I wrote my own script to make things as hands off as possible. Chugging along very well... but its filling my 400 GB drives like gangbusters.

Dave

CycloneFr
05-01-2007, 02:58 PM
dunno why but IrRemoteEmulator 0.2 doesnt work on my sony vaio :(
ctrl + ESC doesnt run FRontrow, meanwhile running the irkeyboard terminal application works and can control sound volume....

kramer2k
05-01-2007, 08:40 PM
Any chance of being able to change the sensitivity of VirtualIRCommand to accept one click instead of 50 when holding it?

dcpark
05-02-2007, 04:29 PM
Any chance of being able to change the sensitivity of VirtualIRCommand to accept one click instead of 50 when holding it?

@kramer2k: the keyboard reader(VirtualIRCommand) is get invoked every time it receives a make/break-code from a usb-hid keyboard and pass exactly one command per a make/break-code. therefore, the sensitivity problem is caused by the keyboard you are using, in fact. i think your keyboard generate too many make/break-code when holding on a button for a while. accoding to my experience, i have the same problem with yours, so i changed my usb keyboard to another one and it's ok now. :)
you have only a few options for this issue, i think:
- hardware solution: change your keyboad (the best solution but needs cost. :( )
or, modify firmware inside your keyboard (only the keyboard vendor can do it??)
- software solution: tune the keyboard reader to fit with your keyboard (by dropping out some make/break-codes or so). but it cannot be as much accurate as you want. so it is not a solution but a workaround for this issue and
may have another side effects...

thanks,
david

dcpark
05-02-2007, 05:10 PM
dunno why but IrRemoteEmulator 0.2 doesnt work on my sony vaio :(
ctrl + ESC doesnt run FRontrow, meanwhile running the irkeyboard terminal application works and can control sound volume....

imho, the emulator works well on your system since it can control sound volume with your keyboard up/down anyhow. i think, your aTV Front Row itself may have any problem, or...

can you launch aTV Front Row direclty in a terminal, by running:
/System/Library/CoreServices/Front\ Row.app/Contents/MacOS/Front\ Row

- if yes: your Front Row works fine. and the problem lies on another cause (e.g.: simply ctrl+ESC wasn't mapped to Front Row?? :o ), i don't know. :confused:
- if no: might missed some important parts for your Front Row to work well. as far as i know,
Front Row checks physical Apple IR Controller, but it can be completely mimicked by FrontRowPass.kext or IRKeyboardEmu.kext.. so, if you installed IRKeyboardEmu v0.2 properly, it is surely enough to pass Apple IR Controller check by Front Row. then... what else missing?
Front Row also requires /private/etc/mach_init_per_user.d/RemoteUI.plist to run...
deserves to be checked. good luck! :)

best regards,
david

CycloneFr
05-02-2007, 08:36 PM
thanx worked reinstalling FR 1.3 from apple :)

bholland
05-04-2007, 01:12 PM
Hey Everyone!

I'd like to introduce my final (probably :) ) release of IRKeyboardEmu. Version 0.3 is comes in a DMG disk image and is packaged as an installer. The installer will install the following:

-IRKeyboardEmu.kext:
The actual kernel extension that makes the magic happen.

-Remote Emulation Preference Pane:
The all new preference pane which can load and unload the kext, stop and start the daemon (IREmuHelper), and setup keymapping.

-IREmuHelper:
Keymapping daemon which loads the keymaps setup by the preference pane and maps keys to apple remote events via the kext.

After installing, reboot. After the reboot the kext and daemon should autoload by default. That can be changed with the preference pane. The preference pane should come up in System Preferences as "Remote Emulation" under the Other category. After modifying any keymaps or autload settings you should restart the daemon for changes to take effect. This can be done by stopping and starting the IREmu Daemon.

Well another version, another 2 weeks! lol. It's been a learning experience as I wasn't very familiar with cocoa. Hope you guys like it! Get at it here:

http://www.brandon-holland.com/irkeyboardemu.html

Donations are always welcome ;)

Cheers,

-bholland

CycloneFr
05-04-2007, 06:14 PM
for me i cant set the page up and down key
so when i press left and right cursor it moves twice !! same thing for my remote usb control that works using page up and down control :( can u fix it? seems like cursor control are automatically applyed.

edit : im using Frontrow 1.3

bholland
05-05-2007, 01:01 AM
Frontrow 1.3 will close if it detects any key presses on the keyboard that don't control it. So even though IRKeyboardEmu can control it via remote commands, its still listening to the keyboard as well which tells it to bail. One way you could fix it is have IREmuHelper open the device in exclusive mode so that no other programs can listen to the device but IREmuHelper. That way Frontrow won't hear any keyboard events, only the remote events that IRKeyboardEmu is sending. If you want me too, I can add a check box in the PPane to enable exclusive mode on the daemon. I'll see what I can do. I'll repost in a few days on my progress.

bholland

bholland
05-05-2007, 10:22 AM
Hey hey!

Exclusive mode has been added to the package. You will find it in the Preference Pane under the "IREmu Daemon". If checked, it runs the daemon in exclusive mode which will listen for the proper events and block everything else. That way you can run FrontRow 1.3 and control it without getting double presses or exiting problems. I've updated the package in the usual place:

http://brandon-holland.com/irkeyboardemu.html

I've updated the source as well. A few things to expect in 0.4 is the remote on the left hand side of the Preference Pane will be clickable to set the mapping. Makes it a little more functional and just down right cool! I also want to add a device combo box for selecting a specific HID Device to read from instead all of them. That way exclusive mode won't lock out the keyboard.

Give the package a good test and let me know how it works! Let me know of any bugs. And let me know of any functions that you would like to see in it. Cheers,

bholland

arthuar16
05-14-2007, 11:10 AM
First of all thanks a lot @bholland for your awesome job (IRemulator uid de faboulous GUI Menu) :cool: , then I must report my experience with that one.
Everythng works out of the box excepts the keyboard key for up and down.
I try to explaiwhat I mean; even with differents keyconfig , when I selected keys for using up and down in the menu , my MakAcerBook (5612wlmi on 10.4.9hackint0sh) change-moves the speakers volume up and down , independetly from the key taken.
I had given a go for exclusive mode too ,but no way..any suggestions??

Thanks again Bholland :D

bholland
05-14-2007, 08:41 PM
Hey arthuar16,

OS X responds to all remote events. The only thing exclusive mode does is makes it so the keyboard cannot interact with anything other than IRKeyboardEmu. That way it can be used with frontrow 1.3. If you want the up and down keys to stop changing the volume, remove /System/Library/CoreServices/rcd.app. (Make sure to backup it up in a different location so you can recover it if you wish. rcd.app is what is what is responding to the remote events sent by the driver. Removing it will make osx stop listening to them. Cheers,

-bholland

Brandon M. Holland
http://brandon-holland.com

Cyman
05-14-2007, 09:50 PM
Hello bholland. I am using a MBP (C2D) and installed your Virtual IR app together with dcpark's Start aTV app. Anyway, since it is a real Mac I am working with, I have my Apple Remote. First I had to needed to get it to work again, since after installing your Virtual IR app it wouldn't work anymore. Now it works again but every time I hit the up and down arrow keys the volume goes up and down and I don't know how to get rid of this. I also posted several times on this over at InsanelyMac (http://forum.insanelymac.com/index.php?showtopic=49328&st=0&gopid=365360&#entry365360) where one suggested to delete the (System/Library/CoreServices/) rcd.app. Is this a safe step? It looks like a system file to me.
For the rest I would like to know how to get dcpark's solution to work under the native screen resolution of my MBP, because I just don't get it how it's properly done. When you open start aTV under View Package Content /Contents/MacOS/ it looks very crypted to me - I can't figure what has to be done (I already changed the rollback value from 4 to 10s, anyway it doesn't change anything).
I would really appreciate any help. Thx!

bholland
05-14-2007, 10:43 PM
Cyman,

Removing rcd.app will just make the os stop responding to remote events, like controlling iTunes, volume up, volume down, and system sleep, ect. Removing it is more of a solution for hackTV setups so that you can control the UI without the annoying volume up and volume down. Removing it won't hurt anything or make the os cease to function properly, It will just make it stop responding the remote events sent by the driver. Cheers,

-bholland

Brandon M. Holland
http://brandon-holland.com

Krazubu
05-15-2007, 01:25 PM
Hi, I'm both happy and sad to annouce this, but a company already made what Bholland tries to, the app is called Remote Buddy and is able to emulate an apple remote with any control device.
It's located here http://www.iospirit.com/index.php?mode=view&obj_type=infogroup&obj_id=24&o_infogroup_objcode=infogroup-23&sid=3667707Ga78cdcaa53fb4566, or on the green demon.

Tested and working WITH CLASSIC FRONT ROW, dunno for backrow

arthuar16
05-15-2007, 04:17 PM
@bholland , your solution left my hackintosh with no keyboard use , even after made the rcd.app backup...but i'm not crying , I have to renstall just to test uphunk installdvd 10.4.9

@Krabuzu very cute app you mentioned Remote Buddy, installed and trying but on the partition without bholland IRemu I am not able to use the keyboard to get use the menu and the app at all...

CycloneFr
05-15-2007, 09:01 PM
bholland did u fix the security key problem so i can use it?

bholland
05-15-2007, 10:12 PM
Can anyone else report that Remote Buddy works with the hacked aTV finder? I gave it a try and they have a kernel extension that it says is for virtual remote support, but I can't get it to work with the aTV Finder. Interesting fact, Remote Buddy seems to use the powerpc version of frontrow. But yeah someone else please give remote buddy a go and see if you can get it to emulate a virtual remote with aTV ect. Thanks,

CycloneFr,

I am going to port the ppane to the DDHidLib framework which will make it much easier to set combo keys and holds. This will also enable you to select which HID device you want to use as the listener. That way it won't kill your keyboard. I'll be working on it the next couple of days.
Cheers,

-bholland

arthuar16
05-16-2007, 09:25 AM
please Let me understand a little bit more..Remote Buddy don't make anything about creates a virtual remote support on non native one , right??
In my fool mind it suppose work in case like "bholland irkeyboard+Remote Buddy itself" way..if I'm wrong give a small help to a poor guy like me!!!:( :( :(

EDIT: just tried RB but it doesn work for me.

aed0101
05-16-2007, 08:53 PM
In order to use Remote Buddy you´ll need to have supported hardware. Then you´ll need loc[a]lhost´s RemoteControl app installed. Then make Apple scrypt commands as custom action for each remote key. I don´t see any reason why it would not work. It works with Twisted Melon´s Mira, so it should work with RB as well, but supported hardware is a must.

munky
05-18-2007, 12:25 AM
the link to localhost's app doesnt seem to work.

can anyone share it? i need it! :)

JaS
05-18-2007, 05:59 PM
Localhost's Remotecontrol is just a renamed bikeddude880's irkeyboardemu binay.

shit
05-19-2007, 03:55 AM
Remote Buddy's Apple Remote emulation here works fine on my G5 with version 15 b of remote buddy. i do not have irkeyboardemu installed. maybe that's cause the problem for you.

btw, i figure you don't need any hardware for it. you can control it by keyboard if you map hotkey remote to the buttons of virtual remote. found instructions on how to configure this on remote buddy website here:

http://www.iospirit.com/index.php?mode=view&obj_type=infogroup&obj_id=24&o_infogroup_objcode=infogroup-23&o1_infogroup_objcode=html-139&sid=3681060Ga31ee8b225042827

i did what was in "use remote buddy solely as a driver", but for the hotkey remote.

have not tried on my apple tv, yet, though, but should work i guess.

loc[a]lhost
05-22-2007, 10:00 AM
Localhost's Remotecontrol is just a renamed bikeddude880's irkeyboardemu binay.

Never knew about that binary, I made RemoteControl from scratch.

munky
05-22-2007, 11:03 PM
@shit: interesting stuff. i wonder if i can setup mira to emulate keypresses, and get remotebuddy to virtualise the remote? bit of a mad chained solution, but if it works.... ;)

shit
05-23-2007, 01:08 PM
@munky:

crazy setup idea! ;-) but mira, what for? it will just lock on virtual remote and it make unusable the virtual remote for backrow & stuff. i had look at mira, but trahsed it: configuration = super bad, functionality = super buggy, all it do is map apple remote to key presses - and even there buggy!! just look at mira forum :-(( mira cost most of all tools i seen but can do least - sad but true.

munky
05-24-2007, 10:17 PM
mira because i already bought it and the manta receiver, which doesnt work with remotebuddy.

kramer2k
06-02-2007, 11:41 PM
Ok, strange thing just started happening after updating to 10.4.9 with 10.4.8 kernel...

Anytime that I try to click on Remote Emu in pref pane, I get the GSOD (gray screen of death), i.e. a kernel panic.

I've been scowering my console.app looking for what's going on, but I havne't been able to find anything. Can anyone...

1) Direct me to where in console I can find out what's going on?

B) Help me figure out why this is happening?

3) Let me know if you've experinced anything similar?

bholland
06-03-2007, 09:12 PM
kramer2k:
No I have not experienced anything simular. I am currently running it with the 10.4.9 kernel. Try re-installing the package (irkeyboademu) maybe. Sorry I don't have a better answer for you it just hasn't come up yet.

Cheers,

-bholland

CycloneFr
06-04-2007, 10:38 AM
bholland news for the iremu ? i mean any trick about the password chain and key pressed twice? thanx again!

kramer2k
06-04-2007, 06:06 PM
bholland:
So it seems as if my problem was a kernel issue. I was using ND-23 (10.4.8 final) and would get KP and also could not enable HT. Upgraded to universal 10.4.9 kernel and now prefpane works as does HT!

bholland
06-05-2007, 05:30 AM
kramer2k: Good to hear that its working!

CycloneFr: Sorry no I havn't had any time to work on it. I've started work at a summer camp doing the video editing so I won't have much time or internet (lol) to work on it. I will do my best and see if I can find a few minutes in the evenings to fix that for you. By the way, if anyone knows of a programming job in Northern BC let me know cause I'll be looking for work in a few months.

Cheers,

-bholland

CycloneFr
06-27-2007, 07:53 PM
still nothing new bholland?

Maraklov
07-31-2007, 08:13 AM
hey bholland, since Turbo released his kext enabler for ATV, i can use IRKeyboardEmu finally but it's limited to a USB keyboard. any chance you could update it to support 'virtual' inputs like VNC, and peripherals that can be mapped to keyboard commands (like my wiimote that works now with a bluetooth dongle).

if i had any coding experience, i'd give it a try myself since you've been very generous to provide the source. this is certainly something i'd definitely donate $$ for.

bholland
08-09-2007, 07:58 AM
Hey Maraklov,

The IRKeyboardEmu package will read from any HID device connected to the system. If you want to make it respond to "virtual inputs", ect, all you have to do is write a listener and have it run the command "sysctl -w kern.sendIR=x" where x is a number from 0-5 corresponding to the remote button. Shouldn't be that hard to code. Look for a C / Objective C tutorial and you'll be on your way. I don't have much time right now or I would do it for you. Good luck. Everyone else, I hope to release a new version soon with some fixes provided by another user and hopefully better IREmuHelper app for reading devices such as keyboard, remotes, ect. And if I get to it, button holds, and I will be adding the fix for the exclusive mode people. Not making any promises, but I'll see what I can do. Thanks.

bholland

BrumBrum74
08-17-2007, 05:41 PM
I've followed this topic and guide and can get AppleTV to run fine and navigate in menues etc. but I cannot change the volume. Have tried to deactivate one of the two options in the remote emulator, but it doesn't help.

Anybody have success adjusting volume without using a remote, and if yes, how did you do it?

folka
08-19-2007, 05:57 PM
As I recall u can't change volume on the original ATV. So u can't change it with the ATV software on a MAC. U are supposed to change the volume on your tv.

CycloneFr
08-20-2007, 01:54 AM
bholland what about the fix uve promissed me? it's been 2 months :( i hope u can fix the problem thanx pal (to avoid twice key pressed)

exodus_xt
09-10-2007, 07:39 PM
my keypressing are repeating WAY too fast... I thought a fix is being made... this thread seemed to have gone dead

Former Bender
09-25-2007, 12:30 PM
The new version of Sofa Control has a Virtual Remote Control built in.

Virtual Remote Control

Sofa Control provides keyboard shortcuts to simulate a Remote Control. These keyboard shortcuts can be used to control and use Sofa Control with programmable devices.

The virtual remote control is turned off by default. You have to enable it by activating the option Virtual Remote Control in the advanced settings pane in Sofa Controls preferences.

On the next start of Sofa Control the following keyboard shortcuts can be used to control Sofa Control.

http://www.caseapps.com/sofacontrol-help.html#keyboardvirtualremote

Anybody here with a Hackintosh could give a try and report if it's working or not ?

tubescrape
05-02-2008, 01:47 AM
thats great

-jeff
http://www.tubescrape.com (nsfw)

clint999
05-03-2008, 12:47 PM
This is actually a software that transform key code from your keyboard to Apple Remote, so you can control AppleTV Finder.app on Macpro and Hackintosh.