| Bluetooth, as a kind of the newest global universal short-haul wirelesstelecommunication standard with the fastest development, is paid extensiveattentions to by the industries and has wide and promising potentials in thefuture. According to Bluetooth latest announced blueprint by SIG, Bluetoothwill have the fastest data speed, the lowest power consumption, the bestsecurity and the highest QoS(Quality of Service). These superior charactersare helpful for Bluetooth to consolidate its position of the applications in PC,mobile phones and automotives. Furthermore, these characters will helpBluetooth break through the fields of the industrial sensors, homeautomatization and security.Especially in the field of mobile telecommunication, Bluetooth has beena basic configuration in the high-end mobile phones. We are sure that in thenear future, all the high and medium-end mobile terminals will be configuredwith Bluetooth.The author of the paper is always working on the research and design ofthe Bluetooth application on a certain smart-phone software platform in thelatest years, which adopts Linux, and QT, which is a famous GUIdevelopment tool. The Bluetooth system is constituted with BluetoothDaemon and many Bluetooth applications. The whole system is a typicalarchitecture of Server/Client based on local socket. This paper mainly focuseson Bluetooth Damon and Bluetooth controlling application (one of Bluetoothapplications).Bluetooth daemon is made up of system framework, timer process,serial read/write processes, profile adapters and Bluetooth stack and so on.With the development of Bluetooth technology, the available 3rd stackbecomes more and more. Additionally manufactures of Bluetooth chipsetoften provide their own or relative stack. Considering the compatibility ofhardware and software, the Bluetooth system should support differentprotocols on the architecture level. Each interface will have its own adaptor,which provides the consistent linking interface on the basis of relevantprotocols. Mobile phone processor is connected with Bluetooth chip through theserial. Serial Read Process will read data out of serial, parse every messageand dispatch to each relevant model of Stack; Then Serial Write Process willbe in charge of inputting the stack data. Timer process will provide timing service for the whole system. In orderto avoiding the frequent application and release of memory, the systemadopts dual directional queues to manage all the timers: one is idle queue, assoon as model registers, the system will assign all the timers for what themodel needs; Another one is active queue, when the system applies for atimer, it will find out one idle timers from all the idle timer queue, and alsoinsert into the active queue according to the length of time-out. Timer processis always trying to identify whether the first node in the active queue hasarrived or not. If the node has arrived, timer process will send out themessage of time-out to the model, which applies for the timer, and re-insertthe node of the timer into the idle queue again. The system architecture includes many models such as module manager,client manager, debug module, memory module, equipment manager module,message broadcast mechanism and so on. The whole Bluetooth daemon isconstituted of tens of modules. In addition, with the increments of Bluetoothapplication, the number of modules will increase. Hence we design specificmodel manager to cope with all the models, so that the system can easily andconveniently control all the functions of all the models including initiatives,reconfiguration and message distributions and so on. On the other hand, Bluetooth has many applications. Each applicationmust establish the connection with Bluetooth daemon during making using of... |