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)

efekt 2010-04-18 16:22

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Uh I see. Thanks, I'll give it a shot :)

ndi 2010-04-19 16:13

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
It it just my version, it it doesn't switch unless call is in progress (connected)? Switching when a call is outgoing but not connected is a good idea, otherwise once connected it takes a full two seconds to switch as needed, especially with keyboard switch.

jaeezzy 2010-04-20 07:14

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Ok now as it seems PR1.2 is yet not around the corner :( and despite suffering the dependency problems due to the excitement that dragged me to update scratchbox, I've still uploaded the latest version 0.1-8 in my #1 post here. Please find the changelog and the installation info under the UPDATES as always. It can't be installed via Application Manager so x-term is your only friend I guess. So:
1) Open xterm
2) sudo gainroot (Assuming you have rootsh installed)
3) cd to where you downloaded the file
3) dpkg -i --force-depends psswitcher_0.1-8_armel.deb

Due to these limitation, I'ven't yet uploaded to devel but will do as soon as PR1.2 hits public. Hence, for now you can only download the file from my #1 post.
And as always, 'll look forward for the feedback. Thanks

jaeezzy 2010-04-20 07:19

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

Originally Posted by efekt (Post 615942)
I'm not quite sure anyone else is having this problem - I searched this thread and found nothing... When I answer a call, sometimes the call screen gets minimized and switch orientation to landscape mode. When my call is ended, I have to maximize the call window again and then wait another second or two in order it will switch back to portrait mode so I could press the "END" button...
Is there anything you can do about it jaeezzy? Maybe something is "stealing" the focus from the call screen, and forcing it to minimize?

This is because the "Open dashboard when turning on speakers" checkbox is enabled by default. So, you can uncheck it in the settings. But doensn't the call window close automatically when the call ends and open up the Phone app?

hawaii 2010-04-20 13:32

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Sweeeet!

I'll be testing on it soon.

Thanks for all your hard work on this!

EDIT: Newest update works great for bluetooth.

atunguyd 2010-06-01 04:27

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
jaeezzy,

Any updates planned for this?

I have a strange issue with bluetooth. Before making a call I switch on my bluetooth headset and my N900 pairs with the device just fine.

I then attempt to make a call, The call screen comes up with the "Headset" option enabled, or Blue. Then as soon as the call starts (I hear the ringing sound), the headset option turns to grey and I get that popup that says it is handing over to handset. If I press the grey headset option it then works with bluetooth.

Any ideas??

For the record I have my phone in a cradle in landscape orientation - I have tried both with keyboard open and closed and get the same results both times.

Oh also I am doing all my testing making skype calls to the skype echo service, but I doubt that is causing the problem.

hawaii 2010-06-01 05:14

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Doesn't sound like an issue caused by pss. As far as I know, pss doesn't make any changes - it simply reads the value for attached devices and decides based on that.

I've been using it since we added the bluetooth detection, and have never encountered this. Ever. Uninstall and see if the problem persists.

Jay, can you either provide the source for 1-8 or increase the delay selection from topping out at 4, to 10? Also, 1-8 is ready to be pushed to devel for PR1.2 :D

atunguyd 2010-06-04 00:35

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Ok as suggested I uninstalled PSS - tried to use my headset and it worked flawlessly. Reinstalled PSS 1.8 and as soon as I make the connection it switches me from headset to speakers.

Jaezzy - is there any log that I can provide?

jaeezzy 2010-06-08 05:01

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
@atunguyd: Which version are you using? 0.1-7 in devel doesn't support bluetooth headset. You have to manually download 0.1-8 from the #1 post of this thread which supports bluetooth headsets. It was coz of PR1.2 thing :(. Sorry it doesn't log anything :D.

@hawaii: I'm working on it. Hopefully, I'll release 0.1-9 soon and push it to testing.

NWZ, thanks for the feedback guys.

atunguyd 2010-06-08 13:04

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Jaeezzy,

Definitly using 0.8 that I installed via the #1 post. As I said before too I removed it and reinstalled it. While it was removed bluetooth headset calls worked fine, but as soon as I add pss then it switches to speakers every time I try to make a call and my headset is paired.

I have tried every setting in the PSS application but cant seem to get it to work. I will try my wife's headset and see if it is in some way related to my headset. Otherwise I can provide any debug you might want from me.

davall 2010-06-08 13:57

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Can confirm this partly. If i switch off the proximity sensor in settings when using bluetooth headset everything is fine.

So until this is fixed, i cannot use pss with proximity sensor. What a pity.

Regards, davall

hawaii 2010-06-08 14:06

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Oddly enough, I don't encounter this issue. It works as it should for me. When I have my headset / A2DP paired, sliding out the keyboard or covering/uncovering the proximity sensor doesn't activate the loud speaker.

I've tested every possible way I can think of, pairing before a call, pairing and transferring audio during a call, dropping bluetooth off, turning off the headset without disconnecting.

No idea why this would be.

jaeezzy 2010-06-09 10:30

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

Originally Posted by davall (Post 705398)
Can confirm this partly. If i switch off the proximity sensor in settings when using bluetooth headset everything is fine.

So until this is fixed, i cannot use pss with proximity sensor. What a pity.

Regards, davall

Can you please let me know the output of lshal -m in x-terminal when you connect/disconnect bluetooth headset? Mine says "computer_logicaldev_input_1 added"

hawaii 2010-06-09 13:39

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Same values here as last time. Can we just confirm what type of hardware everybody is using? I'm not sure if BT profiles are being set differently. I'm using headphones and A2DP at all times during my testing.

davall 2010-06-09 19:32

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

Originally Posted by jaeezzy (Post 706946)
Can you please let me know the output of lshal -m in x-terminal when you connect/disconnect bluetooth headset? Mine says "computer_logicaldev_input_1 added"

I tried it several times. Mine says nothing in xterm during connect or disconnect :confused:
In xterm i only get battery status info with lshal -m
On the desktop i get the yellow notice that it is connected with the BMW bluetooth car kit.
Any clue?

jaeezzy 2010-06-09 23:30

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

Originally Posted by davall (Post 707709)
I tried it several times. Mine says nothing in xterm during connect or disconnect :confused:
In xterm i only get battery status info with lshal -m
On the desktop i get the yellow notice that it is connected with the BMW bluetooth car kit.
Any clue?

To be honest I don't have a clue either. What about you copy the outputs of just lshal, first without connecting and second after connecting with bluetooth and let me know the diff. However, n900 doesn't have inbuilt package to do so, so if you have Linux computer it will be easier. Anyways, there's package named "diffutils-gnu" in extras-testing but again the warning on using devel and testing applies and do it on your own risk.

If you've decided to go ahead :D here's what you can do in x-term in N900:

lshal >> ~/before_conn (before connecting to BT)
lshal >> ~/after_conn (after connecting to BT)
gdiff before_conn after_conn

and let me know the output.

hawaii 2010-06-10 02:59

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
So this isn't a headset you're using? Can the other poster confirm what hardware they are using so we can track this issue down?

davall 2010-06-10 10:28

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

...
If you've decided to go ahead :D here's what you can do in x-term in N900:

lshal >> ~/before_conn (before connecting to BT)
lshal >> ~/after_conn (after connecting to BT)
gdiff before_conn after_conn
and let me know the output.
Here comes the output. Nothing more as before i guess :confused:

--------------snip
40,41c40,41
< battery.charge_level.percentage = 100 (0x64) (int)
< battery.charge_level.rate = 0 (0x0) (int)
---
> battery.charge_level.percentage = 99 (0x63) (int)
> battery.charge_level.rate = 1 (0x1) (int)
43c43
< battery.reporting.rate = 0 (0x0) (int)
---
> battery.reporting.rate = 1 (0x1) (int)
98c98
< battery.voltage.current = 4141 (0x102d) (int)
---
> battery.voltage.current = 4111 (0x100f) (int)
--------------snip end

Regards davall

PS: I'm using the n900 in a BMW car with integrated bluetooth headset/car kit

jaeezzy 2010-06-10 10:49

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

Originally Posted by davall (Post 708545)
Here comes the output. Nothing more as before i guess :confused:

--------------snip
40,41c40,41
< battery.charge_level.percentage = 100 (0x64) (int)
< battery.charge_level.rate = 0 (0x0) (int)
---
> battery.charge_level.percentage = 99 (0x63) (int)
> battery.charge_level.rate = 1 (0x1) (int)
43c43
< battery.reporting.rate = 0 (0x0) (int)
---
> battery.reporting.rate = 1 (0x1) (int)
98c98
< battery.voltage.current = 4141 (0x102d) (int)
---
> battery.voltage.current = 4111 (0x100f) (int)
--------------snip end

Regards davall

PS: I'm using the n900 in a BMW car with integrated bluetooth headset/car kit

Thats talking about only battery power changes inbetween the cmds, so nothing is registered.. Now that leaves me clueless as to how N900 is recognizing that bluetooth device is added so sorry I'm gonna have to seek for help here myself :D so plz anyone who can help/suggest as to what could be done here would be great.. Thanks

jaeezzy 2010-06-18 03:35

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Hi, the package 0.1-9 is in testing now.. Infos are listed in my #1 post as usual under "Updates" :) thanks

atunguyd 2010-06-18 04:41

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
For the record my bluetooth headset is a motorolla HS850. No matter what settings I have in PSS it always switches to the speakers when I have my headset active.

jaeezzy 2010-06-18 05:34

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

Originally Posted by atunguyd (Post 720107)
For the record my bluetooth headset is a motorolla HS850. No matter what settings I have in PSS it always switches to the speakers when I have my headset active.

can you plz give me the output of lshal -m in the x-term..

ndi 2010-06-19 00:17

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
The new versions is flawless over here so far (no BT headset here). Thank you!

getnani 2010-06-28 15:06

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Hi there,

Frst of all thanks for such a goood utility... a v good one..

But..i have the same problem. with bluetooth headset.
I use Nextlink's G5 headset. if i use lshal -m, it says

Start monitoring devicelist:
20:29:39.222 property battery.voltage.current = 4066 (0fe2)

(NB: my settings DONT disable proximity even when keyboard slided)

and similar voltage current readings- probably becos i was charging my mobile as well. do i expect my bluetooth device to be listed here? Except for this issue, i find this app extremely useful.

Please help to fix this. Thanks.

jaeezzy 2010-06-29 23:17

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

Originally Posted by getnani (Post 732756)
Hi there,

Frst of all thanks for such a goood utility... a v good one..

But..i have the same problem. with bluetooth headset.
I use Nextlink's G5 headset. if i use lshal -m, it says

Start monitoring devicelist:
20:29:39.222 property battery.voltage.current = 4066 (0fe2)

(NB: my settings DONT disable proximity even when keyboard slided)

and similar voltage current readings- probably becos i was charging my mobile as well. do i expect my bluetooth device to be listed here? Except for this issue, i find this app extremely useful.

Please help to fix this. Thanks.

Hi, can you plz do the following and let me know what xterm prints other than the voltage changes:
1) run lshal -m in xterm
2) then connect your bluetooth headset(xterm should register sth at this point)
3)then again disconnect(optional)

EDIT: about proximity not deactivating, can you plz tell me more whats exactly is happenin: When proximity and keyboard is checked in the settings, then only sliding out keyboard disables proximity.

getnani 2010-06-30 05:52

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Thanks for the reply matey...
I did the following
1) run lshal -m in xterm
2) then connect your bluetooth headset(xterm should register sth at this point)
3)then again disconnect(optional)

nothing other than battery voltage,battery reporting current and remaining time.
However, I do see the yellow bar msg on the top of the screen "Connected to Invisio G5". The headset works, no doubt :D

Regd. the proximity, I guess i wasnt clear.. What i meant is that my settings is set such that proximity sensors wont be deactivated, sliding out keyboard. I mean this is an additional info, if it helps debugging the above mentioned issue.

Also to add, i tried enabling and disabling visibility. No luck, the same battery stuff. pleasz help!!

jaeezzy 2010-06-30 07:15

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

Originally Posted by getnani (Post 734959)
Thanks for the reply matey...
I did the following
1) run lshal -m in xterm
2) then connect your bluetooth headset(xterm should register sth at this point)
3)then again disconnect(optional)

nothing other than battery voltage,battery reporting current and remaining time.
However, I do see the yellow bar msg on the top of the screen "Connected to Invisio G5". The headset works, no doubt :D

Regd. the proximity, I guess i wasnt clear.. What i meant is that my settings is set such that proximity sensors wont be deactivated, sliding out keyboard. I mean this is an additional info, if it helps debugging the above mentioned issue.

Also to add, i tried enabling and disabling visibility. No luck, the same battery stuff. pleasz help!!

Sorry for thats a wierd issue and got from couple others too. The problem is, nothing is getting caught by lshal when connecting and its leaving me clueless as well :D I'll start a new thread about this issue seeking help hoping there's sth else happening.
Are you saying that you have unchecked "Use Keyboard Slides" so that proximity wont be deactivated even when you slide out keyboard? If so then it should coz I just checked mine and no problem(unchecking keyboard option doesn't deactivates proximity while keyboard's slided out) and btw it shouldn't be connected to the bt headset issue.

getnani 2010-06-30 18:49

Re: [ANNOUNCE] Phone Speaker Switcher - turns speakers on/off during call
 
Ok, I guess i need to wait then, right??. Anyways, regd that proximity thing, I guess we have confused over that. basically forget that. It was never a issue. I just gave u the complete scenario. as u pointed out it doesnt really matter. Btw, show i manually install any dependencies?

jaeezzy 2010-07-01 01:20

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

Originally Posted by getnani (Post 735923)
Ok, I guess i need to wait then, right??.

unfortunately, ya and I'm too coz my knowledge is very limited :D


Quote:

Btw, show i manually install any dependencies?
NO.

NOTE: For until its fixed, when using proximity, if you are using BT headset and its not working the way it should, you can use your phone normally, i.e while making/answering call, by half-pressing camkey(half-press camkey and click button to call/answer). This will disable proximity for that conversation. However, proximity can be enabled by camkey button again during the same conversation.

atunguyd 2010-07-23 05:29

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

Any update on the bluetooth headset issue.

I am still battling with this. If I answer or make a call with my bluetooth headset on the call immediatly gets re-directed to speakers. If I press the headset button on the screen it goes back to the headset, but that is a real pain and really defeats the whole reason for the bluetooth headset.

So far I have tested this on my motorolla headset, my wifes nokia headset and also my cars built in bluetooth abd all three do the same thing.

Let again state that this application of yours is in my opinion 100% the best application so far for the N900 and I love flaunting it infront of the iPhone users who are trying to press the loudspeaker button and listen to the phones at the same time.

I think the only thing outstanding is the bluetooth issue.

If you are happy to release the source I am happy to help work on the issue too.

jaeezzy 2010-07-23 13:28

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

Originally Posted by atunguyd (Post 761735)
Hi jaeezzy,

Any update on the bluetooth headset issue.

I am still battling with this. If I answer or make a call with my bluetooth headset on the call immediatly gets re-directed to speakers. If I press the headset button on the screen it goes back to the headset, but that is a real pain and really defeats the whole reason for the bluetooth headset.

So far I have tested this on my motorolla headset, my wifes nokia headset and also my cars built in bluetooth abd all three do the same thing.

Let again state that this application of yours is in my opinion 100% the best application so far for the N900 and I love flaunting it infront of the iPhone users who are trying to press the loudspeaker button and listen to the phones at the same time.

I think the only thing outstanding is the bluetooth issue.

If you are happy to release the source I am happy to help work on the issue too.

No, nothing on the issue yet. The thread I started hasn't got any answer yet :(.
EDIT: I've added the source files as .tar in #1 post. Thanks

jaeezzy 2010-07-25 09:41

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
sorry for I forgot if I've already asked this question but guys having problem with BT headset, are youse using stock or titan's enhanced kernel?
EDIT: My bad, I completely missed out stock kernel :D as it's working on titan's kernel but having problem in stock kernel.

jaeezzy 2010-07-26 03:20

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
1 Attachment(s)
Here's the new version of psswitcher-0.2. I've added feature to answer call as well like ending call - long pressing camera button. NOTE: you have to give at least couple seconds before you can either answer/end calls. I've not yet added it to devel for I want to see how it goes otherwise its useless. About the bluetooth headset issues, when I first switched to stock kernel from titan's one, I'd bt issue as well, but now its gone and hopefully it does for others having problem with it as well :D. Anyway, if the problem still persists, can youse please run it as /usr/sbin/PSSwitcher from xterm and let me know the output while connecting/disconnecting bt headset. Note, you have to first run it then only add/remove bt headset or make/answer calls. Thanks

EDIT: This package is updated though not the version. So, plz reinstall coz it fixes one silly error addresed in bugs report :)

jaeezzy 2010-07-26 13:33

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
Just to let know of the updated .deb file in my prev post. I've not updated the verson number but now it fixes the keyboard opend issues when connected via bt or headphone.
Notes:
1) if the package is installed with the device already connected to bt headset, it won't recognize bt headset. You have to disconnect and reconnect it.
2) Answering call by long pressing the camera button doesn't work sometimes as expected if its done immediately when the connection is established. Plz give at least 2 - 3 sec before doing so.
3) Similar while ending call, if the call is answered by answering machine, you have to give it do its talking for a while before you can actually end the call long pressing the camera button.
4) If you are still having problem with bluetooth headset, plz run the program in xterm with /usr/sbin/PSSwitcher and disconnect and reconnect bt headset and it should print its UDI if registered at all.

thanks

JonWW 2010-07-26 13:45

Re: [ANNOUNCE] Phone Speakers Switcher - turns speakers on/off during call
 
This for me is one of the most useful apps for the N900, but... if I could request a few enhancements:
(I only use the proximity sensor setting, all other settings are switched off and I don’t have blue tooth)

1. The app's functionality miss behaves for me, bit of a iPhone4 problem as I obviously hold it incorrectly, because I press the camera key by mistake and the proximity sensor gets switched off. This probably happens because the camera key only requires the slightest pressure to operate it and been right handed my thumb sits between the power and camera buttons.
To prevent this could you add another setting that becomes available when the "Use Proximity Sensor" setting is selected, that allows controlling of the proximity sensor, with the camera button, to be switched off.

2. Another option that would be nice to have when using the proximity sensor to control the speakers would be, when making/answering a call (perhaps making/answering controlled separately) to have the speaker activate immediately on dialing/answering. This would be useful when making a call as you wouldn't have to hold the phone to your ear to listen for the call to be answered, this would be similar (ish) to http://talk.maemo.org/showthread.php?t=55886
Then again perhaps you could add a vibration setting for when the call is answered as this little app is rapidly becoming a complete call controller app, hmmm… maybe call ID screening as well… ;)

atunguyd 2010-07-27 02:41

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

I installed the new version and still have the bluetooth headset issue.

I ran PSSwitcher from xterm and there was nothing reported when I connected my bluetooth headset.

You mentioned kernels earlier. I think am using titan's kernel. The output from a uname -r is:
2.6.28.10power37

jaeezzy 2010-07-27 08:46

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

Originally Posted by atunguyd (Post 765934)
jaeezzy,

I installed the new version and still have the bluetooth headset issue.

I ran PSSwitcher from xterm and there was nothing reported when I connected my bluetooth headset.

You mentioned kernels earlier. I think am using titan's kernel. The output from a uname -r is:
2.6.28.10power37

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.

jaeezzy 2010-07-27 08:50

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

Originally Posted by JonWW (Post 765194)
This for me is one of the most useful apps for the N900, but... if I could request a few enhancements:
(I only use the proximity sensor setting, all other settings are switched off and I don’t have blue tooth)

1. The app's functionality miss behaves for me, bit of a iPhone4 problem as I obviously hold it incorrectly, because I press the camera key by mistake and the proximity sensor gets switched off. This probably happens because the camera key only requires the slightest pressure to operate it and been right handed my thumb sits between the power and camera buttons.
To prevent this could you add another setting that becomes available when the "Use Proximity Sensor" setting is selected, that allows controlling of the proximity sensor, with the camera button, to be switched off.

2. Another option that would be nice to have when using the proximity sensor to control the speakers would be, when making/answering a call (perhaps making/answering controlled separately) to have the speaker activate immediately on dialing/answering. This would be useful when making a call as you wouldn't have to hold the phone to your ear to listen for the call to be answered, this would be similar (ish) to http://talk.maemo.org/showthread.php?t=55886
Then again perhaps you could add a vibration setting for when the call is answered as this little app is rapidly becoming a complete call controller app, hmmm… maybe call ID screening as well… ;)

Thanks for the suggestions: for the case 1, I've uploaded new version 0.2-1 in my previous post. It now has option to use camera button to toggle proximity.
About switching to speakers, it switches to speakers immediately as soon as the ringtone starts if delay is set to "None" and accordingly for others.

atunguyd 2010-07-27 12:39

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

One suggestion - untill the bluetooth issue is fixed can there be a menu option that auto switching is disabled when either the keyboard is open or prehaps the camera cover is open. This way when I get into the car all I need to do is open the keyboard and I know that I can use my bluetooth without the phone automatically switching to the speakers.


I will try help and see if I can figure out how to detect the bluetooth - I have 12 years writing embedded software for set top boxes (including linux one) so I probably have the skills I just need to get the time together to work out how to install the SDK and get the build environment up and running. Just too busy at the moment with a project that we are working one.

Maybe HAL is not what you should be monitoring - have you looked into dbus?

I ran dbus-monitor from the command line today and saw the following:

Connect to my motorolla headset:
Code:

signal sender=:1.2 -> dest=(null destination) serial=148 path=/org/maemo/Playback/Manager; interface=org.maemo.Playback.Manager; member=BluetoothOverride
  int32 0
signal sender=:1.48 -> dest=(null destination) serial=53 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.extension; member=property_changed
  string "volume"
  variant      uint32 50

Disconnect from motorolla headset:
Code:

signal sender=:1.2 -> dest=(null destination) serial=149 path=/org/maemo/Playback/Manager; interface=org.maemo.Playback.Manager; member=BluetoothOverride
  int32 -1
signal sender=:1.48 -> dest=(null destination) serial=54 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.extension; member=property_changed
  string "volume"
  variant      uint32 74

Connect to car's bluetooth
Code:

signal sender=:1.2 -> dest=(null destination) serial=146 path=/org/maemo/Playback/Manager; interface=org.maemo.Playback.Manager; member=BluetoothOverride
  int32 0
signal sender=:1.48 -> dest=(null destination) serial=51 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.extension; member=property_changed
  string "volume"
  variant      uint32 50

DIsconnect from car's bluetooth:
Code:

signal sender=:1.2 -> dest=(null destination) serial=147 path=/org/maemo/Playback/Manager; interface=org.maemo.Playback.Manager; member=BluetoothOverride
  int32 -1
signal sender=:1.48 -> dest=(null destination) serial=52 path=/com/nokia/mafw/renderer/gstrenderer; interface=com.nokia.mafw.extension; member=property_changed
  string "volume"
  variant      uint32 74

As you can see in both cases the same dbus messages are sent but for disconnect the int32 is -1 and connect it is 0. So if there was some way for you to be notified when Playback.Manager get told to enable bluetooth override you will know that a bluetooth headset has been connected.

atunguyd 2010-07-27 13:23

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

More info - the last dump i got was from using dbus-monitor which by default only logs the user session dbus messages. Logging the system messages with dbus-monitor --system is far more revealing and is in the attached files.

As you can see there are definitly messages being sent to the bluez bluetooth stack telling it that the headset is being connected and disconnected - i think if you can get this stack to send you a message via dbus you will be good to know when any sort of bluetooth device has connected or disconnected.


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

vBulletin® Version 3.8.8