pmeerw's blog

Mon, 06 Oct 2008

Using A2DP on Nokia 3500

The A2DP Bluetooth profiles allows to send audio between between two devices, eg. to allow streaming of music from a phone to a headset. The Linux PC can act as both, source and sink, and the Nokia 3500 (S40 platform, 3rd ed., feature pack 2) should be capable of both as well.

I'm using the old bluetooth-alsa stuff (a2play, a2recv), have not tried BlueZ's newer Bluetooth Audio support.

Nokia 3500 to PC works:

hciconfig hci0 class 0x200404
sdptool add A2SNK
./a2recv

However, PC to Nokia 3500 does not work (and the phone reboots when the stream is interrupted :-():

sox squishysquid_no_more_lovesongs_201343.mp3 -t raw -r 48000 -B -s -2 -c 1 - | 
./a2play -i -d -m -r 48000 00:xx:xx:xx:xx:xx -

Found A2DP Sink
Product ID 0001:0039:0000
Found A2DP Sink at the destination
Connected [imtu 672, omtu 672, flush_to 65535]
Sent the Stream End Point Discovery Command
Got a Stream End Point Discovery Response
received 1 capabilities
SEID = 1
Requested Capabilities for SEID = 1
Got capabilities response
Sent set configurations command
Set configurations command accepted
Sent open stream command
Got open stream confirm
Connected [imtu 672, omtu 672, flush_to 400]
Sent stream start
Got start stream confirm
ending stream
Sent 1252 packets
Sent stream-close
Got close stream confirm
closing stream
closing control connection

I had to slightly modify a2play as the Nokia 3500 is very picky with regard to its capabilities (only one channel, only 48 kHz sampling rate, only allocation method 'loudness'; ie. it IMHO fails to implement the mandatory options). With a Jabra Bluetooth headset, I did have success a while a go.

posted at: 22:27 | path: /projects | permanent link

Made with PyBlosxom