| Nowadays,with strong computing,storage and communication capabilities and built-in multi-functional sensors,smart devices have become the basic interface between user and environment.There will be massive devices connecting to each other directly in proximity area,which provide efficient social interaction and content sharing collaboratively(so-called Proximity Services,ProSe),making it possible to provide innovative services.However,it is hard to quickly develop and deploy ProSe applications because of the lack of easy-to-use development framework.Considering the issue above,the contributions of this paper lie in the following aspects:First of all,in this thesis,ProSe development framework is explicitly divided into communication layer,context layer and application layer.Each layer’s and cross-layer requirements in Prose are discussed,and two fundamental problems the ProSe development framework needs to solve are summarized: one is to design and realize multi-hop network that can run on the off-the-shelf devices;another is to integrate ProSe’s common functionalities,including multi-hop networking,and build an easy-to-use development kit.Then,a multi-hop networking based on BLE(Bluetooth Low Energy)is designed and implemented on commercial off-the-shelf smart devices,in which mesh topology and proactive routing are utilized to ensure stability,and a mechanism is designed to maintain status of nodes and links.Besides hop count,this design exploits RSSI(Received Signal Strength Indication)to evaluate route paths,and maps RSSI value to corresponding link quality level,based on which a routing policy is implemented.Second,Prose development kit(including the functionality of multi-hop networking)called BLE Mesh is designed and implemented,which is friendly to app developer,maintainer and end users: Rich APIs help developers easy to develop;Dependency inversion principle and template method pattern make modules loosely coupled and easy to maintain;Callback mechanism makes modules works together and automation processes like registration,node discovery and messaging are utilized to realize Zero-Configuration.Finally,based on the the designed ProSe development kit,two android applications are built: QuoteSendApp and MeshMessager.QuoteSendApp enables distribute emergency information,and MeshMessager is a chat App,both of which uses BLE Mesh’s functions directly.Test of these two applications proves the usability of the designed multi-hop network,also shows that it is easy to develop applications using BLE Mesh. |