How Bluetooth Works






There are lots of different ways that electronic devices can connect to one another. For example:
• Many desktop computer systems have a CPU unit connected to a mouse, a keyboard, a printer and so on.
• A personal digital assistant (PDA) will normally connect to the computer with a cable and a docking cradle.
• A TV will normally connect to a VCR and a cable box, with a remote control for all three components.
• A cordless phone connects to its base unit with radio waves, and it may have a headset that connects to the phone with a wire.
• In a stereo system, a CD player and other audio devices connect to the receiver, which connects to the speakers.
When you use computers, entertainment systems or telephones, the various pieces and parts of the systems make up a community of electronic devices. These devices communicate with each other using a variety of wires, cables, radio signals and infrared light beams, and an even greater variety of connectors, plugs and protocols.
The art of connecting things is becoming more and more complex every day. We sometimes feel as if we need a Ph.D. in electrical engineering just to set up the electronics in our homes! In this article, we will look at a completely different way to form the connections, called Bluetooth. Bluetooth is wireless and automatic, and has a number of interesting features that can simplify our daily lives.
The Problems
When any two devices need to talk to each other, they have to agree on a number of points before the conversation can begin. The first point of agreement is physical: Will they talk over wires, or through some form of wireless signals? If they use wires, how many are required -- one, two, eight, 25? Once the physical attributes are decided, several more questions arise:
• Information can be sent 1 bit at a time in a scheme called serial communications, or in groups of bits (usually 8 or 16 at a time) in a scheme called parallel communications. A desktop computer uses both serial and parallel communications to talk to different devices: Modems, mice and keyboards tend to talk through serial links, while printers tend to use parallel links.
• All of the parties in an electronic discussion need to know what the bits mean and whether the message they receive is the same message that was sent. In most cases, this means developing a language of commands and responses known as a protocol. Some types of products have a standard protocol used by virtually all companies so that the commands for one product will tend to have the same effect on another. Modems fall into this category. Other product types each speak their own language, which means that commands intended for one specific product will seem gibberish if received by another. Printers are like this, with multiple standards like PCL and PostScript
Companies that manufacture computers, entertainment systems and other electronic devices have realized that the incredible array of cables and connectors involved in their products makes it difficult for even expert technicians to correctly set up a complete system on the first try. Setting up computers and home entertainment systems becomes terrifically complicated when the person buying the equipment has to learn and remember all the details to connect all the parts. In order to make home electronics more user friendly, we need a better way for all the electronic parts of our modern life to talk to each other. That's where Bluetooth comes in.
Bluetooth Basics
Bluetooth is a standard developed by a group of electronics manufacturers that allows any sort of electronic equipment -- from computers and cell phones to keyboards and headphones -- to make its own connections, without wires, cables or any direct action from a user. Bluetooth is intended to be a standard that works at two levels:
• It provides agreement at the physical level -- Bluetooth is a radio-frequency standard.
• It also provides agreement at the next level up, where products have to agree on when bits are sent, how many will be sent at a time and how the parties in a conversation can be sure that the message received is the same as the message sent.


The companies belonging to the Bluetooth Special Interest Group, and there are more than 1,000 of them, want to let Bluetooth's radio communications take the place of wires for connecting peripherals, telephones and computers.
Other Wireless Connections
There are already a couple of ways to get around using wires. One is to carry information between components via beams of light in the infrared spectrum. Infrared refers to light waves of a lower frequency than human eyes can receive and interpret. Infrared is used in most television remote control systems, and with a standard called IrDA (Infrared Data Association) it's used to connect some computers with peripheral devices. For most of these computer and entertainment purposes, infrared is used in a digital mode -- the signal is pulsed on and off very quickly to send data from one point to another.
Infrared communications are fairly reliable and don't cost very much to build into a device, but there are a couple of drawbacks. First, infrared is a "line of sight" technology. For example, you have to point the remote control at the television or DVD player to make things happen. The second drawback is that infrared is almost always a "one to one" technology. You can send data between your desktop computer and your laptop computer, but not your laptop computer and your PDA at the same time.
These two qualities of infrared are actually advantageous in some regards. Because infrared transmitters and receivers have to be lined up with each other, interference between devices is uncommon. The one-to-one nature of infrared communications is useful in that you can make sure a message goes only to the intended recipient, even in a room full of infrared receivers.
The second alternative to wires, cable synchronizing, is a little more troublesome than infrared. If you have a Palm Pilot, a Windows CE device or a Pocket PC, you know about synchronizing data. In synchronizing, you attach the PDA to your computer (usually with a cable), press a button and make sure that the data on the PDA and the data on the computer match. It's a technique that makes the PDA a valuable tool for many people, but synchronizing the PDA with the computer and making sure you have the correct cable or cradle to connect the two can be a real hassle.
The Bluetooth Solution
Bluetooth is intended to get around the problems that come with both infrared and cable synchronizing systems. The hardware vendors, which include Siemens, Intel, Toshiba, Motorola and Ericsson, have developed a specification for a very small radio module to be built into computer, telephone and entertainment equipment. From the user's point of view, there are three important features to Bluetooth:
• It's wireless. When you travel, you don't have to worry about keeping track of a briefcase full of cables to attach all of your components, and you can design your office without wondering where all the wires will go.
• It's inexpensive.
• You don't have to think about it. Bluetooth doesn't require you to do anything special to make it work. The devices find one another and strike up a conversation without any user input at all.



Bluetooth Frequency
Bluetooth communicates on a frequency of 2.45 gigahertz, which has been set aside by international agreement for the use of industrial, scientific and medical devices (ISM).

A number of devices that you may already use take advantage of this same radio-frequency band. Baby monitors, garage-door openers and the newest generation of cordless phones all make use of frequencies in the ISM band. Making sure that Bluetooth and these other devices don't interfere with one another has been a crucial part of the design process.
Why is it called Bluetooth?
Harald Bluetooth was king of Denmark in the late 900s. He managed to unite Denmark and part of Norway into a single kingdom then introduced Christianity into Denmark. He left a large monument, the Jelling rune stone, in memory of his parents. He was killed in 986 during a battle with his son, Svend Forkbeard. Choosing this name for the standard indicates how important companies from the Baltic region (nations including Denmark, Sweden, Norway and Finland) are to the communications industry, even if it says little about the way the technology works.
Avoiding Interference: Low Power
One of the ways Bluetooth devices avoid interfering with other systems is by sending out very weak signals of 1 milliwatt. By comparison, the most powerful cell phones can transmit a signal of 3 watts. The low power limits the range of a Bluetooth device to about 10 meters, cutting the chances of interference between your computer system and your portable telephone or television. Even with the low power, the walls in your house won't stop a Bluetooth signal, making the standard useful for controlling several devices in different rooms.


With many different Bluetooth devices in a room, you might think they'd interfere with one another, but it's unlikely. On the next page, we'll see why.
Avoiding Interference: Hopping
It is unlikely that several devices will be on the same frequency at the same time, because Bluetooth uses a technique called spread-spectrum frequency hopping. In this technique, a device will use 79 individual, randomly chosen frequencies within a designated range, changing from one to another on a regular basis. In the case of Bluetooth, the transmitters change frequencies 1,600 times every second, meaning that more devices can make full use of a limited slice of the radio spectrum. Since every Bluetooth transmitter uses spread-spectrum transmitting automatically, it’s unlikely that two transmitters will be on the same frequency at the same time. This same technique minimizes the risk that portable phones or baby monitors will disrupt Bluetooth devices, since any interference on a particular frequency will last only a tiny fraction of a second.

When Bluetooth-capable devices come within range of one another, an electronic conversation takes place to determine whether they have data to share or whether one needs to control the other. The user doesn't have to press a button or give a command -- the electronic conversation happens automatically. Once the conversation has occurred, the devices -- whether they're part of a computer system or a stereo -- form a network. Bluetooth systems create a personal-area network (PAN), or piconet, that may fill a room or may encompass no more distance than that between the cell phone on a belt-clip and the headset on your head. Once a piconet is established, the members randomly hop frequencies in unison so they stay in touch with one another and avoid other piconets that may be operating in the same room.
Example: Networks
Let’s take a look at how the Bluetooth frequency hopping and personal-area network keep systems from becoming confused. Let’s say you’ve got a typical modern living room with the typical modern stuff inside. There’s an entertainment system with a stereo, a DVD player, a satellite TV receiver and a television; there's a cordless telephone and a personal computer. Each of these systems uses Bluetooth, and each forms its own piconet to talk between main unit and peripheral.
The cordless telephone has one Bluetooth transmitter in the base and another in the handset. The manufacturer has programmed each unit with an address that falls into a range of addresses it has established for a particular type of device. When the base is first turned on, it sends radio signals asking for a response from any units with an address in a particular range. Since the handset has an address in the range, it responds, and a tiny network is formed. Now, even if one of these devices should receive a signal from another system, it will ignore it since it’s not from within the network. The computer and entertainment system go through similar routines, establishing networks among addresses in ranges established by manufacturers. Once the networks are established, the systems begin talking among themselves. Each piconet hops randomly through the available frequencies, so all of the piconets are completely separated from one another.
Now the living room has three separate networks established, each one made up of devices that know the address of transmitters it should listen to and the address of receivers it should talk to. Since each network is changing the frequency of its operation thousands of times a second, it’s unlikely that any two networks will be on the same frequency at the same time. If it turns out that they are, then the resulting confusion will only cover a tiny fraction of a second, and software designed to correct for such errors weeds out the confusing information and gets on with the network’s business.
Example: Half/Full Duplex
Most of the time, a network or communications method either works in one direction at a time, called half-duplex communication, or in both directions simultaneously, called full-duplex communication. A speakerphone that lets you either listen or talk, but not both, is an example of half-duplex communication, while a regular telephone handset is a full-duplex device. Because Bluetooth is designed to work in a number of different circumstances, it can be either half-duplex or full-duplex.
The cordless telephone is an example of a use that will call for a full-duplex (two-way) link, and Bluetooth can send data at more than 64,000 bits per second in a full-duplex link -- a rate high enough to support several human voice conversations. If a particular use calls for a half-duplex link -- connecting to a computer printer, for example -- Bluetooth can transmit up to 721 kilobits per second (Kbps) in one direction, with 57.6 Kbps in the other. If the use calls for the same speed in both directions, a link with 432.6-Kbps capacity in each direction can be made.
Bluetooth Specs
Here are some specification details from the Bluetooth Web site
• The devices in a piconet share a common communication data channel. The channel has a total capacity of 1 megabit per second (Mbps). Headers and handshaking information consume about 20 percent of this capacity.
• In the United States and Europe, the frequency range is 2,400 to 2,483.5 MHz, with 79 1-MHz radio frequency (RF) channels. In practice, the range is 2,402 MHz to 2,480 MHz. In Japan, the frequency range is 2,472 to 2,497 MHz with 23 1-MHz RF channels.
• A data channel hops randomly 1,600 times per second between the 79 (or 23) RF channels.
• Each channel is divided into time slots 625 microseconds long.
• A piconet has a master and up to seven slaves. The master transmits in even time slots, slaves in odd time slots.
• Packets can be up to five time slots wide.
• Data in a packet can be up to 2,745 bits in length.
• There are currently two types of data transfer between devices: SCO (synchronous connection oriented) and ACL (asynchronous connectionless).
• In a piconet, there can be up to three SCO links of 64,000 bits per second each. To avoid timing and collision problems, the SCO links use reserved slots set up by the master.
• Masters can support up to three SCO links with one, two or three slaves.
• Slots not reserved for SCO links can be used for ACL links.
• One master and slave can have a single ACL link.
• ACL is either point-to-point (master to one slave) or broadcast to all the slaves.
• ACL slaves can only transmit when requested by the master.

How BIOS Works




One of the most common uses of Flash memory is for the basic input/output system of your computer, commonly known as the BIOS (pronounced "bye-ose"). On virtually every computer available, the BIOS makes sure all the other chips, hard drives, ports and CPU function together.
Every desktop and laptop computer in common use today contains a microprocessor as its central processing unit. The microprocessor is the hardware component. To get its work done, the microprocessor executes a set of instructions known as software (see How Microprocessors Work for details). You are probably very familiar with two different types of software:
• The operating system - The operating system provides a set of services for the applications running on your computer, and it also provides the fundamental user interface for your computer. Windows 98 and Linux are examples of operating systems. (See How Operating Systems Work for lots of details.)
• The applications - Applications are pieces of software that are programmed to perform specific tasks. On your computer right now you probably have a browser application, a word processing application, an e-mail application and so on. You can also buy new applications and install them.
It turns out that the BIOS is the third type of software your computer needs to operate successfully. In this article, you'll learn all about BIOS -- what it does, how to configure it and what to do if your BIOS needs updating.
What BIOS Does
The BIOS software has a number of different roles, but its most important role is to load the operating system. When you turn on your computer and the microprocessor tries to execute its first instruction, it has to get that instruction from somewhere. It cannot get it from the operating system because the operating system is located on a hard disk, and the microprocessor cannot get to it without some instructions that tell it how. The BIOS provides those instructions. Some of the other common tasks that the BIOS performs include:
• A power-on self-test (POST) for all of the different hardware components in the system to make sure everything is working properly
• Activating other BIOS chips on different cards installed in the computer - For example, SCSI and graphics cards often have their own BIOS chips.
• Providing a set of low-level routines that the operating system uses to interface to different hardware devices - It is these routines that give the BIOS its name. They manage things like the keyboard, the screen, and the serial and parallel ports, especially when the computer is booting.
• Managing a collection of settings for the hard disks, clock, etc.
The BIOS is special software that interfaces the major hardware components of your computer with the operating system. It is usually stored on a Flash memory chip on the motherboard, but sometimes the chip is another type of ROM.

BIOS uses Flash memory, a type of ROM.
When you turn on your computer, the BIOS does several things. This is its usual sequence:
1. Check the CMOS Setup for custom settings
2. Load the interrupt handlers and device drivers
3. Initialize registers and power management
4. Perform the power-on self-test (POST)
5. Display system settings
6. Determine which devices are bootable
7. Initiate the bootstrap sequence
The first thing the BIOS does is check the information stored in a tiny (64 bytes) amount of RAM located on a complementary metal oxide semiconductor (CMOS) chip. The CMOS Setup provides detailed information particular to your system and can be altered as your system changes. The BIOS uses this information to modify or supplement its default programming as needed. We will talk more about these settings later.
Interrupt handlers are small pieces of software that act as translators between the hardware components and the operating system. For example, when you press a key on your keyboard, the signal is sent to the keyboard interrupt handler, which tells the CPU what it is and passes it on to the operating system. The device drivers are other pieces of software that identify the base hardware components such as keyboard, mouse, hard drive and floppy drive. Since the BIOS is constantly intercepting signals to and from the hardware, it is usually copied, or shadowed, into RAM to run faster.
Booting the Computer
Whenever you turn on your computer, the first thing you see is the BIOS software doing its thing. On many machines, the BIOS displays text describing things like the amount of memory installed in your computer, the type of hard disk and so on. It turns out that, during this boot sequence, the BIOS is doing a remarkable amount of work to get your computer ready to run. This section briefly describes some of those activities for a typical PC.
After checking the CMOS Setup and loading the interrupt handlers, the BIOS determines whether the video card is operational. Most video cards have a miniature BIOS of their own that initializes the memory and graphics processor on the card. If they do not, there is usually video driver information on another ROM on the motherboard that the BIOS can load.
Next, the BIOS checks to see if this is a cold boot or a reboot. It does this by checking the value at memory address 0000:0472. A value of 1234h indicates a reboot, and the BIOS skips the rest of POST. Anything else is considered a cold boot.
If it is a cold boot, the BIOS verifies RAM by performing a read/write test of each memory address. It checks the PS/2 ports or USB ports for a keyboard and a mouse. It looks for a peripheral component interconnect (PCI) bus and, if it finds one, checks all the PCI cards. If the BIOS finds any errors during the POST, it will notify you by a series of beeps or a text message displayed on the screen. An error at this point is almost always a hardware problem.
The BIOS then displays some details about your system. This typically includes information about:
• The processor
• The floppy drive and hard drive
• Memory
• BIOS revision and date
• Display
Any special drivers, such as the ones for small computer system interface (SCSI) adapters, are loaded from the adapter, and the BIOS displays the information. The BIOS then looks at the sequence of storage devices identified as boot devices in the CMOS Setup. "Boot" is short for "bootstrap," as in the old phrase, "Lift yourself up by your bootstraps." Boot refers to the process of launching the operating system. The BIOS will try to initiate the boot sequence from the first device. If the BIOS does not find a device, it will try the next device in the list. If it does not find the proper files on a device, the startup process will halt. If you have ever left a floppy disk in the drive when you restarted your computer, you have probably seen this message. in the above picture


The BIOS has tried to boot the computer off of the floppy disk left in the drive. Since it did not find the correct system files, it could not continue. Of course, this is an easy fix. Simply pop out the disk and press a key to continue.
Configuring BIOS
In the previous list, you saw that the BIOS checks the CMOS Setup for custom settings. Here's what you do to change those settings.
To enter the CMOS Setup, you must press a certain key or combination of keys during the initial startup sequence. Most systems use "Esc," "Del," "F1," "F2," "Ctrl-Esc" or "Ctrl-Alt-Esc" to enter setup. There is usually a line of text at the bottom of the display that tells you "Press ___ to Enter Setup."
Once you have entered setup, you will see a set of text screens with a number of options. Some of these are standard, while others vary according to the BIOS manufacturer. Common options include:
• System Time/Date - Set the system time and date
• Boot Sequence - The order that BIOS will try to load the operating system
• Plug and Play - A standard for auto-detecting connected devices; should be set to "Yes" if your computer and operating system both support it
• Mouse/Keyboard - "Enable Num Lock," "Enable the Keyboard," "Auto-Detect Mouse"...
• Drive Configuration - Configure hard drives, CD-ROM and floppy drives
• Memory - Direct the BIOS to shadow to a specific memory address
• Security - Set a password for accessing the computer
• Power Management - Select whether to use power management, as well as set the amount of time for standby and suspend
• Exit - Save your changes, discard your changes or restore default settings

CMOS Setup
Be very careful when making changes to setup. Incorrect settings may keep your computer from booting. When you are finished with your changes, you should choose "Save Changes" and exit. The BIOS will then restart your computer so that the new settings take effect.
The BIOS uses CMOS technology to save any changes made to the computer's settings. With this technology, a small lithium or Ni-Cad battery can supply enough power to keep the data for years. In fact, some of the newer chips have a 10-year, tiny lithium battery built right into the CMOS chip!
Updating Your BIOS
Occasionally, a computer will need to have its BIOS updated. This is especially true of older machines. As new devices and standards arise, the BIOS needs to change in order to understand the new hardware. Since the BIOS is stored in some form of ROM, changing it is a bit harder than upgrading most other types of software.
To change the BIOS itself, you'll probably need a special program from the computer or BIOS manufacturer. Look at the BIOS revision and date information displayed on system startup or check with your computer manufacturer to find out what type of BIOS you have. Then go to the BIOS manufacturer's Web site to see if an upgrade is available. Download the upgrade and the utility program needed to install it. Sometimes the utility and update are combined in a single file to download. Copy the program, along with the BIOS update, onto a floppy disk. Restart your computer with the floppy disk in the drive, and the program erases the old BIOS and writes the new one. You can find a BIOS Wizard that will check your BIOS at BIOS Upgrades.
Major BIOS manufacturers include:
• American Megatrends Inc. (AMI)
• Phoenix Technologies
• ALi
• Winbond
As with changes to the CMOS Setup, be careful when upgrading your BIOS. Make sure you are upgrading to a version that is compatible with your computer system. Otherwise, you could corrupt the BIOS, which means you won't be able to boot your computer. If in doubt, check with your computer manufacturer to be sure you need to upgrade.