Reply
Thread Tools
Posts: 345 | Thanked: 117 times | Joined on Jan 2010 @ uk
#11
how did you manage it by accident? Or did you never finnd out? I think I need something that will make the n900 trick the car into thinking there is a call about to come in or something, but which never acgtually happens. Then it should play whatever is on the media payer, like it does for a second before actually dialling or picking up a call. I can't program myself, but maybe someone could teach me how and an app could be written. There must be loads of people with cars that only do calls and having it play music this way would be ace. Perhaps a script that sends whatever the trigger is to a bluetooth headset that says 'get ready for a call' ans just sends that constantly?
I know there is the fm transmitter option, and this will do for now.
 
Posts: 79 | Thanked: 11 times | Joined on Oct 2009 @ Norway
#12
What kyllerbuzcutsaid was my plan when i searched for "car bluetooth audio"
lol
But is there someone with the programming skills that can make this happening?
My kenwood cd player, 1 year old do only support handsfree..

Sorry for my english..
__________________
Is it not strange that we fear most that which never happens? That we destroy our initiative by the fear of defeat; when in reality, defeat is a moust useful tonic and should be accapted as sutch.
 
Posts: 6 | Thanked: 0 times | Joined on Jul 2011
#13
Originally Posted by volt View Post
jtmstr: Music over bluetooth also works with my Pioneer DEH-P9800BT. It connects automatically but I have to start the media player on the phone and manually start playback. As it is, A2DP playback offer little advantage over having a seperate mp3 player hooked up to the AUX.

I suspect it should be technically possible to write a script that trigger when the car stereo connects to the phone. If so, starting the preferred playback program should be possible. That would be a great improvement.
Hi - Long time lurker first time poster .

Recently joined the ranks with an N900. Loving it so far . It already plays music on my JVC bluetooth deck after a manual start of a music playing app.

I'm also wondering if there is any progress on the automatic start to the music player over bluetooth. Or if someone can point me in the right direction to learn how to do it (I'm a total noob to programming).

Cheers
 
Posts: 502 | Thanked: 366 times | Joined on Jun 2010 @ /dev/null
#14
There is a way I think which would work, that is by using dbus-scripts.:

1) You will need to create a new file (as root) inside /etc/dbus-scripts.d/. The filename should preferrably end with .conf. In my instance I was using dbus-scripts to add extra functionality (key locking) to my BH-905 so I named my .conf file as bh-905.conf. The conf file should have the permissions: 644 or basically `chmod 644 /etc/dbus-scripts.d/insert_name_of_file_here.conf' as root.

Contents of the file can vary, in my case I made dbus-scripts listen for Bluetooth override signal to run the script I made, in your case you may need to point it to mediaplayer and possibly if you wanted to you can make dbus-script run the program from a different signal. Here is mine:
/root/bt_force_key * * org.maemo.Playback.Manager BluetoothOverride

As you can see the first part is the script to run, in my case its a script, in your case you can probably point it to mediaplayer. The rest of the information are just for you specifically specifying which signals should trigger this event, from senders, destinations, interface, member, etc.

More information can be found here.

2) If you decide to run your own script you will obviously need to create a new file for dbus-scripts to read once it picked up the triggered signal. The script file that you create will need to have perms 755 or `chmod 755 /path/to/script'. If you choose mediaplayer, it should already have relevant world execute permissions.

3) Last but not least, you will need to enable dbus-scripts. Under the link provided above, scroll down to the section `Running dbus-scripts on the session bus'. That is where you will need to modify and to make sure that it will run the setup even after reboots.

There are plenty of information on getting dbus-scripts to work the way you want including some examples on the very same wiki entry above.
 

The Following User Says Thank You to tuxsavvy For This Useful Post:
Posts: 6 | Thanked: 0 times | Joined on Jul 2011
#15
Thanks Tuxsavvy for the detailed post.

I'm going to pour a glass of red and have a go. It may take me a while to get me head around all the info here but will post back soon as possible.
 
Posts: 502 | Thanked: 366 times | Joined on Jun 2010 @ /dev/null
#16
I figured this might be a bit of a learning curve though if you have some experience with Linux CLI then you shouldn't have much to worry about, for I have dug most of the hard work up.

For now I couldn't be stuffed pinpointing the exact location of where I want dbus-scripts to run that script and I could in theory get away with parsing one line command maybe via using backquotes. Though the general idea I guess is there. Hopefully it'll work out right for your case .
 
Posts: 14 | Thanked: 2 times | Joined on Aug 2010
#17
I´ve got the same problem with my Fiesta. I can handle phone calls over bluetooth fine, but when it comes to play music over bluetooth, it fails.
 
Posts: 86 | Thanked: 21 times | Joined on Sep 2010
#18
Well, I got even something else ...I can play music and make phone calls without problems, but when it comes to receiving calls ring tone does not play thorugh bluetooth, but through my n900..when I answer I can talk over bluetooth. ANy idea?
Thanx fellas
 
Posts: 6 | Thanked: 0 times | Joined on Jul 2011
#19
Originally Posted by tuxsavvy View Post
I figured this might be a bit of a learning curve though if you have some experience with Linux CLI then you shouldn't have much to worry about, for I have dug most of the hard work up.

For now I couldn't be stuffed pinpointing the exact location of where I want dbus-scripts to run that script and I could in theory get away with parsing one line command maybe via using backquotes. Though the general idea I guess is there. Hopefully it'll work out right for your case .
Thanks again,

I think you are onto something here.

So far I've worked out how to ssh into the n900 and am getting a bit more familiar as to how it is laid out.
and to root it!
then installed the dbusscript.
Tried and initial script which so far hasn't worked but it is a start.

I've hit a couple noobie stumbling blocks.

How to get the mplayer app to kick start - in windows I know to look for an .exe - what do I look for in debian linux?

my logic is it that it should be in /etc/mplayer? but i see no files in there. Can there be hidden files similar to windows by going into folder options and enabling the checkbox?

Also I rebooted my phone and now etc/dbusscript.d directory is missing when ssh'd into the n900? It was there where I save the first script but where would it have gone? Would I need to reinstall the app?

Cheers
 
Posts: 502 | Thanked: 366 times | Joined on Jun 2010 @ /dev/null
#20
In linux, executables aren't indicated by their filename extensions (which is completely the opposite of what windows does). This is where the tool `file' comes in handy.
With file, it can describe to you what sort of file it is. It isn't foolproof but it is very handy for getting started with understanding the various files (until you decide you want to dig into understanding the headers of the files, which is usually where the tool file works its magic).

Here is an example of how it works:
Code:
Nokia-N900:~$ file /bin/bash   
/bin/bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14, dynamically linked (uses shared libs), stripped
As for locating the programs, debian linux utilises dpkg to centralise installation/uninstallation/etc of various programs. There are many switches for dpkg but I'll give you an example which would be something that you would want to achieve here. We assume mediaplayer would have the package name mediaplayer (assumptions initially may not be right for beginners but as one is more familiar with linux, their assumptions maybe more accurate):
Code:
Nokia-N900:~$ dpkg -l mediaplayer*| grep ii| awk '{ print $2 }'
mediaplayer
mediaplayer-l10n-cscz
mediaplayer-l10n-dadk
mediaplayer-l10n-dede
mediaplayer-l10n-engb
mediaplayer-l10n-enus
mediaplayer-l10n-eses
mediaplayer-l10n-esmx
mediaplayer-l10n-fifi
mediaplayer-l10n-frca
mediaplayer-l10n-frfr
mediaplayer-l10n-itit
mediaplayer-l10n-mr0
mediaplayer-l10n-nlnl
mediaplayer-l10n-nono
mediaplayer-l10n-plpl
mediaplayer-l10n-ptpt
mediaplayer-l10n-ruru
mediaplayer-l10n-svse
mediaplayer-restore
mediaplayerhomeapplet
Now I'm not going into too much detail as what each of those commands do or describing on various aspects of shell stuff . `dpkg -l' simply lists packages with a nice banner by default, `grep' just prints out anything from standard input (stdin) that matches whatever you want, in my case its `ii', awk is a powerful tool that allows one to print exact lines from say for example a table.

From that output we can see the very first line is the actual package we want to query for the list of files that came with the package:
Code:
Nokia-N900:~$ dpkg -L mediaplayer
/.
/usr
/usr/share
/usr/share/dbus-1
/usr/share/dbus-1/services
/usr/share/dbus-1/services/com.nokia.mediaplayer.service
/usr/share/doc
/usr/share/doc/mediaplayer
/usr/share/doc/mediaplayer/copyright
/usr/share/doc/mediaplayer/changelog.Debian.gz
/usr/share/gconf
/usr/share/gconf/schemas
/usr/share/gconf/schemas/mediaplayer.schemas
/usr/share/mime
/usr/share/mime/packages
/usr/share/mime/packages/mediaplayer-service-mime.xml
/usr/share/applications
/usr/share/applications/hildon
/usr/share/applications/hildon/mediaplayer.desktop
/usr/share/pixmaps
/usr/share/pixmaps/mediaplayer
/usr/share/pixmaps/mediaplayer/1bit_alpha_round_corner_button.png
/usr/share/pixmaps/mediaplayer/1bit_alpha_round_corner_button_active.png
/usr/bin
/usr/bin/mediaplayer.launch
/etc
/etc/others-menu
/etc/others-menu/extra_applications
/etc/osso-backup
/etc/osso-backup/applications
/etc/osso-backup/applications/mediaplayer.conf
/usr/bin/mediaplayer
/etc/others-menu/extra_applications/0000_mediaplayer.desktop
The output isn't particularly useful, so instead we shall just create oneliner script that will incorporate `file' and make the output much more useful:
Code:
Nokia-N900:~$ for i in `dpkg -L mediaplayer`; do file $i; done                                
/.: directory
/usr: directory
/usr/share: directory
/usr/share/dbus-1: directory
/usr/share/dbus-1/services: directory
/usr/share/dbus-1/services/com.nokia.mediaplayer.service: ASCII text
/usr/share/doc: directory
/usr/share/doc/mediaplayer: ERROR: cannot open `/usr/share/doc/mediaplayer' (No such file or directory)
/usr/share/doc/mediaplayer/copyright: ERROR: cannot open `/usr/share/doc/mediaplayer/copyright' (No such file or directory)
/usr/share/doc/mediaplayer/changelog.Debian.gz: ERROR: cannot open `/usr/share/doc/mediaplayer/changelog.Debian.gz' (No such file or directory)
/usr/share/gconf: directory
/usr/share/gconf/schemas: directory
/usr/share/gconf/schemas/mediaplayer.schemas: ASCII English text
/usr/share/mime: directory
/usr/share/mime/packages: directory
/usr/share/mime/packages/mediaplayer-service-mime.xml: XML document text
/usr/share/applications: directory
/usr/share/applications/hildon: directory
/usr/share/applications/hildon/mediaplayer.desktop: ASCII text, with very long lines
/usr/share/pixmaps: symbolic link to `/opt/usr/share/pixmaps'
/usr/share/pixmaps/mediaplayer: directory
/usr/share/pixmaps/mediaplayer/1bit_alpha_round_corner_button.png: PNG image data, 96 x 96, 8-bit colormap, non-interlaced
/usr/share/pixmaps/mediaplayer/1bit_alpha_round_corner_button_active.png: PNG image data, 96 x 96, 8-bit colormap, non-interlaced
/usr/bin: directory
/usr/bin/mediaplayer.launch: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), stripped
/etc: directory
/etc/others-menu: directory
/etc/others-menu/extra_applications: directory
/etc/osso-backup: directory
/etc/osso-backup/applications: directory
/etc/osso-backup/applications/mediaplayer.conf: ASCII text
/usr/bin/mediaplayer: symbolic link to `maemo-invoker'
/etc/others-menu/extra_applications/0000_mediaplayer.desktop: symbolic link to `/usr/share/applications/hildon/mediaplayer.desktop'
From that output we can determine where is the exact location of the program:
Code:
/usr/bin/mediaplayer.launch: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), stripped
It is weird if your script and that directory disappeared, I'd try and reinstall it from the command line: apt-get install --reinstall dbus-scripts

That will restore the directory along with the scripts but whatever you had before would have been lost. There is an ugly hack that I can think of right now, which would involve setting the file immutable but I cannot vouch if it is safe for use with N900: chattr +i /etc/dbusscripts.d/foo.conf (as root)

raver2011: I'm guessing your issue is with the head deck you have which is probably incapable of playing through bluetooth. Which methods have you tried? I don't have a head deck in my car (I ripped my old Sony out because it was dead and it doesn't have bluetooth functionality).

vittoriob4: This could either be the use of silence profile or something else which I wouldn't know of. With the silence profile enabled, it will be evident when you have an incoming call as mediaplayer will stop playing the music and then the rtcom-call-ui may play the requested music as ringtone.

Last edited by tuxsavvy; 2011-07-30 at 03:10. Reason: Should respond to other people's enquiries :p
 

The Following 2 Users Say Thank You to tuxsavvy For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 07:38.