Wireless Sensor Network with Bluetooth - CiteSeerX

4 downloads 963 Views 32KB Size Report
Wireless Sensor Network with Bluetooth. Aleksandar Rodzevski , Jonas Forsberg and Ivan Kruzela. Intelligent Systems Group. School of Technology and ...
Wireless Sensor Network with Bluetooth Aleksandar Rodzevski , Jonas Forsberg and Ivan Kruzela Intelligent Systems Group School of Technology and Society University of Malmö, Sweden [email protected]

Abstract An ongoing research project at the Intelligent Systems Group at Malmö University is described. A prototype Wireless Sensor Network consisting of one access point and several sensor point nodes based on Bluetooth technology was developed and tested. The focus of the design work was the RFCOMM layer of the Bluetooth stack. The experience with the implementation and suitability of the Bluetooth technology for industrial applications is discussed in this report.

1. Introduction Replacement of wired connections between electronic devices with wireless connections will revolutionize the way we organize our industrial, office and home environments. The environments containing wireless networks with intelligent devices with flexible topology will contain new features that will enable innovative services and applications. At the same time they will be easy to install, configure and maintain. The Intelligent Systems Group at Malmö University, is focusing on short range wireless networks using the Blutetooth technology with the aim to develop and verify suitable components and system architectures. The scope and limitations of Bluetooth technology in industrial applications is evaluated. The Bluetooth technology is going to be included in Engineering Degree Programs at Malmö University.

standard defines a uniform structure for a wide range of electronic devices to communicate with each other. The development is driven by a group of major telecommunication and computer companies organized in the Special Interest Group (SIG) founded in 1998 [1]. 2.1. The Bluetooth Specification The current Bluetooth Specification version 1.1 is divided into two parts: •

The Core Specification (Volume I)

The Core Specification defines the radio- and the hardware oriented software protocols to ensure interoperability between devices from different manufacturers. •

Profile Definitions (Volume II)

The Profile Definitions describe standardized software applications defining messages and procedures. Presently there are 13 approved Bluetooth profiles illustrating a variety of Bluetooth applications. Since Bluetooth is constantly evolving, new profiles will be developed in the future. 2.2. The Bluetooth protocol stack Remote applications must run over identical protocol stacks to achieve universal interoperability. The Bluetooth protocol stack has similar architecture as other data communication protocols, for instance TCP/IP. Data is transferred in packages that are wrapped/unwrapped at the same stack level. The fundamental layers of the Bluetooth protocol stack are presented in the Fig. 1 below.

This paper describes an experience with a wireless sensor network consisting of one access point and several sensor point nodes. This network was implemented and tested. Ericsson and Axis off-the-shelf components were used. The link was tested for factors such as distance, disturbance by physical objects, and running time.

RFCOMM

TCS

SDP

L2CAP HCI

2.

The Bluetooth Technology

The Bluetooth wireless technology, originated at Ericsson in 1994, includes both software and hardware definitions for short range, low power, low cost radio links. The difference between the Bluetooth standard and other wireless standards is that the Bluetooth Specification includes both link layer and application layer definitions for product developers. The

Audio

Link Manager Baseband Bluetooth Radio

Figure 1: Bluetooth Protocol Stack

The Radio layer defines the frequency bands, channel arrangements and transceiver characteristics for a Bluetooth system. The Bluetooth Radio operates at the 2.45 GHz frequency ISM band, reserved for Industrial, Scientific and Medical applications. It has a total bandwidth of 83.5 MHz divided in 79 channels where every channel has a bandwidth of 1 MHz. The Baseband is responsible for establishing Radio Frequency (RF) connections with other Bluetooth devices but also to distinguish between Synchronous Connection-Oriented (SCO) and Asynchronous Connectionless (ACL) packets, which can be transmitted over the same link simultaneously. The Link Manager is responsible for link security, link set-up and configuration. This includes security aspects such as authentication and encrypting by generating, exchanging and checking of link and encryption keys and the control and negotiation of baseband packet sizes.

technology, a problem was that most micro-controllers do not have sufficient memory capacity for handling a complex Bluetooth protocol stack. But the situation is changing; emergence of small silicon chips with millions of transistors enables developers to create small, embedded devices capable of running complex wireless protocols. This development has made is possible for the Bluetooth technology to be implemented on cost-efficient embedded solutions. The number of hardware manufacturers adapting the Bluetooth technology and providing Bluetooth modules is rapidly increasing. This has made the modules reasonably cheap and is driving the market to provide smaller highly integrated products. This, on the other hand, benefits adaptive markets such as the sensor market. Hopefully, Bluetooth opens up possibilities of creating cheap, efficient, wireless sensor- and control networks as illustrated in Fig. 2 below, where a number of sensors are controlled by a strategically placed access point. Control Point

The Host Command Interface, HCI, should generally not be considered as a layer since it is more an interface than a layer. But, since most of the Bluetooth modules today have the three lower layers implemented the HCI is still considered as one of the layers. The HCI provides a common interface between the host stack and the lower, hardware-orientated layers.

. . .

The L2CAP also known as the Logical Link and Adaptation Protocol adapts upper layer protocols over the baseband and is considered as the data-link multiplexing layer responsible for the transportation of data packets. L2CAP distinguishes between higher-level protocols and segments and re-assembles packets The RFCOMM is a serial cable emulation protocol based on ETSI TS 07.10. [ref-bok] It has the same functionality as a 9pin RS 232 serial port and has a built in scheme for null modem emulation. The SDP protocol discovers provided services and allows other devices to discover which services are provide by the current device.

3. Sensor- and Controller Networks in Industry Most industrial sensors today are controlled by some kind of computer intelligence. Usually, these utilize microcontrollers handling simple instructions and passing data to a more powerful backbone where the data is handled. When data reaches the backbone it is easy to manipulate and create applications using the available computer power. To provide for the data to reach the backbone, almost all industrial sensors are connected with wires. There have been attempts to implement wireless technologies in the sensor industry such as Infra Red transmission (IR) or Global System for Mobile Communications (GSM) but with no great success. These have either been unsuitable or too expensive. The Bluetooth technology was officially released in 1998 but it took a while for embedded systems to take advantage of this

Access Point

Sensor Point

Figure 2: Wireless Network

4.

Wireless Sensor Network

The structure of the WSN, see Fig. 3, was built up in such a way that an access point, represented by an Ericsson Bluetooth module attached to a PC, served as a controller “allowing” sensors to send data on request. The sensors were implemented as true embedded objects, waiting for the access point to wake them up and start sending data.

Sensor

Microcontroller

Bluetooth modules

AIR

Sensor Point

Figure 3: Basic Configuration

PC

Access Point

4.1. Design issues Designing a Bluetooth protocol stack from scratch is time demanding and with risk of loosing important features. An open sourced Bluetooth-compatible stack was used instead. The Axis OpenBT stack [2] was chosen, being suitable due to necessary features such as protocol-layers and profiles. This stack is written in C on a Linux operative system, allowing developers to actually see how the layers are programmed.

letting it run for a longer period and putting different objects in between, tested the link to see if the data would still be transmitted. The purpose of the experiments was to establish installation guidelines. The results were satisfactory.

5. Discussion 5.1. Axis OpenBT stack

The layers and the applications of this stack were investigated. The Bluetoth compability of the stack was tested with the Ericsson Bluetooth Module ROK 101 008 / 21. A satisfying Bluetooth link was established between this stack and the Ericsson PC Reference stack, indicating that the stacks are Bluetooth compatible. A simple chat program, OpenBTChat, was written in Linux in order to understand how to write applications. Available Bluetooth components were evaluated and after identifying the most suitable solution the Axis Developer Board for Bluetooth including the ETRAX 100 LX chip was used. The tool kit was investigated and the supplied applications were tested. One promising idea is to create a scaled down Bluetooth stack based on the Axis OpenBT stack, to make it suitable for a microcontroller implementation. This has been recognized within our group. Current research is focused on this topic.

Axis is one of the companies providing an open source Bluetooth enabled (but not certified) stack. The fact that the stack is programmed in C makes it suitable for embedded solutions. The stack is implemented in separate C-files which are all linked together when compiled resulting in an executable file with the approximate size of 190k bytes. The documentation on the Axis web site is satisfactory, all kind of relevant information about the stack and its applications can be found here. The fact that the applications have a split-up functionality divided in separate files can be inconvenient when running the applications but this is a suitable way of showing how the functions above stack are handled. Worth mentioning about this stack is that it requires a great deal of knowledge about the Linux operating system. But it shouldn’t be impossible for a good C programmer who understands the Linux operating system to actually reprogram the stack to be able to fit it on a small micro-controller. 5.2. Access Point application

4.2. WSN Access Point An Access Point application was designed to demonstrate how a Bluetooth sensor neighborhood might be controlled and how to present the sensor data from an Access Point node. The application was written in Microsoft’s Visual C++ using the Ericsson tool kit. It was developed to demonstrate an access point controlling a sensor neighborhood and displaying sensor data in an active chart. The application used an ActiveX control (Microsoft Chart Control 6.0) to present the data in an appropriate way. A Windows based environment was chosen since it is convenient to create graphical designs on this system. 4.3. WSN Sensor Point The Sensor application was created to simulate a sensor on an embedded system. This sensor is controlled by the Access Point, which decides when the sensor should connect and send data. It is programmed in such way that when the Access Point establishes a Bluetooth link, the sensor enters a loop sending a sequence of numbers, and when disconnected it stops sending data and enters a low power consumption mode. This application is written in C on a Linux operating system loaded onto the Axis development board.

The application was written in Visual C++ since this makes graphical design easier, where an active graphical data chart was used for the purpose. The application is quite limited considering that the hardware module used only supports point-to-point connections and that the application does not support network use. In order to make a functional access point, it should be developed with network use in mind, where for instance users could log on to the application through the Internet. But still, this is a functional application, which is able to control and present data from one sensor at a time. A problem was to figure out how to use the ActiveX component, Microsoft Chart Control 6.0. It was easy to find documentation about the principles behind these controls describing how they were programmed, there were even numerous program examples for Visual Basic applications using this control, but hardly anything for Visual C++. It turned out to be quite difficult to use the functions in the wrapper class without proper documentation, so the higher base class was used instead. After realizing this, the ActiveX control was easy to work with and very suitable for its purpose. 5.3. Sensor application

4.4. WSN Demonstrator By using the Access Point application and the Sensor application a demonstration wireless network was created. The Access Point was able to register a number of devices while connecting to one at a time. When connected, the active chart control used in the Access Point, presented the data in a satisfying way. Changing the distance between the devices,

The Sensor application was programmed to only read/write data when a Bluetooth link was established. This was done to save the battery making the application more power efficient.

5.4. The suitability of Bluetooth for wireless sensor networks It took a little while for the public electronic market to catch up with the Bluetooth technology and to make full use of it, but it looks like it is finding ground now. This is indicated by facts such as increased information on the Internet (FAQ’s and projects), implemented into various products and use scenarios, increased number of manufacturers providing modules and chips developed specifically for Bluetooth. The technology is well defined and covers most use scenarios for short ranged cable replaced applications. The radio transmission is handled in a sophisticated way, and should be considered as a safe transmission suitable for creating wireless industrial sensor networks. But the complexity of the Bluetooth protocol stack might “hit itself in the back”; it demands a great deal of memory capacity and programming skills. Open source stacks such as the Axis OpenBT stack are solving this. The combination open sourced Bluetooth stacks and microcomputers such as the ETRAX 100LX with high memory capacity will encourage development of new embedded Bluetooth solutions.

6. Further Work Even if Bluetooth technology is well defined it has not yet had the impact it deserves in industrial applications. We believe that the main reason for this is its complexity. Due to this complexity it is not easily available for the average engineer if it needs to be adapted for a specific industrial environment. We also believe that the large amount of memory needed even for a very basic implementation on a small embedded system makes engineers look for other solutions. To what level can a Bluetooth system be scaled down without loosing its basic functionality? There is a need for research and experimenting around this question. Current work within our group is focused on implementing Bluetooth on a low cost PIC microcontrollers from Microchip.

7. Acknowledgment The authors would like to thank Prof. Jon Tapson from University of Cape Town for being a discussion partner and a supervisor of master thesis that initiated this research [3].

8. References [1] http://www.bluetooth.com [2] http://www.axis.com [3]Alexander Rodzevski, “Creating a Wireless Sensor Network using Bluetooth Technology”, TR-TS-765