You are on page 1of 5

Streaming Audio Over Bluetooth ACL Links

Amrit Prit Paul Singh Bilan Department Of Computation, University of Manchester Institute of Science and Technology, UK
appsb@aol.com To Rupa

Abstract
This paper describes the Bluetooth radio technology as an enabling platform to wirelessly stream audio content from hotspots to small form factor mobile devices over short ranges. The paper has been derived from my Mphil thesis based on streaming Voice over Internet Protocol over Bluetooth Links. One can imagine a scenario of a person with a Bluetooth enabled mobile telephone streaming Moving Picture Expert Group-1 Layer 3 (MP3) music files to their mobile from a nearby access point in a caf, bus, pub, taxi, train et al. Each file uploaded would be stored in the mobile phone limited by storage. Prior to downloading a MP3 file a micro payment could be made to purchase the track. The individual could also listen to music without making any payment and make voice over Internet Protocol (VoIP) voice calls at a fraction of the cost of carrier networks.

transceiver (transmitter and receiver) operating at up to 1Mbps. Voice traffic is normally carried using synchronous connection oriented links (SCO) as specified by the headset [3] and cordless phone profiles [4] using a 64Kbps channel with a guaranteed quality of service for both incoming and outgoing streams. Streaming high quality music of compact disk quality requires a greater bandwidth than SCO links can provide. The Bluetooth connection type capable of higher bandwidths is the Asynchronous Connection-Less (ACL) link.

2. Bluetooth Profiles
The Bluetooth profiles are very significant and can be likened to a blueprint to develop an interoperable application that can be used with other devices implementing the same profile on any hardware. The profiles which are able to support audio, especially streaming, are the Advanced Audio Distribution Profile [16] (A2DP), Local Area Network profile [6] (LAN) and Bluetooth Network Encapsulation Specification [7] (BNEP).

1. Introduction
Bluetooth [1,2] is a flexible and capable technology for providing short-range radio communications between devices in an ad-hoc manner using the 2.4GHz band. Bluetooth networks introduce new and novel methods for creating ad-hoc networks based on a master and slave relationship between devices. Each Bluetooth device is a peer and a device that initiates an inquiry, is normally the master however, after paging the master may be switched to a slave. A master device can have up to seven active slaves. All the slaves within a piconet can only communicate with the master and not with any other slave. A master device can connect to up to 255 devices, which may be connected to other networks or in one of the modes (Active, Park, Hold, Sleep). The current Bluetooth networking topology includes the creation of piconets and scatternets. Typically, most mobile devices are low powered and have limited power storage. Here Bluetooth is ideally suited as a low power radio

2.1. The Local Area Network Access Point Profile


The LAN profile specifies the requirement of using LAN services by implementing the Point-to-Point Protocol [8] (PPP) over a serial port emulation (RFCOMM) channel. The profile specifies two components one being a client accessing the services of a network by the means of using a gateway known as an access point. This is normally hard wired to the network. In the profile terminology the client device is referred to as the device terminal (DT) and the access point as the LAP. Typically, using this profile a DT will use the services of the LAP transparently. Hence, a VoIP [9] application can be a generic application capable of running in a cabled and wireless environment. The profile uses asymmetrical links with data high (DH) 3 and 5 slot packets maximising the available bandwidth. No forward

Proceedings of the International Conference on Information Technology: Computers and Communications (ITCC03) 0-7695-1916-4/03 $17.00 2003 IEEE

error correction (FEC) [10] is used when sending the payload in ACL packets other than cyclic redundancy check (CRC). If more than one DT is connected to the LAP, the available bandwidth is reduced for each device in the piconet. However, if a low bit-rate codec is used and the maximum number of DT are connected to the LAP, theoretically sufficient bandwidth should be available to each DT to participate in a full duplex conversation notwithstanding network delays and possible interference. The LAN profile is based on the serial port profile and inherits the attributes and procedures of profiles below it. See Figure 2.1.1.

procedures to set up a PPP link and thus allows IP packets to flow across the link.

Figure 2.1.2: LAN Profile Stack Requirements Source Bluetooth Profiles Specification 1.1 K:6

2.2. The Bluetooth Network Encapsulation Specification (BNEP)


The Bluetooth SIG [13] have a working Group called the Personal Area Networking Group (PAN) developing standards, particularly the Bluetooth Network Encapsulation Specification (BNEP) revision 0.95a [7]. The specification describes the procedures and process to send common networking protocols such as IP datagrams over Bluetooth links. The packets traverse each stack layer and inturn a header is added onto the original packet. The packet is channelled through the Ethernet Frame layer and finally through Bluetooth Logical Link Control and Adaptation Protocol (L2CAP) link layer. The application on the receiving side processes the packet and converts it back into audio speech. The Bluetooth link implementation is based on the BNEP defined by the Bluetooth specification, currently in draft form.

Figure 2.1.1: LAN Profile in context to other profiles


Source Bluetooth Profiles Specification 1.1 K:6

The layers of interest to support IP [11,12] voice calls are the higher layers, namely RFCOMM and PPP. The LAP is typically a peer device in Bluetooth terminology and when a DT attempts to make a connection with the LAP the DT is initially the master and the LAP the slave. The LAP changes the relationship to one of master for the LAP and the DT to a slave. This also applies to other DT attempting to establish a connection with the LAP. The PPP is normally used by modems over dial-up connections to Internet Service Providers (ISP) or Remote Access Servers (RAS). The modem may be connected to a Public Switched Telephone Network (PSTN), cable modem, et al using PPP and its variations. The LAP specifies three distinct roles for using PPP. These are: LAN Access for a single Bluetooth device. LAN Access for multiple Bluetooth devices. PC to PC (using PPP networking over serial cable emulation).

2.3 The Advanced Audio Distribution Profile


The Audio Video Working Group [25] defined a profile with a set of procedures to stream isochronous high quality mono or stereo audio directly over a Logical Link control and Adaptation Protocol (L2CAP) to another device. A source device (SRC) could stream Real Time Protocol [15] (RTP) packets to a sink device (SNK) across the L2CAP channel at high quality using mandatory or user defined codecs. As shown in figure 2.3.1 below the profile is dependent on the Generic Audio Profile (GAP), Generic Audio/Video Profile Distribution Profile (GAVDP) [14] and the Audio/Video Distribution Transport Protocol Specification (AVDTP) [5].

In figure 2.1.2 the stack layers used for both the DT and LAP are illustrated along with the flow of data and interactions between them. The profile defines the

Proceedings of the International Conference on Information Technology: Computers and Communications (ITCC03) 0-7695-1916-4/03 $17.00 2003 IEEE

Generic Access Profile Generic Audio/Video Distribution Profile

3. Bluetooth Link Types


The Bluetooth system supports two types of links between master and slave devices. They are known as Synchronous Connection-Oriented Link (SCO) and Asynchronous Connection-Less Link (ACL). The SCO link is a point-to-point link between a master and single slave in the piconet and the ACL link is a point-tomultipoint between a master device and up to seven slaves in the piconet.

Video Distribution Profile Advanced Audio Distribution Profile

Audio/Video Remote Control Profile

Figure 2.3.1: The A2DP in context to other profiles As shown in figure 2.3.1 the Advanced Audio Distribution Profile [16] (A2DP) is based on the GAVDP, which uses the AVDTP as the underlying transport mechanism for streaming audio. The AVDTP can provide basic services such as signalling and stream management and other services including compression of RTP headers, performance statistics, recovery service and multiplexing. Unlike the BNEP profile it does not use the User Datagram Protocol [17] (UDP) or IP packet headers across the L2CAP link, moreover it reduces the bandwidth and processor latency when compared with a codec using the LAP profile. The positioning of the AVDTP is shown in figure 2.3.2 in relation to the Bluetooth stack. The application provides a user interface and may have management controls accessible to a user.
Audio Source Side Application Audio Sink Side Application

3.1. Synchronous Connection-Oriented (SCO)


The SCO link is a symmetrical point-to-point circuit switched connection and is typically used in time sensitive applications such as voice transmission. A SCO link reserves two consecutive time slots one for transmission (TX) and one for reception (RX) at fixed intervals. An example of a SCO link may be between a headset and cellular handset. A master device can support up to three SCO links to a slave or to different slaves outside its piconet. The slave can support three SCO links from the same master or two links from different masters in their respective piconets. A SCO link is established between a master and slave by sending an SCO setup message through the link manager protocol. The message contains timing information such as the SCO interval between packets and offset to specify the reserved time slots. A symmetrical link is defined as a uniform bandwidth for both transmission and reception i.e. 64Kbps for voice in both directions

AVDTP

SDP

AVDTP

SDP

3.2 Asynchronous Connection-Less (ACL)


An ACL links can support both symmetrical and asymmetrical [23] packet-switched connections between master and slaves in a piconet. Only one link can exist between a master and slave in a piconet. ACL packets can be transmitted as broadcast packets to all slaves in a piconet when a slave has not specifically been addressed to receive the packet. An Asynchronous connection implies a high download speed and a slower upload i.e. sending data at 128Kbps and receiving data at 732Kbps.

LMP

L2CAP

LMP

L2CAP

BaseBand

BaseBand

Figure 2.3.2: The AVDTP position in the protocol stack The SRC and SNK on each peer device sharing the identical codec could simultaneously initiate a full duplex voice call. An input source such as microphone would capture the audio signals and be compressed by the codec and transported as RTP packets. Each stream may have its own L2CAP channel as incoming and outgoing packets.

Proceedings of the International Conference on Information Technology: Computers and Communications (ITCC03) 0-7695-1916-4/03 $17.00 2003 IEEE

4. Security
In any transaction the user of the system should be authenticated and authorised prior to downloading or listening to any audio files. The audio stream should be encrypted to prevent any casual hacker from picking up the packets and storing on a computer device. Bluetooth supports three levels of security. Security mode one as defined by the GAP profile [18] includes authorisation, authentication and encryption of data on ACL links. Primarily of interest is encrypting traffic over the wireless link. similar to the IP protocol. However, its main difference lies in assigning port numbers to each packet. Therefore an application can send voice packets to a unique port, and as the packet traverses the Transmission Control Protocol/Internet Protocol [20] (TCP/IP) stack, it is then sent to the receiver part of the application. This is known as demultiplexing. Being an unreliable and connectionless protocol, voice packets sent by an application do require a form of reliability this is where the RTP protocol is used. It time stamps and numbers each packet, which subsequently can be placed in queue and played in sequence at the receiving end. A UDP header is 12bytes and can be compressed to maximise bandwidth usage. Finally the data-link layer; in this context Ethernet adds its own header and thus the packet increases exponentially. Higher quality audio files such as MPEG-1 Audio layer 3 (MP3) can be encapsulated in a RTP packet and sent across a L2CAP link using the A2DP.

5. Codecs
The A2DP profile specifies four codecs, subband codec (SBC), Moving Picture Expert Group 1,2 Audio (MPEG), MPEG-2,4 Advanced Audio Coding (AAC) and ALTRAC codecs. Each codec has its own unique advantages and disadvantages regarding bandwidth, quality and processing delays. The codec of interest supporting high quality voice over a Bluetooth link is the SBC; this has been successfully demonstrated by [19] streaming music from a compact disk player across a Bluetooth link to a set of speakers in real-time. Low bit rate codecs such as the G.723.1 [23] provide toll quality speech using low rates of 5.3Kbps (Algebraic-Code Excited-Linear-Prediction) to 6.3Kbps (Multi-PulseMaximum Likelihood Quantisation) and are ideal for wireless environments where bandwidth is at a premium, however the main weakness is an increased algorithmic delay of 37ms including 7.5 seconds for its look ahead buffer.

7. Summary
Bluetooth is an exciting technology for mobile devices and serves the purpose of streaming audio files and making VoIP calls from a mobile device. The success of designing and developing a streaming mobile device is largely dependent on the implementation of the Bluetooth profile. The implementation determines the effectiveness and efficiency of an application to stream audio. In this paper the BNEP, LAN and A2DP profiles are selected for carrying audio content. High quality audio streams require a greater bandwidth than carrying toll quality voice and selecting an appropriate codec is of paramount importance, especially in a wireless environment. Other important features may be addressed by later Bluetooth specifications, are hand-off support [21], to cater for roaming between access points and greater bandwidth to support streaming of video and audio content. As an enabling technology Bluetooth is on the verge of a revolution in personal area networks with its short-range and low power requirements. Without ease of use and novel applications to appeal to market segments Bluetooth will never achieve its goals; it seems that Bluetooth will deliver and penetrate the market to deliver ubiquitous computing to the masses.

6. Streaming Audio
As outlined in the previous sections, the first requirement is selecting a Bluetooth profile to use as the specification to develop an application. In most mobile devices many profiles are implemented to support as many services that are required. To implement audio streaming the A2DP is ideal for asymmetrical streaming and the BNEP profile for symmetrical data streams; voice over IP and Internet access. Streaming audio to a mobile device requires the mobile device to incorporate flash memory storage capable of storing MP3 files [22]. There are many variations of Voice over IP architectures such as by [19] advocating a popular and common VoIP architecture based on RTP/UDP/IP. The UDP protocol is a connectionless and unreliable transport service, encapsulating RTP packets with its header;

References
[1], J.C. Haartesen, The Bluetooth Radio System, IEEE Journal, February 2000

Proceedings of the International Conference on Information Technology: Computers and Communications (ITCC03) 0-7695-1916-4/03 $17.00 2003 IEEE

[2], Nathan Muller, Bluetooth Demystified, 2001, McGrawHill [3], Bluetooth Special Interest Group, Specification of the Bluetooth System: Part K:6 Headset Profile, version 1.1, 2002 [4], Bluetooth Special Interest Group, Specification of the Bluetooth System: Part K:3 Cordless Telephony Profile, version 1.1, 2002 [5], Bluetooth Special Interest Group, Audio/Video Distribution Transport Protocol Specification, version 1.00a Draft, 2002, Bluetooth Audio Video Working Group [6], Bluetooth Special Interest Group, Specification of the Bluetooth System: Part K:9 LAN Access Profile, version 1.1, 2002 [7], Bluetooth Special Interest Group, Bluetooth Network Encapsulation Protocol (BNEP) Specification, version 0.95a Draft, 2001, Bluetooth PAN Working Group [8], W. Simpson, C. Kale, The Point-to-Point Protocol, 1994, Network Working Group, RFC 1661 [9], Uyless Black, Voice Over IP Second Edition, 2002, Prentice Hall PTR, ISBN: 0-13-065204-0 [10] David Kammer etl al, Bluetooth Application Developers Guide, 2002, Syngress Publishing Inc [11], Uyless Black, Internet Telephony Call Processing Protocols, 2001, Prentice Hall PTR, ISBN: 0-13-025565-3 [12], Henning Schulzrinne, IP Networks, 2000, Dept of Computer Science, Columbia University [13], Bluetooth Special Interest Group, PAN Working Group, http://www.bluetooth.org/member/pan-charter.htm

[14], Bluetooth Special Interest Group, Generic Audio/Video Distribution Profile, version 1.00a Draft, 2002, Bluetooth Audio Video Working Group [15], H. Schulzrinne, GMD Fokus, S. Casner, RTP: A Transport Protocol for Real-Time Applications, 1996, IETF, RFC 1889 [16], Bluetooth Special Interest Group, Advanced Audio Distribution Profile, version 1.00a Draft, 2002 [17], J. Postel, User Datagram Protocol, August 1980, ISI, RFC 768 [18], Bluetooth Special Interest Group, Specification of the Bluetooth System Profiles v1.1, 2001 [19], pcstats, Philip Implements Wireless Streaming Audio, December2001,pcstats.com, shttp://www.pcstats.com/releaseview.cfm?ReleaseID=763 [20], T. Socolofsky, C. Kale, A TCP/IP Tutorial, 1991, Network Working Group, RFC 1180 [21] C. Mc Daid, Routing Connections In Bluetooth, Master Thesis, 2000 [22], William E. Witowsky, IP Telephone Design and Implementation Issues, 1998, Telogy Networks Inc [23], International Telecomminications Union, Dual rate speech coder for multimedia communications transmitting at 5.3 and 6.3kbit/s, Recommendation G.723.1, ITU-T, March 1996 [24], M.Kazantzidis, Adaptive Multimedia in Wireless IP Networks, PhD Dissertation, 2002 [25], Bluetooth Special Interest Group, Audio Video Working Group

Proceedings of the International Conference on Information Technology: Computers and Communications (ITCC03) 0-7695-1916-4/03 $17.00 2003 IEEE

You might also like