Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#174745 - 11/08/2003 14:22 Binding Programs/Scripts to buttons, possible?
tsaavik
new poster

Registered: 11/08/2003
Posts: 4
Loc: San Diego, CA
How would i go about binding a button (say a button on my sony wired remote) to launch a script (such as ttsclock)?

I'm running the dev+hijack kernel, i just don't see a clear way to do this. Is there more documention for hijack somewhere? The FAQ is nice but seems to lack alot of technical details.

I searched hi and low, but all the posts talk about using ;@EXEC and that isn't really what i'm looking for, unless someone has a program that can monitor buttons and "steal" them from the player software?

---Confused

Top
#174746 - 11/08/2003 15:03 Re: Binding Programs/Scripts to buttons, possible? [Re: tsaavik]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
So you want to press a button on your remote and have it launch a specific third-party app?

I don't think anyone's done that. Perhaps it's something that can be added to Hijack. Mark?
_________________________
Tony Fabris

Top
#174747 - 11/08/2003 15:33 Re: Binding Programs/Scripts to buttons, possible? [Re: tfabris]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Launch an app, let it bind to the button(s) of interest, and then it can pop itself onto the display whenever such button(s) is pressed.

It's there. And, yes, we know there's a better way -- not implemented yet.

Cheers

Top
#174748 - 11/08/2003 15:38 Re: Binding Programs/Scripts to buttons, possible? [Re: mlord]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
In other words, it must be coded into the app itself. Gotcha.

So Tsaavik, you need to see if that feature already exists in TTSclock, and request it if it's not.
_________________________
Tony Fabris

Top
#174749 - 12/08/2003 08:35 Re: Binding Programs/Scripts to buttons, possible? [Re: tfabris]
tsaavik
new poster

Registered: 11/08/2003
Posts: 4
Loc: San Diego, CA
Okay, that sounds reasonable. Maybe i can rip some code outta another app and make it work. I'll try to write it as a wrapper to ttsclock that way it can be used for other stuff. Can anyone recommend an app that has good source & licensing that would allow me to pick bits out and re-arrange them?

I imagine the tetris/pacman type games would work (gonna have to brush up on my C) wish someone had an app in perl, but thats prob not very likely

UPDATE: Just looked thru the viewer.c source by Jogn Heathco, looks pretty dang cool, i'm gonna have to read thru hijack.h

New question, can i bind a button with the app while hijack is running, or do i need to get out of hijack first?

John goes:
rc = ioctl( fd, EMPEG_HIJACK_WAITMENU, menu ); // Wait for menu..

Then when that works...

rc = ioctl( fd, EMPEG_HIJACK_BINDBUTTONS, buttons ); // Bind buttons
rc = ioctl( fd, EMPEG_HIJACK_SETGEOM, &fullscreen ); // Grab screen

Can i do the bind, then wait for my button to be pressed and do the screen grab? Or will the bind break hijack?


Edited by tsaavik (12/08/2003 08:57)

Top
#174750 - 27/08/2003 06:35 Re: Binding Programs/Scripts to buttons, possible? [Re: tsaavik]
Rafy
new poster

Registered: 06/03/2002
Posts: 39
Loc: Mississauga, Ontario, Canada
any luck ? I'll give this a little bump for I think Program/Script Button Binding functionality is a MUST HAVE on the empeg...

can't wait to be able to press a button on the controler to play some wav file out of the blue ...
_________________________
blue 2 X 30GB

Top
#174751 - 04/09/2003 08:01 Re: Binding Programs/Scripts to buttons, possible? [Re: tsaavik]
Rafy
new poster

Registered: 06/03/2002
Posts: 39
Loc: Mississauga, Ontario, Canada
bump
_________________________
blue 2 X 30GB

Top
#174752 - 30/09/2003 09:56 Re: Binding Programs/Scripts to buttons, possible? [Re: Rafy]
tsaavik
new poster

Registered: 11/08/2003
Posts: 4
Loc: San Diego, CA
Sorry, i've been busy looking for a new job (my company is closing by year end).

I still plan on working on this though, just give me some more time

Top
#174753 - 30/09/2003 11:40 Re: Binding Programs/Scripts to buttons, possible? [Re: mlord]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
For the record, I did talk to Mark about this at the Ohio meet because I want a similar function, to run TTSClock from a popup menu. He seemed to indicate that it might be possible in the future, relating to having hijack be able to execute commands from input on the serial port. This in turn would then be accesable via /proc, thus a few more lines of code and buttons could be mapped to run programs.

Mark, am I remembering this right? I think Derrick might have heard this conversation as well...

Top
#174754 - 30/09/2003 13:09 Re: Binding Programs/Scripts to buttons, possible? [Re: drakino]
rtundo
addict

Registered: 27/02/2001
Posts: 569
Loc: Albany, NY
Related to this. It would be great if raw button codes could be read by Hijack's "Button Codes Display" function through the serial port from external devices.

Top
#174755 - 04/10/2003 15:17 Re: Binding Programs/Scripts to buttons, possible? [Re: rtundo]
tsaavik
new poster

Registered: 11/08/2003
Posts: 4
Loc: San Diego, CA
well, i just tried it and didn't have much luck. It dosn't look like you can bind a button with an external app while player+hijack are running, or (more likely) i don't know how to do it. If anyone has any suggestion/tips/etc please let me know

Top
#174756 - 06/05/2004 05:01 Re: Binding Programs/Scripts to buttons, possible? [Re: tsaavik]
Dava
member

Registered: 06/12/2000
Posts: 192
Loc: Bucks UK
Bump

If Mark could add functionality to the IRtranslate feature of Hijack so that:

[ir_translate]
b93452="/drive0/var/bashscript"

was acceptable, it would mean that we could
exec the script from a button and it should also work with the

http://player.ip/?button=b93452

commands from the web interface.

This would allow one to control which apps are executable from the web interface. The only issue that I can forsee is that the dummy button may wake the player if it is in standby.

What do you think Mark? Would this method be possible to implement and more importantly, of interest to you.
_________________________
MK2 smoked 32Gb S/n 090000949 MK2a Blue 20GB racked and out of sync

Top
#174757 - 09/05/2004 20:20 Re: Binding Programs/Scripts to buttons, possible? [Re: Dava]
SonicSnoop
addict

Registered: 29/06/2002
Posts: 531
Loc: Triangle, VA
This would be a nice feature to have. Even tho the TTS doesnt work that great the idea of having a button to press and have it speak what menu or item it is on comes to mind, would come in very handy when riding in my vert with the top down on a bright day when i cant see the screen and trying to drive.
_________________________
-D Modifying and Tweaking is a journey, not a destination................................ MKIIa : 60gig - 040103286 - Blue - v2 + PCATS tuner MKIIa : 20gig - 040103260 - Blue - v3a8 + Mark Lord Special Edition Cherry Dock

Top
#174758 - 11/05/2004 05:40 Re: Binding Programs/Scripts to buttons, possible? [Re: SonicSnoop]
Dava
member

Registered: 06/12/2000
Posts: 192
Loc: Bucks UK
It seems like it would be useful for those trying to implement ODB II and GPS apps on the unit too. This would allow you to run the player app with max memory unless you wanted to do the other thing, better than having it always sitting in the background.
_________________________
MK2 smoked 32Gb S/n 090000949 MK2a Blue 20GB racked and out of sync

Top