Bluetooth Inmic 04

download Bluetooth Inmic 04

of 6

Transcript of Bluetooth Inmic 04

  • 7/29/2019 Bluetooth Inmic 04

    1/6

    Application Development for Bluetooth Em bedded SystemsAbu Ahmed Sayeem Reaz, Rajibul Alam, Bakhtiar Kamal and Fakhrul AlamDepparfmento Comp uter Science and Engineering, North South Univevsiiy12 Kemal Ataturk Avenue, Banaei, Dhaka-1213, [email protected], [email protected],[email protected],[email protected]

    AbstractBlirctooth is a wireless technology thal enables a

    wireless device to communicate in the 2.4 GHzIndustrial. Sccicntijic and Medical (ISM band It ha sbeen specificully designed as a low cost. low powerradio technology. which is particularly suited jb r theshort r u n g Personal Area Network (PAN)application. In this paper we develop an applicationfor a Bluetooth system thut will help create a smartbillboard [ha { utilizes [h e individualism of consumerbehavior. The essential parts of ihe developmentincludes the Graphical User Interface (GUI) basedapplication that runs O H ihe mobile devices and theapplication equipped wiah advertisement presentationand informarion exchange capability. Th ecommunication between the two major components ofthe system is hased on Bluetooth.

    1. Introduction

    Bluetooth is steadily gaining popularity as timeprogresses, the importance of application developmentof Bluetooth is becoming apparent [3]. In this paper anapplication for Bluetooth embedded system isdeveloped while addressing some core requirementsof software engineering processes. The developedapplication intends to create a smart billboard thatutilizes th e individualism of consumer behavior. Th eessential parts of the development includes theGraphical User Interface (GUI) based application thatruns on the mobile devices and the applicationequipped with advertisement presentation andinformation exchange capability that reside in thenetwork. The communication between the two majorcomponents of the system is based on Bluetooth. Th eClient Application is targeted to run on a Bluetoothenabled mobile device, e.g. a cell phone. Th e ServerApplication is to run on a Bluetooth enabledIntelligent Display Device. Figure 1 describes theworking principles of different components of theapplication.

    Wireless Personal Area Network (WPAN) [ I ]aims to facilitate the comm unication of devices withina personal operating range of ten meters. It is intendedto be a short range, low power and lo w coststandardization that supports both voice and datacommunication based on ad hoc topology [I] . IEEE802. I 5 Working Group develops WPAN consensusstandards for short distance wireless networks.Bluetooth is the open industry specification for short-range RF-based connectivity fo r portable personaldcvices. The IEEE Project 802.15.1 ha s derived aWPAN standard based on the Bluetooth v l .1Foundation Specifications. Bluetooth is intended towork as data or voice access points, cablereplacements or f o r personal ad hoc connectivity [ 2 ] .

    Bluetooth has emerged as the dominanttechnology in short range wireless networks. As

    Figure 1: Principles of the ApplicationThis is how the rest of the paper is organized.Section two has an overview of Bluetooth, sectionthree illustrates the deve loped application, section fourdescribes the development tools, section five explains

    0-780 3-8680-9/O4/$20.0002004 IEEE. INMIC 2004

    mailto:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]
  • 7/29/2019 Bluetooth Inmic 04

    2/6

    the communication networks, section six describes thefunctionalities of the developed application andsection seve n concludes this paper.2, Bluetooth Overview2.1 Bluetooth Technology

    Bluetooth is a short range, low cost and IQWpower wireless communication stan dard. It overcomesthe liniitations of Line of Sight and One-to Onecommunication of its possible competitor Infra-Red(IR). Sluetooth operates in the 2.4 GH z Industrial,Scientific and Medical (ISM) band at a maximum datarate of 720 Kbps [ I ] . It uses Frequency HoppingSpread Spectrum [ I ] that divides the frequency bandyielding 79 channels. The modulation used is aGaussian-shaped binary Frequency Shift Keying(GFSK) modulation scheme. Very low cost non-coherent FM receivers can be used for reception, Itsupports both voice an d data oriented communication.Voice oriented service request is handled by acomplex negotiation process to ensure Quality ofService (QoS). Data oriented service request ishandled by Carrier Sense Multiple Access withCollision Avoidance (CSMAKA). It has provision forboth symmetric and asym metric data transmission [4].Figure 2 describes the Bluetooth Protocol Stack.

    Figure 2: Bluetooth ProtocoI Stack

    The elementary Bluetooth network, termed as thePiconet, is an ad hoc connection between at feast twodevices [ 5 ] as shown in Figure 3. The connectioninitiator is a master and others are slaves. In most ofthe cases, the connections are point to point. masterscan have simultaneous connections with seven slaves.When a device is connected to two or more Piconet, itis known as the Sca tternet [SI as shown in figure 3.

    Figure 3: Piconet (left) and Scatternet (right)2. 3 Bluetooth A pplication Domains

    Bluetooth has three broad categories ofapplication domain as described next.2.3.1 Voice/Dsta Access Points. Bluetooth enableddevices can work as voiceidata access points and canconnect computing devices to communicating devicesvia a secure wireless network. It may help shareIntcrnet connection with another mobile device.Bluetooth m ay be used as public access points as well.Bluetooth enabled m obile devices may use the Intemetwhile within tea m eters of the public access points [6].2.3.2 Peripheral Interconnects. The second categoryof application, peripheral interconnects, involvesconnecting multiple devices. All the peripheraldevices of a computer might be connected to the PCover a wireIess link reducing cost and wire-hazards. Ifequipped with the proper application, Bluetooth ca nalso be used for proximity security devices where t w odevices need to be within ten meters of each other toget into the security system [6].2.3.3 Personal Area Network. Personal AreaNetwork may vary from product searching in a supermarket to personalized advertisement system.Whenever two Bluetooth enabled devices are withinten meters, they can sh are many resources. Using thatattribute, applications that might provide some simplebut very effective value added service to the user ofthe Bluetooth en abled device s can be developed [6].

    2.2 Bluetooth Network Formations

    245

  • 7/29/2019 Bluetooth Inmic 04

    3/6

    3 , The DeveIoped ApplicationThe application is engineered through a prototypedevelopment process model. It falls into the thirdcategory of application domain for Bluetoothdescribed in section two, It can be considered as a

    third party software application that takes advantageof pre-qualified Bluetooth features of a productthrough the Application P rogramm ing Interface (APT).Th e application does no t incorporate ne w protocol orprofile functionality. Usu ally new Bluetooth protocolsor profiles are only possible for the manufacturer ofthe product. As it is no t the case, the development ison the Bluetooth Stack and intends to use the existingresoiirces to create an intera ctive application that iscapable of addressing some real-life ma rket needs.T!ie application is developed in a client-servermodel. The proper implementation requires both thecomponents though they might work independently.The client application assists the user to select theirpersonal preference, i.e. the things they are most likelyto buy. The Server Application looks or th e clientapplication within tenmeters. If it tinds one, it gets thepreferences from the client and shows advertisementaccordingly.3.1 The Client Application

    The client application is designed to ru n on a cellphone that has Bluetooth embedded In it. Theapplication was developed for a standard platform,Symbm Opcratrng Sy s t e m [7] Figure 4 rllustratcs th eportion of Symbian Stack that the client applicationuses

    Figure 4: Th e Client Application's utilization ofSymbian OS StackThe desired program contains some consumerpreferences which can be entered and modified by th e

    user(s). The Client Application provides a simple.easy-to-use combo-box type user interface where theuser is capable of selecting up to three preferences.Whenever this Mobile device conies within ten metersof the server, it sends the preference information to theserver application. The communication isautomatically initiated whenever th e Client comeswithin ten meters of the Server.3.2 The Server Application

    The server appIication runs on a BluetoothEnabled Intelligent Advertisement System. Th eapplication resides in a Stationary System, i.e. anelectronic advertisement system or a PC and operateson a standard ope rating system like Linux.Figure 5 shows the interfacing of a Bluetoothdevice with an htelfigent Advertisement System an dho w the Server Application is interconnected withdifferent layers of the host system. The desiredprogram rontains some preinstalled advertisement inthe database that ca n be entered and modified by theadministratorrs).

    Appgca,jo" ." _ "_ .... "...... ..................... _ ...... "."_......Save ApplicatiM_I_

    Kernel

    5 tv .~~RF Bu s Driver (RFBD)............................

    Figure 5: The Server Application'sinterconnection w ith the Hos tWhenever a mobile device comes within thecommunication range of the server, it reccives thepreference information from the mobile device and

    246

  • 7/29/2019 Bluetooth Inmic 04

    4/6

    performs a search through the database. Then theserver decides its action on the basis of received datafrom rhe client and the search result and shows theadvertisements on the electronic billboardaccordingly. The communication is one way; from theclient to the server. The response of the server is notdirectly to the client. Rather it responds through thedisplay system that operates o n the instructions givenfrom the server. At th e initial Icvel, the applicationruns in a PC. But for practical purposes, theapplication would be put within an electronic controlbo x that would allow the application to actually showthe advertisements though some other electronicdisplay system.4. Development Tools4.1 D e v e l o p m e n t an d Testing H a r d w a r e

    The hardware devices should address three issues:a Graphical User Interface (CUI) based interactiveprocess at the client end, a Bluetooth basedcommunication between the client and the server andthe presentation of advertisement through somedisplay system at the server end.

    At the client side, the hardware should be amobile device that operates on some standard platformlike Symbian OS, has Bluetooth radio built in andprovides possibilities of application development onthat device. The device should also be physicallyavailable for testing and development process andwidely used i n the market. The development teamselecled Nokia 7650 for that purpose as i t meets all thecriteria. Selection of this particular celi phone is alsoinfluenced by the availability of SoftwareDevelopment Kit (SDK) for the platform through theInternet without any cost during the time of thedevelopment.

    A t the server side of the application, necessitiesinclude a machine that is capable of holding andprocessing a data base, capable of hosting the serverapplication and sending instructions to the displaysystem. At the initial level, due to availability and easeof implementation, the server machine is selected tobe a Personal Computer (PC).

    For communication between the client and theserver device, Bluetooth radio should be available atboth the components. The client device ha s Bluetoothradio embedded in it. But for the server device,physical Bluetooth adapter that enables Bluetoothcommunication from and to the server machine is alsoessential. The Bluetooth adapter or dongle interfaceswith the PC via Universal Seria l Bus (USB) port and

    implements the part of the protocol stack that isobligatory for cominunication o f the client and theserver side of the application.4.2 Development Environment4.2.1 Client Application. Nokia 7650 is categorizedas a Serics 60 mobile device with a software platformdesigned for hand operatcd snrarfphoms with a largecolor screen an d an intuitive User Tnterfxe (U). Theplatform supports a variety of development choicesincluding C++, Java and WML. As the application isintended to be platform independent, Java comes as anobvious choice. The difficulty was the unavailabilityof the APIs that enables the application tocommunicate over Bluetooth. The ReferenceImplementation of the Bluetooth API for JZME wasunavailable. As a result, the cho ice was shifted to C++as Nokia provides all the APIs to use its networkingfeatures including Bluetooth in their SDK. Though theapplication development is a bit more cumbersomeand time consuming, the dev elopme nt team had to relyon C++ for the development of the client sideapphca tion [8].4.2.2 Server Application. The server applicationshoutd be able to communicate with and receive datafrom the client application. The Server Sidzdevelopment platform chosen was Linux because itha s a free Bluetooth stack, BlueZ [ 9 ] that helps in thedevelopment of the server application. I t should alsobe noted that Windows platform also has Bluetoothstacks but development using those stacks requirepurchasing SDKs from th e manufacturers.Application development using the BloeZ stackrequires using the JBueZ API [9]. JBlueZ is a Javapackage which interfaces with the Blue2 Bluetoothprotocol stack for Linux, providing a simple means inwhich to add Bluetooth functionality to Javaapplications. It is designed to bring open sourceBluetooth support to J2SE and J2EE without anyreliance on proprietary third-party protocol stacks.5. Comm unication and Network

    As the application is based on a client-servermodel, there is a network component involved. Thecommunication behveen the client and the server isbased on Bluetooth.

    24 7

  • 7/29/2019 Bluetooth Inmic 04

    5/6

    6.1 Client Application

    Figure 6: Communication Network o f th eApplicationA s described in section three, the server woulddeclare an ad hoc network within the ten meter rangeand declare itself iis the master. Whenever a clientdevice moves within the range, it would try toestablish an active connection with the server an d be aslave. This can be done w ithout any active action fromthe user. Considering the poss ible deploym ent strategyof the application, the network topology would be asimple Piconet.Figure 6 elaborates th e different steps in

    communication between the server and clientapplication and the network form ation.6. Functionalities of the Application

    The functionalities of the client application arequite different from the server one. Even then,combined togethcr, they are a complete systcm as theserve: application depends on th e information fromthe client application running in mobile devices andthe client application remains idle until and unlesspaired with a server application. When the client andserver program come within ten meters of each other,the network is fonned and the communication beginsas elaborated in section five. When the necessaryinformation is sent to the server program, then theactual functionalities and their implications for baththe application beco mes apparent.

    The Client application runs on top of Nokia 7650.A complete and point-and-click based operatingsystem Symbian controls the functionalities andoperations of the device. Just like the desktop of anyCUI of an operating system for a PC , it has an iconbased menu. The user can use the joystick to browsethrough the icons and select the appropriate icon. Theclient application is represented as an icon namedBTBD499 on the menu. When the user selects theicon, the client program is launched. Then, the userwill be presented with three options from whichheishe can select hisiher preference. When the userintends to select a particular choice, it would takehisher to another combo-box type menu from whichthe user can select the preference from a predefinedlist. The user cannot selec t second or third preferenceunless the previous one is already selected. The userhas several options among which clearing and savingthe choices are important ones. If the user intends todo it, heishe can simply se lect the appropriatc option.Figure 7 shows how the CUI is used to save userpreferences in the client application.6.2 Server A pplication

    The server spplication responds via a displaydevice. It runs on a Bluetooth enabled intelligentadvertisement system. This application carries adatabase that holds a pool of advertisement. When theuser selects the preferences, it is saved as an encodedpreference string. Whenever any mobile device thatha s th e client application running appears within tenmeters of the server the preference string isautomatically sent to the server. The servcr decodesthe string and finds the preferences. Then it searchesthrough the database and looks for the appropriateadvertisement. Then the server instructs the displaysystem to show the advertisements. The user isallowed to choose up to three prcferenccs. Theadvertisements are shown in the order of preference.The ads are rotated until the user moves away fromthe range of the network or another user enters thenetwork. If there are multiple requests, it operates onthe first-come-fist serve basis. Refer to figure 1 toget an overview of the combine d functionality of th eapplications. Figure 8 displays a sample advertisementdisplayed through the server application.

    248

  • 7/29/2019 Bluetooth Inmic 04

    6/6

    Clear N I Cho icesClear C ho i c es 1

    Figure 7: The Graphical User Interface a t theClient Application

    7.Conclusion and Future WorkIli this paper we have successfully developed aBhetooth based smart billboard. Very similarapplication might be developed for this application

    domain (section 2.3) that would have very highdemand in terms of consume r requiremen ts. Not onlythose, other domains demand high qua lity applicationsas well. Very similar application can be developed toguide cell phone holders to the right direction inairports or big departmental stores according to theirdestination or necessity. Electronic appliances havingBluetooth support at home o r office can be adjustedaccording to personal preferences. These applicationswould be just some minor rcadjustmcnt of thedeveloped application at least in terms of the Clientside and the communication part. The developedapplication however has some room for expansion.The client side of the application may include a

    Bluetooth AP I that would Interpret the service requcstfrom the client directly and rea ct accordingly.

    Figure 8: The Advertisement from the ScrverAcknowledgement

    The authors would like to acknowledge K AsifHasan of Spectrum Engineering Consortium Ltd.,Bangladesh for his valuable advice and guidance.8. References[ I ] Bluetooth Specifications, IEEE Standard for 802.15.1-2002.[2] Chatschik Bisdikian, An Overview of th e BluetoothWireless Technology, IBM Research Repot-!, June200 .[3] J. Haartsen, et al., Bluetooth: Vision, Goals, an d

    Architecture, Mobile Computing and Communica/ionReview,pp. 38-45, ol. I , No . 2, October 1998.

    [4] Tom Siep, IEEE 802.15 1 Tutorial, Texas Instruments, nMS PowerPoint from the World Wide Web athttp ://grouper.eee. org/groups/802/1 /pub/ 200 1/Jan0 1i01046rlP802-15-WG-802-15-l-TG 1-Tutorial.ppt

    [SI Michael Millcr, Discovering Bluetooth, ConnaughtPlace, New Delhi: BPB Publications,2001.[GI James Kardach, Bluetooth Architecture Overview,Intel Technology Jozwnal, M ay 5, 2000[7 ] Symbian OS, from the World Widc Web athttp://www.symbian.condabout/symb-os.html{SI Forum Nokia, Choosing th e Riglit Development

    Environment for Series 60 Application Development,Version 1.0: une 7 , 2002.[9] JblueZ Javadoc from the World Wide Web athttp://j blucz.sourceforge.net/lO/javadoc/index.htmI

    249

    http://www.symbian.condabout/symb-oshttp://j/http://j/http://www.symbian.condabout/symb-os