[Mostly SOLVED] - Installation of XMMS and Bluetooth settings?


FaeMinx

Rainbow Liberation Instigation
Joined
Dec 11, 2010
Messages
3,142
Age
43
Location
outside looking in side looking out
I've been trying to get my Pandora to output audio via Bluetooth, but as I'm no techy even the most obvious things can trip me up.


I'm currently stuck as I don't *really* understand what I'm doing, and even though I tried to follow some other threads on the issue to the letter - I still have no joy.


First thing I would like some advice on is installing XMMS.


I activate Wifi, connect to my phone, open a terminal from the start menu and type this:



Code:
sudo opkg update && sudo opkg install xmms



but after downloading and doing some other stuff it gives me this:



Code:
install: missing destination file operand after 'xmms'

Try 'install --help' for more information.



This is the part that I'm sure anyone who uses Linux and knows the commands can help me with.



My next issue is trying to determine exactly what to edit in the .asoundrc (that I found in my home directory) to enable Bluetooth.

Now I found some conflicting information... first:

I just installed SuperZaxxon Final, and went to go through the rounds of getting my config files straight for setting up Bluetooth headphones for music.



There is an ".asoundrc" file used in the home directory that tends to be complicated and hard to track down. Not anymore after I tested a theory of mine. This is all you need to put in that file. If you want to toggle between headphones and standard sound, just name it ".asoundrc.bt" to disable it.





Code:
pcm.!default {

type bluetooth

}
Ref:http://boards.openpa...oth +headphones

Then I found this:

Yes, you still need to edit .asoundrc and heres what you do:



First, create a copy of .asoundrc under a different name, then edit your second copy in mousepad



There is a section that shows this:





Code:
pcm.!default {

type plug

slave.pcm "softvol"



Make it say this instead:





Code:
pcm.!default {

type plug

slave.pcm "bluetooth"



You'll also have to add the following to the bottom:





Code:
pcm.bluetooth {

type bluetooth


}


Depending on the "sound output mode" you're in you want to name the file .asoundrc and change the other files name to something else, in my case I name the bluetooth one when not in use ".asoundrc2" and the normal one when not in use as ".asoundrc1" but you can do whatever you want so you remember.


Enjoy ;-)


Edit: When using an audio player and changing to Bluetooth out, make sure to restart the player so it picks up the change. Strangely only Exaile will work so far with Bluetooth audio out for some reason Audacious will not, no matter how I toy with the plugins =/
Ref: http://boards.openpa...-audio-working/


So as I said, I don't know what I'm doing... I've tried editing the file both ways and it seems to make no difference. I need someone to enlighten me in this area.


Finaly, what other settings do I need to change? Particularly in the audio players - Audacious and Exaile?


If you need further info (such as what I've already tried, and what Bluetooth headphones I have), this thread should fill you in:


http://boards.openpa...current-status/
 
Last edited by a moderator:
I remember getting Exaile to work with the .asoundrc changes there a long time ago, but haven't bothered with BT audio since.. Will play with it and let you know.


[EDIT] SUCCESS! I have static playing with Aplay over bluetooth! Aside from nearly destryoing my eardrums I now need to figure out how to get other programs to see my headset. I simply edited as you quote blocked me for above, except at the last one I specified my bluetooth headsets MAC address which you can find using hcitool con in terminal once your headset is paired connected. Will describe more soon..


[EDIT2] Apparently after simply doing what I mentioned above, Mplayer via terminal works without a hitch. Bluetooth away!
 
Last edited by a moderator:
First, follow the below quote block.

Yes, you still need to edit .asoundrc and heres what you do:


First, create a copy of .asoundrc under a different name, then edit your second copy in mousepad


There is a section that shows this:



Code:
pcm.!default {

type plug

slave.pcm "softvol"



Make it say this instead:





Code:
pcm.!default {

type plug

slave.pcm "bluetooth"



You'll also have to add the following to the bottom:





Code:
pcm.bluetooth {

type bluetooth


}



Depending on the "sound output mode" you're in you want to name the file .asoundrc and change the other files name to something else, in my case I name the bluetooth one when not in use ".asoundrc2" and the normal one when not in use as ".asoundrc1" but you can do whatever you want so you remember.



Enjoy ;-)




After that, take heed of the bottom code block you added:





Code:
pcm.bluetooth {

type bluetooth


}






Add your device MAC ID that you get by running in terminal ( this assumes you have the device paired and connected already ):



Code:
hcitool con



Like so:







However doing so results in an error from VLC asking you to upgrade to alsa 1.28 or somesuch, and that it can't open the device, it then plays through the speakers.. =/


[EDIT] WIN!! Xmms "just works" over bluetooth after installing xmms via opkg and changing to the alsa plugin.. seems to not buffer enough but I will tweak that and get back to you

Code:
pcm.bluetooth {

type bluetooth

device MA:CA:DD:RE:SS:!!


}




Save the file as ~/.asoundrc (Again: Make sure you've backed up your original!)



Use mplayer to play from your bluetooth headset




Code:
mplayer /path/to/file/here.fileextension




As far as other media players go, I can't get audacious / GNU mplayer / vlc / exaile to work. Someone else will have to chime in for those ones.. I would like to use them too but my google fu can't solve this mystery. Hope this helps FaeMinx



[Edit] Hmmm with VLC I found you can specify an ALSA output device in /pandora/appdata/vlc/vlcrc by editing the string below:


Code:
#ALSA Device Name (string)

#alsa-audio-device=default




To say:




Code:
#ALSA Device Name (string)

#alsa-audio-device=default

alsa-audio-device=bluetooth
 
Last edited by a moderator:
Hmm, I just re-read your post.. I didn't have an issue installing xmms on either my 1ghz or CCUnit. =/ Try reflashing? Or doing each command on its own?
 
YES!!!!!!!


~Shay~ you're a LEGEND! :D Woohoo!


Thank you for your clear and precise instructions! My Pandora is now going to see even more use than it has been getting.... with wireless music playback through XMMS, I can leave my Pandora in my bag as a dedicated mp3 player while I do other stuff...


Wow, the audio quality of the Pandora experienced through my Creative wp-350's is quite impressive...


Interestingly enough, playing a track with mplayer via the terminal played to the Pandora speakers not my WP-350's.


So in order to get XMMS installed properly this time I:


Opened a terminal from within my home directory instead of from the start menu, and then I entered the commands seperately as you suggested, I.e.:



Code:
sudo opkg update



and then:





Code:
sudo opkg install xmms


Once installed it appeared under Multimedia in the start menu and then all I had to do is set the Output Plugin to ALSA under 'Options' / 'Preferences'.


:lol:


I'm also experiencing some minor buffer-underruns from time to time, but it's not a big issue and I could easily live with it.


But please let me know if you manage to solve that one too. This is just fantastic! ^_^


I can't stop grinning from 'ear to ear'. :p
 
Awesome! I'm glad I could help out! :D <3


I'm no genius, I just barely have figured out just how Alsa / asoundrc works through some googling and past experience. The buffering seems worse when the Pandora is closed for me for some reason... No matter how I adjust the buffer time or the period in Xmms audio output preferences nothing seems to change.


Any idea guys?


[EDIT]


Totally cosmetic but on my 1Ghz unit the LED for BT doesn't blink when in use. ( eg playing audio ) the CC pandora does. Both running SZF. Any input there?


[EDIT]


Upon a reboot of the 1ghz trying BT Audio out it seems to be playing with only one hiccup so far, three tracks. Lid closed. Maybe it was just me trying to do too many things earlier, as right now I only have BT enabled. Before I had disabled Wifi while using BT.. The playback seemed to really freak out when disabling / enabling wifi, or after I had disabled wifi. So far as I sit here if I leave the unit alone, turn on Bluetooth and use Xmms all is well. Second I enable disable wifi it gets to a point of breaking up so badly I cannot use it until I reboot again.
 
Last edited by a moderator:
One other thing that would be great if someone could help with:


Playback controls are part of my Creative WP-350's, but only volume + and volume - work.... Play/Pause, << , and >> (next & previous tracks) don't do anything. Any ideas here?


EDIT: Hmm... I've just tried XMMS with the default .asoundrc file and it still plays to my bluetooth headphones!


So was all that unnecessary? - With only the need to install XMMS?


Or is the fact that I couldn't get mplayer via terminal to play to my headphones a sign that I did something wrong there? So far the only program that works in any way at all for me is XMMS.


EDIT 2: Confirmed - Once I had dissabled Wifi, I experience perfect audio. Obviously Wifi interferes with the Bluetooth signal.


Probably because my phone is right next to my Pandora the wifi didn't affect me as much as it did ~Shay~ ... So others may be able to have wifi active at the same time, but for best results: Turn off wifi! :)
 
Last edited by a moderator:
One other thing that would be great if someone could help with:


Playback controls are part of my Creative WP-350's, but only volume + and volume - work.... Play/Pause, << , and >> (next & previous tracks) don't do anything. Any ideas here?

I remember those being events you could capture using xev and then map to a key combo that the media player would listen for. Not sure about that though, I'm still playing with settings to find a decent buffer amount to try


I have those too, on my Samsung HM6450. Luckily it has its own volume control or I'd be deaf right now.


[EDIT]


Try putting the buffer to 750-800ms and adjust the period to 55, for me that seems to do the trick 99% of the time. <-- 1ghz unit though
 
Last edited by a moderator:
Try putting the buffer to 750-800ms and adjust the period to 55, for me that seems to do the trick 99% of the time. <-- 1ghz unit though

I had to turn wifi on again so I could test this. I set it to 750ms period 55, and it seems to have made a difference - Yep, after testing twice i only lose audio for a fraction of a second while it connects to my phone's wifi hotspot.... Otherwise perfect audio... Oh, wait there: another millisecond... so you are right: 99% perfect audio with wifi enabled. Seemingly 100% perfect audio with wifi disabled. :)
 
Last edited by a moderator:
RE :http://boards.openpa...phone-solution/

The only audio player I've found for this is easy to install as well (XMMS). Enable wifi, then type:



Code:
sudo opkg update && sudo opkg install xmms


It will magically make a menu item under Multimedia (that's new to this release). Run it.
If it works with xmms then it will work with audacious (the later being a fork of the former ;) )


I wonder why audacious wont work then..? I have ALSA selected as the output plugin, everything defaulted.
 
Last edited by a moderator:
Would you like SSH/VNC access to one of my units? I'll leave my headset connected.
 
I wonder why audacious wont work then..? I have ALSA selected as the output plugin, everything defaulted.

Perhaps because XMMS is installed via opkg?


I fiddled with all the settings in Audacious and nothing works.


I must correct myself from earlier: XMMS does *not* play to my headphones when I use the default .asoundrc file - I switched files with the btswitch key combo while XMMS was still playing... when I closed and opened the program again, it played to the speakers instead of my headphones.
 
While the application is running it won't refresh .asoundrc until you close / reopen it.
 
Totally cosmetic but on my 1Ghz unit the LED for BT doesn't blink when in use. ( eg playing audio ) the CC pandora does. Both running SZF. Any input there?

I forgot to mention (too distracted... I personally don't think I've *ever* heard sound this good in my life!), but my BT led doesn't blink either - CC unit.
 
Ok. I installed xev i.e.


Open terminal and type:



Code:
sudo opkg install xev

Hit enter and give your password when required.



Then while still in terminal with my headphones paired and in use I ran xev.

Simply type:



Code:
xev

and hit enter.


Any keypress from the Pandora would register and return a keycode... but none of the buttons on my wp-350's registered anything - not even the volume buttons... but they still work to adjust volume - but volume of the headphones, not the Pandora. While outputing audio to bluetooth it appears my Pandora's volume is locked - adjusting the volume slider in XMMS or the volume wheel on my Pandora does nothing.


I then removed my wp-350's from bluetooth devices and tried to re-add the device to see if it would show up as anything other than 'headset'... but alas no.


So my theory is this: Currently there is no bluetooth support for headphone/mic/controler combo devices - just plain ol' bare bones headsets. My assumption is that once we have Yars, all these issues will be addressed - and what has been achieved here is the best one can hope for till then?


I have no idea how to go about testing the mic on this thing with my Pandora - it *just works* with my Android phone.


Unless someone can come along and explain if it's even possible to activate these additional features, or how to get bluetooth working in any program other than XMMS, I think this topic is pretty much wrapped up for now. I'm going to change the title to reflect that - [Mostly Solved].
 
@Wally: Nah. Using headphones has been the only issue I'm aware of. I thought there was a config utility for PS3/Wiimotes and such as a PND in the repo. You shouldn't have to play with alsa ( the sound driver ) for using a gamepad =P
 
been trying to install xmms but getting "cannot install package xmms message"?


anyone got a pnd of xmms? or knows another player working with bluetooth headphones?


cheers
 
Last edited by a moderator:
I made the appropriate changes to .asoundrc, but my headphones still do not work. I even tried "mplayer -ao alsa *" and it still didn't. It might have been the batteries in my headphones were too low though.
 
Back
Top