Active Topics

 



Notices


Reply
Thread Tools
Posts: 44 | Thanked: 28 times | Joined on Mar 2010
#21
Originally Posted by LordJuanlo View Post
Cmon guys, anybody can make a program of this?
I think we are all stuck on the fact that when the 'phone' is active (i.e ongoing phonecall)
the vibrator won't function, it seems as if it is disabled, and enabling it with dbus during call does not work...

the code i posted can be run with python on the phone, but will only vibrate the phone when the call is ended, not when the call is started...
 
Posts: 83 | Thanked: 130 times | Joined on Dec 2009
#22
Originally Posted by qwerty12 View Post
ATM, on the N900, the timer starts with the dial tones (which makes sense)
Nope.. Timer starts when call is connected.. ie the other person picks up the call..
 
Posts: 53 | Thanked: 20 times | Joined on Feb 2010
#23
Then like on Vibrate Call application (http://thinkchange.cn/products/index/vibratecall.html) on symbian : The application invokes the vibration alert during outgoing calls and continues the vibration until the call is answered. This means that users can just dial and wait for the vibration alert to seize to put ears to their phones, with adjustable vibration intensity...
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#24
Originally Posted by ny-hardcore View Post
I think we are all stuck on the fact that when the 'phone' is active (i.e ongoing phonecall)
the vibrator won't function, it seems as if it is disabled, and enabling it with dbus during call does not work...

the code i posted can be run with python on the phone, but will only vibrate the phone when the call is ended, not when the call is started...
Did you try to vibrate by directly writing to the hardware:

/sys/class/leds/twl4030:vibrator/brightness

If you use titan's kernel using dbrightness instead of brightness might be better, as it prevents mce from interfering.
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 

The Following User Says Thank You to Matan For This Useful Post:
Posts: 44 | Thanked: 28 times | Joined on Mar 2010
#25
ok i came up with following

using dbus-scripts
http://maemo.org/packages/view/dbus-scripts/

install dbus-scripts

copy attached settings file (vibra.txt) to
/etc/dbus-scripts.d/

and copy the *.sh.txt file to
/home/user/
and rename it to vibra_on.sh
and run
chmod +x vibra_on.sh
(damn attachement extensions...)

run killall dbus-scripts
place a call, feel it vibrate
Attached Files
File Type: txt vibra.txt (67 Bytes, 164 views)
File Type: txt vibra_on.sh.txt (132 Bytes, 154 views)

Last edited by ny-hardcore; 2010-07-08 at 16:40. Reason: chmod +x vibra_on.sh
 

The Following 2 Users Say Thank You to ny-hardcore For This Useful Post:
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#26
the above does not work
 
Posts: 44 | Thanked: 28 times | Joined on Mar 2010
#27
Originally Posted by f2thak View Post
the above does not work
forgot to include
chmod +x vibra_on.sh
 
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#28
still dfoesnt work dude
 
Posts: 24 | Thanked: 10 times | Joined on Jun 2010
#29
PYTHON SCRIPT:

Code:
#! /usr/bin/env python2.5
# -*- coding: utf-8 -*-

import pygtk
import gtk
from gtk import Window, Button, Widget
import hildon
import time
import os
import gobject, dbus
from dbus.mainloop.glib import DBusGMainLoop


vibrator=0

def connect_call(message, actor, memberids):
	#print 'message = %s' % message
	#print '\n actor = %s' % actor
	#print '\n memberids = %s' % memberids
	global vibrator
	if actor==1 and message==0:
		vibrator=1
		return
	if actor==1 and message==1 and vibrator==1:
		os.system('echo 100 > /sys/class/leds/twl4030\:vibrator/brightness')
		time.sleep(1)
		os.system('echo 0 > /sys/class/leds/twl4030\:vibrator/brightness')
		vibrator=0
	return

DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
bus.add_signal_receiver(connect_call, path='/com/nokia/csd/call/1', dbus_interface='com.nokia.csd.Call.Instance', signal_name='AudioConnect')
gobject.MainLoop().run()

if __name__ == '__main__':
	gtk.main()
before run this script,you need to do these steps

Code:
sudo gainroot
cd /sys/class/leds/twl4030\:vibrator
chmod 666 brightness

Last edited by colakang; 2010-07-09 at 09:20.
 

The Following User Says Thank You to colakang For This Useful Post:
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#30
as root i did "python2.5 vibe.py"

line 17 in <module>
got error "name: 'bus' not defined

Last edited by F2thaK; 2010-07-09 at 04:57.
 
Reply


 
Forum Jump


All times are GMT. The time now is 05:03.