maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call (https://talk.maemo.org/showthread.php?t=46914)

AlMehdi 2010-07-27 14:18

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
Quote:

Originally Posted by jaeezzy (Post 766140)
PSSwitcher uses HAL to see any device added via UDI that gets registered and like mentioned earlier HAL is not registering any UDI for the connected device in some bt headset cases and I don't know how I can detect the connected device. Hopefully someone here can suggest something for this. I'm using S9 motorolla bt headset and UDI "/org/freedesktop/Hal/devices/computer_logicaldev_input_1" is registered when connected and this' how I'm getting it to work.

The easiest would be to write "dmesg" in terminal. You could test it with open and close the keyboard. Am not sure if bt will show upp there though. Another way would be to use "lshal |grep <device>". Am not sure what the device name would be. But if you try computer_logicaldev it will show a 0 or 1 if it is connected or not.

jaeezzy 2010-07-28 06:51

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
1 Attachment(s)
Quote:

Originally Posted by AlMehdi (Post 766518)
The easiest would be to write "dmesg" in terminal. You could test it with open and close the keyboard. Am not sure if bt will show upp there though. Another way would be to use "lshal |grep <device>". Am not sure what the device name would be. But if you try computer_logicaldev it will show a 0 or 1 if it is connected or not.

I haven't tried dmesg but hal was what I was using and for some others it wasn't suitable. However, I have switched to dbus signals listening as suggested by atunguyd and came up with this one, again it works here and hopefully it does for others too now :D Plz try and let me know. Thanks

atunguyd 2010-07-28 09:07

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
jaeezzy it works PERFECTLY!!!!

If I could I'd kiss you :D

As a matter of interest what dbus message are you listening for?

jaeezzy 2010-07-28 10:32

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
Quote:

Originally Posted by atunguyd (Post 767512)
jaeezzy it works PERFECTLY!!!!

If I could I'd kiss you :D

As a matter of interest what dbus message are you listening for?

I wish you could ;)
Listening for system message was quite too much for me as the same message was emitted number of times with different arguments. So, I picked the easy one - session message, if I get 0 then bt is connected or if -1 then its disconnected :D

jaeezzy 2010-07-31 01:21

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
Just to give youse an update of the latest release. 0.2-3 is in devel and as always remember it's there to get tested and will soon push it to testing. I've uploaded the changelogs in the #1 post. Thanks

zlatokosi 2010-09-01 07:41

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
I'm having trouble uninstalling psswitcher, in x-term I get

dpkg: error processing psswitcher (--remove):
subprocess pre-removal script returned error exit status 1

Any ideas? Thanks.

jaeezzy 2010-09-01 07:59

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
Quote:

Originally Posted by zlatokosi (Post 803953)
I'm having trouble uninstalling psswitcher, in x-term I get

dpkg: error processing psswitcher (--remove):
subprocess pre-removal script returned error exit status 1

Any ideas? Thanks.

May be try reinstalling and then uninstall again coz I'm not sure whats happening :(

sudo apt-get --reinstall install psswitcher

then

sudo dpkg -r psswitcher

ThePooBurner 2010-09-09 05:16

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
Quote:

Originally Posted by jaeezzy (Post 803961)
May be try reinstalling and then uninstall again coz I'm not sure whats happening :(

sudo apt-get --reinstall install psswitcher

then

sudo dpkg -r psswitcher

I am having the same problem as the user to whom you just replied. Here is the feedback from the attempt to uninstall:

Code:

Nokia-N900:~# apt-get remove psswitcher
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  psswitcher
0 upgraded, 0 newly installed, 1 to remove and 10 not upgraded.
1 not fully installed or removed.
After this operation, 156kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 35211 files and directories currently installed.)
Removing psswitcher ...
dpkg: error processing psswitcher (--remove):
 subprocess pre-removal script returned error exit status 1
Errors were encountered while processing:
 psswitcher
E: Sub-process /usr/bin/dpkg returned an error code (1)

And here is the output when i try to reinstall:
Code:

Nokia-N900:~# apt-get --reinstall install psswitcher
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up psswitcher (0.2-3) ...
cp: cannot stat '/tmp/psswitcherd': No such file or directory
dpkg: error processing psswitcher (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 psswitcher
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any thoughts on how to fix it? I also have the problem that is is only half installed at the moment, so when i use it from the Settings menu and hit "save" i get the messages "failed to save the settings". Hence the reason for wanting to reinstall.

hawaii 2010-09-09 13:14

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
sudo dpkg --purge psswitcher

and post output.

ThePooBurner 2010-09-09 15:14

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
Quote:

Originally Posted by hawaii (Post 811666)
sudo dpkg --purge psswitcher

and post output.

Code:

/home/user # dpkg --purge psswitcher
(Reading database ... 35218 files and directories currently installed.)
Removing psswitcher ...
dpkg: error processing psswitcher (--purge):
 subprocess pre-removal script returned error exit status 1
Errors were encountered while processing:
 psswitcher



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

vBulletin® Version 3.8.8