Hello, what if I replace the fprintf with syscall? Or gcc would still bork the code?
Anyway, I'd be delighted if you get the system(3) thing to work. Or come up with some other way to pass that keycode, it might be usable in some other places too..
USB IR device
Re: USB IR device
Thanks to sbav1 (for the system(3) part) now I have successfully controlled my amp volume with TV's remote. It is not yet very responsive, but it is a start. Next I'll try to drop the system(3) call and use direct library call.
Re: USB IR device
Well, it turns out it's not so easy after all. I tried to load the needed .so library just before pvr.so in the loader.c, but that only caused exeDSP to dump core. I tried to load with RTLD_GLOBAL and RTLD_NODELETE flags. With RTLD_LOCAL it didn't crash but the modified pvr.so (which tries to use those functions presented in the other .so) couldn't be loaded and it complained about undefined symbol.
Re: USB IR device
I think separate external daemon process linked with iguana/lirc libraries may be better solution, you can send captured keycodes to it by IPC message queue or TCP/IP socket.nbd wrote:Well, it turns out it's not so easy after all. I tried to load the needed .so library just before pvr.so in the loader.c, but that only caused exeDSP to dump core. I tried to load with RTLD_GLOBAL and RTLD_NODELETE flags. With RTLD_LOCAL it didn't crash but the modified pvr.so (which tries to use those functions presented in the other .so) couldn't be loaded and it complained about undefined symbol.
Re: USB IR device
Yes, that has crossed my mind, but I lack the skills to do that (I think I could cook something up, but it's going to be a long road of trial/error). Do you know btw, is it possible to detect that the key is being held down? Is there some internal variable maybe that indicates that? Also the key release should be detected.
I see exeDSP has functions like:
_ZN10CViewerApp20t_ProcessKeyReleasedEPK7PTEvent
_ZN9KeyCommon19SendKeyReleaseInputEi (<-- I think this is the relevant one)
If I could utilize the key release, then I could use lirc (it can repeat the IR command until release event occurs)
Currently I don't use lirc, because I'm able to communicate with the iguana device through its own client/daemon mechanism. I have asked the iguana developers if they could assist me on building a simple prog just to send IR signals by communicating directly to the device. Currently the daemon listens to one socket where clients send their commads. (Which brings us back to the point of trying to communicate with sockets...)
I see exeDSP has functions like:
_ZN10CViewerApp20t_ProcessKeyReleasedEPK7PTEvent
_ZN9KeyCommon19SendKeyReleaseInputEi (<-- I think this is the relevant one)
If I could utilize the key release, then I could use lirc (it can repeat the IR command until release event occurs)
Currently I don't use lirc, because I'm able to communicate with the iguana device through its own client/daemon mechanism. I have asked the iguana developers if they could assist me on building a simple prog just to send IR signals by communicating directly to the device. Currently the daemon listens to one socket where clients send their commads. (Which brings us back to the point of trying to communicate with sockets...)
Re: USB IR device
Maybe I will not help you much, but I wanted to tell you, that you are absolutely right! This function is called every time a remote control button is released. I am going to use it in Atari800 emulator (port) release 2. Thanks.nbd wrote:_ZN9KeyCommon19SendKeyReleaseInputEi (<-- I think this is the relevant one)
Re: USB IR device
Actually you did! By using your code from the atari port, I can utilize the key release. Gotta try someday..Maybe I will not help you much