Bluetooth for Ad-Hoc Networkingby Kevin Dunne, Elaine Roche, David O’Loghlin and Lewis Rhatigan
Ericsson as a method to replace cables in networks created Bluetooth in 1994. In 1998 the Bluetooth SIG was founded and it currently has over 3000 members. The principle aims of the technology were to replace wire and form short-range ad-hoc networks. Since then the bluetooth standard has blossomed so much so that it takes up over 1500 pages!!!
An ad-hoc network is one that consists of independent wireless nodes that have the ability to dynamically form connections with each other to create a network. An ad-hoc network does not require any central infrastructure and it can grow, shrink and fragment without having to make any requests or reports to a central authority. Ina bluetooth network there are two types of node: a slave and a master. Each node has the ability to be either or both at the same time.
How Bluetooth Works
Now a bluetooth network actually consists of small subnets or piconets. A piconet consists of two or more connected nodes sharing the same channel. Every piconet have one master and up to 7 slaves. There is never a direct transmission between slaves. Rather all communication goes through the master.
Two or more connected piconets form a scatternet. To connect piconets simply let them have a node in common. A node may be a slave in one piconet and a master in another. This is the basis for forming ad-hoc networks in bluetooth.
The core bluetooth protocol stack contains 5 layers. The radio and baseband layers describe the physical implementation of bluetooth. It operates on the 2.4GHz frequency. There are 79 1MHz channels and upper and lower guard bands. The technology uses frequency hopping spread spectrum for information transmission with 1600 hops per second. Each channel is occupied for 0.625ms, called a slot and the slots are number sequentially. The master in the piconet determines the frequency hopping sequence and it is a function of the master’s address. Bluetooth uses time division multiple access. There are three power classes in bluetooth:
There are two types of link between bluetooth nodes. The first is a synchronous connection orientated (SRO) link and the second is an asynchronous connectionless (ACL) link. An SRO link is a fixed bandwidth point-to-point link between master and slave nodes. The master maintains the connection by reserving slots at regular intervals. It is suitable for time bound transmissions like audio. Packets are not resent in an SRO link. A master can maintain up to 3 SRO links, while a slave can maintain 2 or 3. The maximum data rate is 64Kbps. An ACL link is a point to multi-point link between in the master and all the slaves in a piconet. Packets are transmitted in the unreserved slots and a master can transmit to a slave even if its already part of (SRO) link. Only one ACL link can exist in a piconet. Packets are retransmitted in most cases. The maximum data transmission rate is 720Kbps.
When forming bluetooth nodes form a piconet they goes through a series of states. The two major states are STANDBY- not part of a piconet and CONNECTION – device is part of a piconet. To form a piconet the master transmits an ID packet over 32 of the 79 channels. Devices in the STANDBY state periodically scan for this packet. If it hears it, the device sends its address and timing info to the master. The device then waits for the master to page it. When the master is satisfied that it has identified all the devices in its range it starts to form the piconet. It pages each device with its own device access code (DAC) using a frequency hopping sequence based on the slaves address. When the slave hears this it sends a confirmation packet. On the next slot the master sends the slave the master DAC. The slave then enters the CONNECTION state. The master does this for all the slaves in the piconet then it enters the CONNECTION state itself.
What Bluetooth Ad Hoc Networks are used for
Some of the uses for Bluetooth Ad Hoc networks include: inter-vehicle communication, BEDD ∓ the Bluetooth Umbrella Project.
BEDD uses Bluetooth wireless communications "to scan strangers' phones for their personal profiles. Once the software is downloaded into a compatible phone, it automatically starts searches for and exchanges profiles with other phones that come within a 20-meter radius."  The system launched in Singapore last year allows you to send buy-and-sell ads, dating ads, instant messages and more through your mobile phone. The application runs in the background on your phone and exchanges your profile with other phones in range. Profiles can contain info about who you would like to meet, your buy-and-sell ads, etc. If BEDD finds that a profile in range has information matching your profile, it alerts you. It also "enables free Bluetooth chat and instant messaging or regular mobile contact via SMS, MMS, Call, IM or Email".  The creators say that "BEDD is like internet matching sites, on-line chat and newspaper classifieds, only all inside your mobile phone, doing all the work for you, allowing you to meet that someone special or find that cool thing to buy or sell, all as you go throughout your day." 
Sussex University Communications Research Group have used Bluetooth Ad Hoc networks to create a system of inter-vehicle communication. Bluetooth is a good choice for inter-vehicle communication because the nodes (vehicles) are constantly moving in and out of range of the master node and local piconets. "If Vehicle A is travelling at 97 Km/h and Vehicle B is travelling at 113 km/h. The difference of 16 km/h equates to approximately 4.5 m/s. After coming into range, Vehicle B would need to travel 200m more than Vehicle A for it to exceed the Bluetooth range. Using these speed values the two vehicles would be in range for a period of approximately 44 seconds. During this time period vital information can be exchanged between the vehicles depending on the envisaged application."  Some of the applications suggested by Sussex University Communications Research Group are "real time safety critical systems as well as entertainment, and wireless communication for remote user application in the local and wide area." 
In Trinity College, the Networks and Telecommunications Research Group are running a project called Umbrella.net which "is exploring the idea of ad-hoc networks to connect people in urban space" . The idea is that temporary networks would be created when people in close proximity open their bluetooth equipped umbrellas. The umbrellas – which house the routers - are linked via bluetooth to PDAs. NTRG have written PDA applications to detect people in the ad hoc range and also those within a number of ‘hops’ away. The transitory network could be used for anything from instant messaging to filtering weather reports through the network of umbrellas. Particularly in the city, the dense canopy of umbrellas would allow information to travel large distances across the network. "We believe these transitory networks can add surprise and beauty to our currently fixed communication channels." 
Advantages and Disadvantages of Bluetooth for Ad-Hoc Networks
Ad-hoc networks can be formed using many different wireless technologies, but Bluetooth has become almost a household name in the ad-hoc networking world for the numerous advantages it offers over competing technologies.
The main reason Bluetooth is so popular for ad-hoc networks is that it was specifically designed for use in this fashion; while the likes of the 802.11 (WiFi) standard were designed to provide a replacement for wired infrastructure networks. While other networks can be configured to operate in an ad-hoc fashion, without any central "controlling" device, Bluetooth offers automatic network configuration, authentication and service discovery; thereby making setting up an ad-hoc network much simpler for the average user, who is unlikely to be familiar with networking protocols and router configuration.
Bluetooth was designed to require as little power as possible, to be implemented in the smallest possible design, and to be cheap to produce. As wireless technologies imply no fixed wired connections at all, it can be taken for granted that any devices using any wireless technology, be it WiFi, Bluetooth, GSM, etc., will be supplied by an on-board battery. WiFi and other technologies are extremely power-hungry, relative to Bluetooth – Bluetooth operates using just 2.5mW of power, compared to 100mW for WiFi ! Small, low-power, cheap devices meant that they could be integrated into just about every device under the sun allowing them to communicate with one another using a common standard.
Users of Bluetooth technologies are not faced with legal obstacles when using the radio frequencies utilised by Bluetooth devices as Bluetooth uses the unlicensed 2.4GHz ISM (Industrial, Scientific, and Medical) band. This offers users the advantage of not having to obtain licences etc from their local communications authority.
Unfortunately, Bluetooth does have some limitations. Primarily, these are to do with range and bandwidth. Bluetooth offers a range of typically 10m. While some versions of Bluetooth support much greater ranges (up to 100m), these consume far more power (up to 100mW). 10 metres was chosen, however, with some care, as it was decided that for the purposes of cable-replacement and ad-hoc networks, such a great distance between nodes was unlikely to be necessary in practice. It should be noted, however, that it is possible to communicate between distant devices if there are other Bluetooth devices in between to relay the messages.
The second downfall is the lack of bandwidth. Bluetooth is capable of transmitting and receiving data at a mere 720kbps. This compares rather poorly with the 11 and now 54mbps offered by WiFi networks . Quite often it is sufficient for the required communication, such as streaming audio and transfer of reasonably sized files (several hundred kilobytes can be transferred in a matter of seconds); but should the transfer of extremely large files be necessary, the user might be better off opting for the faster 802.11 standard.
The Future of Bluetooth Ad-Hoc Networks
Today 802.11b and g are the only real alternatives to Bluetooth. However they do not compete for the same markets as they provide much higher data rates than Bluetooth. They will provide internet hot spots to businesses and others whereas Bluetooth will be used to connect devices in a small area. The 802.11b and g peer to peer ad hoc networking is very cumbersome and Bluetooth is technically superior to them and is much cheaper which leads us to believe that Bluetooth is best suited to PANs – Personal Area Networks. The future of Bluetooth networks depends largely on more and more consumers getting interested in PANs.
The chances that Bluetooth will be a real force in the future are quite real. Bluetooth is supported by Mac OS X, Windows XP and Linux which has lead to a lot of consumers buying Bluetooth enabled products. As all the main operating systems support Bluetooth this means that manufacturers are going to be able to introduce it into their devices without any problems. This will mean that virtually any handheld electronic devices would have the ability to communicate to others near or beside them. Examples of these would be mobile phones, USB keys, PDAs, laptops etc and these would all be part of the PAN.
The PAN or Personal Area Network will be the key to the success of Bluetooth. PANs can be constantly online. This would be due to either access via a 2.5 G cellular phone and/or a wireless LAN access point. This means that there would be no restrictions to using such a network. Communication between different PAN’s is also possible and in the future the likes of participants at a meeting been able to share documents and presentations through Bluetooth will be the norm.
There is a future for Bluetooth in the Smartphones industry also. These new Smartphones that are very powerful and are beginning to appear on the market nowadays will be much more widespread in the near future. These phones implement J2ME and JSR-82 enabling MIDlets to communicate over Bluetooth links. The likes of multi-party games and other such programs on these phones are likely to become popular and Bluetooth is the perfect tool for them to communicate to each other.
The IEEE 802.15 working group is dedicated to PANs. This is essential to the existence of Bluetooth in the future. In fact the work of this task group has led IEEE to accept parts of the Bluetooth 1.1 standard as an IEEE standard which is denoted by 802.15.1. If Bluetooth is to be a force to be reckoned with in the future there are some current limitations that musty be corrected. These are things like the standard does not address routing in piconets and scatternets. It does not support multi hop multicasting and it does not fully address how to cope with mobility. Once these can be fixed the future looks promising. Bluetooth will provide many people who understand the underlying technology with opportunities in fields like education, consulting and software development and I think the future is very promising for the technology.