OpenWrt Forum Archive

Topic: bemused - controll your mpd with your mobile phone

The content of this topic has been archived on 8 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hey all.. i quickly hacked bemused server together, so it should works nicely with mpd. i search some beta testers, the make file can be found here: http://www.neophob.com/files/owrt/Makefile.bemused

there a quite some deps, and you need to configure the bluetooth stuff:

1) get the bluetooth serial channel:
# root@OpenWrt:~# sdptool browse
# Inquiring ...
# <...>
# Service Name: COM 1
# Service RecHandle: 0x10005
# Service Class ID List:
#   "Serial Port" (0x1101)
# Protocol Descriptor List:
#   "L2CAP" (0x0100)
#   "RFCOMM" (0x0003)
#     Channel: 3                <<<
# Language Base Attr List:
#   code_ISO639: 0x656e
#   encoding:    0x6a
#   base_offset: 0x100

my phone use channel=3 as the serial channel...

2) edit bemused.conf (xmms = mpd!)
# Path to mpd (if mpd is in path only mpd) (default is mpd)
xmmsdir=/usr/bin/mpd

channel=3

# directorys where the mp3s are. If more than one seperate them by a m semicolon (must be set)
mp3dir=/YOUR/PATH/HERE


3) edit rfcomm file
root@OpenWrt:~# cat /etc/bluetooth/rfcomm.conf
rfcomm0 {
#     # Automatically bind the device at startup
      bind yes;
#
#     # Bluetooth address of the device
      device 77:66:55:44:33:22;
#
#     # RFCOMM channel for the connection
      channel   3;
#
#     # Description of the connection
      comment "your device";
}


i use jamse as a client, you can fint it here: http://jamse.sourceforge.net/

now start bemused:

root@OpenWrt:~# bemusedlinuxserver
Welcome to Bemused 1.73
Copyright Ashley Montanaro 2003
Linux port from Daniel Winter

ini file looks good..
Serial Port service registered
registered SP for channel 3
Bluetooth is connected to socket..
ERROR: MPD is NOT running...
Waiting for connection over bluetooth


info: this message: "ERROR: MPD is NOT running..." is normal, as bemused will only connect to mpd if needed...

cheers
michu

This sounds very interesting. I will try it out as soon as I get my bluetooth-adapter.

Hi, I like that idea to play mp3 files with my Router. I already have a bluetooth stick and I just ordert a usb sound card at ebay for about 5€. And I will test your bemused server.
I have another question could you add the possibility to play not only mp3 files also play radio streams form websites and manage them with a sellphone? That would be an awesome feature for your bemused server.
As soon as I get my sound card I will test your bemused server and I will post the bugs or if it is working alride. Thanks anyway for your work.

edit:
Compiling your Version 1.73a works without any problems:

oconnor@dell:~/Desktop/trunk$ make package/bemused-compile
make[1] package/bemused-compile
make[2] -C /home/oconnor/Desktop/packages/libs/bluez-libs compile
make[2] -C package/libtool compile
make[2] -C /home/oconnor/Desktop/packages/libs/glib compile
make[2] -C /home/oconnor/Desktop/packages/libs/libmpd compile
make[2] -C /home/oconnor/Desktop/packages/libs/flac compile
make[2] -C package/zlib compile
make[2] -C /home/oconnor/Desktop/packages/libs/libid3tag compile
make[2] -C /home/oconnor/Desktop/packages/libs/libmad compile
make[2] -C /home/oconnor/Desktop/packages/libs/libvorbisidec compile
make[2] -C /home/oconnor/Desktop/packages/libs/alsa-lib compile
make[2] -C /home/oconnor/Desktop/packages/sound/mpd compile
make[2] -C package/bemused compile

but in "...trunk/bin/packages" there is non of your packages there is only the zlib package. Am I'm doing something wrong? Or is there another place there I can find your packages?

(Last edited by Oconnor on 20 Feb 2008, 02:23)

bemused server isnt in the trunk now, i guess I'll add it shortly. check the first post, there is a link to the makefile. radio streams arent usable for bemused right now, and ill guess they will never be.. but ill take a look. you could use cmdpad to use a usb keypad, so you can switch radio and local mp3 files..

another hint DONT use cheap usb stick, they sound terrible! i also bougth a 10€ usb soundstick for testing, after that i kicked it far away, sound quality is just rubbish and there is only a headphone output. i bought a creative labs usb soundblaster - way better (and more expensive).

cheers

(Last edited by michu on 20 Feb 2008, 12:49)

I submitted the makefile for the trunk today. I also updated bemused and fixed a serious bug.. bemused should be in the trunk soon. cheers!

michu wrote:

another hint DONT use cheap usb stick, they sound terrible! i also bougth a 10€ usb soundstick for testing, after that i kicked it far away, sound quality is just rubbish and there is only a headphone output. i bought a creative labs usb soundblaster - way better (and more expensive).

I believe I know why your USB stick sounded terrible: most likely it only supported 48KHz sampling frequency, and the music you listen to was most likely sampled to 44.1KHz.  In order for it not to sound terrible, you need to use a good resampler, and those tend to be written in floating point, so they eat up too much CPU to be usable on our poor little boxes.
In the end I bought another USB sound card indeed, but in the mean time I just resampled (offline) all my music collection to 48KHz, and the result was very much acceptable.

michu wrote:

I submitted the makefile for the trunk today. I also updated bemused and fixed a serious bug.. bemused should be in the trunk soon. cheers!

great! I'm still waiting for my bluetooth stick. Keep up the good work!

The discussion might have continued from here.