Reply
Thread Tools
macey's Avatar
Posts: 283 | Thanked: 276 times | Joined on Aug 2011 @ uk or @Pai,Mae Hong Son, Thailand
#1
Hello, I use my N900's to control my raspeberry pi media server.
I have icons on the N900 to play media/tv, change channels/tracks etc.
Instead of using volume up/down icons I would really control the server 'volume' via the N900's 'rocker' volume/zoom switch.
I am not sure if what I am trying to do is easily possible. Just
want the code to call my shell script volume up/down in addition to
what it does now.
Is this possible?

Last edited by macey; 2013-08-25 at 10:04. Reason: typo
 
macey's Avatar
Posts: 283 | Thanked: 276 times | Joined on Aug 2011 @ uk or @Pai,Mae Hong Son, Thailand
#2
un-ashamed bump
 
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#3
The easiest way I can think of is a small application written in Qt.
You can map the rocker keys to code in the application and you could move the icons off the desktop into the apps MainWindow.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#4
It is also worth to note, that volume rockers are F7/F8 keys.
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 
macey's Avatar
Posts: 283 | Thanked: 276 times | Joined on Aug 2011 @ uk or @Pai,Mae Hong Son, Thailand
#5
Originally Posted by sixwheeledbeast View Post
The easiest way I can think of is a small application written in Qt.
You can map the rocker keys to code in the application and you could move the icons off the desktop into the apps MainWindow.
Anyone here care to give me some guidance on how to do this
please, please, please...
 
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#6
Originally Posted by macey View Post
Anyone here care to give me some guidance on how to do this
please, please, please...

If you provide more information on what your buttons do and how you control the pi, maybe I can help.
Do you have experience with Qt?
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 
macey's Avatar
Posts: 283 | Thanked: 276 times | Joined on Aug 2011 @ uk or @Pai,Mae Hong Son, Thailand
#7
Originally Posted by sixwheeledbeast View Post
If you provide more information on what your buttons do and how you control the pi, maybe I can help.
Do you have experience with Qt?
Ok, thanks.
Here's my vol up button:-

Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=false
Name=omx vol up
Exec=/usr/local/sbin/up.sh
Icon=up_rgm
X-App-Loading-Image=none
Down vol down buttton is similar.
Here's the script called on the N900:-
Code:
echo /usr/local/sbin/up.sh | nc localhost 22000 >/dev/null 2>&1
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"uk sound up 3db"
This sends a command via an existing tunnel to the Pi.

Here's the script called on the Pi:-
Code:
echo -n + >/home/richard/omfifo
This sends the '+' character to omxplayer, increasing the volume by 3db.


This works because I start omxplayer remotely with control piped
from a fifo. Works fine, I have full control over a running instance of omxplayer without being attached or logged on to the Pi (other than by an ssh tunnel which is started automatically on network connection).
Thanks to this site:-http://subupi.blogspot.co.uk/2012/10...o-control.html
and this site:-http://unix.stackexchange.com/questi...ed-ssh-channel

I have no experience of Qt but am keen to learn. I am an ex mainframe sysprog so my programming skills are very old

Any help much appreciated.

Last edited by macey; 2013-08-25 at 10:13.
 
macey's Avatar
Posts: 283 | Thanked: 276 times | Joined on Aug 2011 @ uk or @Pai,Mae Hong Son, Thailand
#8
polite and reluctant 'bump'
 
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#9
Originally Posted by macey View Post
polite and reluctant 'bump'
Sorry I have been a bit busy.

I was looking at making an application for the task, however, I just don't have the time right now. I may get round to it eventually

If you wish to try you'll need a Maemo scratchbox environment.
I use a Debian VM inside my Ubuntu setup.

Then look at the sources for FlopSwap and an application that uses the rocker buttons like Pierogi.

You'll then need to connect the button commands to slots these slots will run your scripts.

Information on setting up scratchbox can be located on TMO or http://wiki.maemo.org
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 
Reply


 
Forum Jump


All times are GMT. The time now is 15:50.