Mittwoch, 7. April 2010

EE5412 Telecommunication Networks BlueTooth - IEEE 802.15

EE5412 Telecommunication Networks

BlueTooth - IEEE802.15 [Bluetooth.doc]


Ref : Wireless and Cellullar Netwprks, Steve Wisniewski, Prentice Hall,2005
Principles of Wireless Networks, Pahlavan Krishnamurthy, Prentice Hall,2002

[note – only general concept is required, details of protocol is for your reference only, not required for assessment, refer to power point file for the scope required for assessment]

Open specification for short range integrated wireless voice and data communication.
Standard base on three applications – replacing cables, data and voice access point and personal ad hoc networks

Figure shows typical applications.


Topology



Topology – scattered ad hoc topology. A number of small networks support a few terminals to co-exist or interoperate with one another.

The network should be self-configurable providing an easy mechanism to form a new small network and a procedure for participation in an existing one.
The terminals have options to associate with multiple networks at the same time.

Piconet – Only one master in the network
Scatternet – several scattered pico network

Terminal states – M, master; S, slave; SB, standby; P, park/hold
S terminal can participate in more than one piconet.
M terminal can handle 7 S
Terminal can enter the SB mode waiting to join the piconet
In P mode, the terminal release its MAC address while in SB mode terminal keep its MAC address

Up to 10 piconet can operate in one area.
Bluetooth operate at 2.4G ISM band.

Protocol Architecture
Allow different applications to communicate over a variety of devices.



Layered protocol architecture
As illustrated in figure, it consists of core protocols, cable replacement and telephony control protocols and adopted protocols.


Core protocols form a five-layer stack consisting of the following
Radio – Specifies details of the air interface, including frequency the use of frequency hopping, modulation scheme and transmit power ie RF layer – radio modem for transmission and reception

Baseband – concerned with connection establishment within a piconet, addressing, packet format, timing and power control.

LMP, link management protocol – Responsible for link setup between Bluetooth devices and on going link management. This includes security aspects such as authentication and encryption, and the control and negotiation of baseband packet size.

L2CAP, Link control and adaptation protocol – Adapts upper layer protocols to the baseband layer. L2CAP provides both connectionless and connection-oriented services.

SDP, Service discovery protocol – finds the characteristics of services and connects two or more Bluetooth devices.
----------------------------
Cable replacement -
RFCOMM, Radio frequency communication – cable replacement, emulate a RS232 serial port over the Bluetooth baseband.

Telephone Control protocol -
TCS, Telephone control service - Specify signaling for establishing and ending a call.

Note that only call establishment is carried out using TCS-BIN protocol and the L2CAP layer. The audio protocol is used to transfer data. This protocol directly accesses an SCO link in the baseband.


Stack for Telephony FTP stack vCard



The Adopted protocols
PPP – The point to point protocol is an internet standard protocol for transporting IP datagrams over a point to point link.
TCP/IP/UDP – from TCP/IP suite
OBEX, Object exchange protocol- adopted from IrDA standard for infra red connection, used to handle vCard protocol for virtue business card exchange

WAP, wireless access protocol
WAE, wireless application environment protocol

Usage Models – set of protocols implementing bluetooth based applications



Piconets and Scatternets

Piconet – Basic unit in Bluetooth. It consists of a master device and from one to seven active slave. Master determines the channel (frequency hopping FH sequence) and phase (timing offset to transmit) for the slaves according to its own device address. Slave must tune to the same channel and phase. A slave may only communicate with the master and may only communicate when granted permission by the master.

Scatternet - A device in one piconet may also exist as part of another piconet and may function as either a slave or master in each piconet. This form of overlapping is called scatternet.

Bluetooth use FH with a carrier spacing of 1 Mhz. Up to eight different carrier frequencies are used in a total bandwidth of 80 Mhz.
With frequency hopping, a logical channel is defined by the hopping sequence. At any given time, the available channel bandwidth is 1 Mhz with a maximum of eight devices sharing the same channel.

Different logical channels with different hopping sequence can share the same 80 Mhz bandwidth. Collision will occur when devices in different piconets on different logical channels happen to use the same hop frequency at the same time.

Radio Specification
Output power -
Class 1 – max 100 mw (+20dbm) with a min of 1 mw (0db); power control is mandatory [100meter]
Class 2 – max 2.4 mw (+4dbm) with a min of 0.25mw (-6dbm); power control is optional
Class 3 – nominal output 1 mw [10 meter]
Spectrum – 2.4G ISM band; 79 x 1Mhz physical channels total 80 Mhz bandwidth
Modulation – GFSK with one represented by positive frequency deviation and zero represented by negative frequency deviation. The minimum deviation is 115 khz.

Baseband Specification
Bandwidth - The total bandwidth of 80Mhz is divided into 79 physical channels of 1 Mhz bandwidth each.

FHSS - Frequency hops follows a pseudorandom sequence.
All the devices on a single piconet follow the same sequence or the FH channel.
The hop rate is 1600 hops per sec and correspond to a slot time of 625 us. [ 2.5 hops per sec 9400 ms dwell time in 802.11].
The time slots are numbered from 0 to 226 [ie 227 slots = 3 x 79 hops ]

TDD link - Master and slave communicate via TDD [time division duplex] link. TDD is a link transmission technique in which data are transmitted in one direction at a time and transmission alternate between two directions.

Transmission starts at the beginning of a timeslot. Frequency hop is made at the start of each new time slot.

Single-Secondary Communication
Time id divided into slots of 625 usec. The primary uses even numbered slots and the secondary uses odd-numbered slots.

Multi-slot packets –
Packet lengths requiring 1, 3 or 5 slots are allowed. When a packet containing three or five time slots is transmitted, the same frequency is used until the entire packet has been transmitted.

In the next slot after the multi-slot packet, the radio returns to the frequency required for its hopping sequence, so that during transmission two or four hop frequencies have been skipped.


In fig., k denote the slot number and f(k) = physical channel selected in slot k

Multiple-Secondary Communication
Primary use even-numbered slots . Secondary sends in the next odd-numbered slot if the packet is the previous slot was addressed to it. All secondary listen on even-numbered slots but only one secondary sends in any odd-numbered slot.

The access method is similar to a poll/select operation with reservations. When the primary selects a secondary, it also polls it. The next time slot is reserved for the polled station to response. If the polled secondary has no frame to send, the channel is silent.

MAC mechanism
Bluetooth is a fast FHSS/TDD system that employs polling to establish the link. The access method is TDMA/TDD.

FH sequence – determined by master in a piconet.
The pseudo-random number sequence is a function of the master’s Bluetooth address.
Different master will have different hopping sequence. Hence most of the time, transmission on two devices on different piconet in the same area will be on different physical channels. Occasionally, collision and lost of data may occur.

Physical Links – two types of links

Bluetooth supports two kinds of links, ACL for data transmission and SCO for audio transmission. The gross Bluetooth data rate is 1 Mbps while the effective rate on an asymmetric ACL link is 721 Kbps in either direction and 57.6 Kbps in the return direction. A symmetric ACL link allows data rates of 432.6 Kbps.
SCO, synchronous connection-oriented –

Allocate a fixed bandwidth between a point-to-point connection involving the master and a single slave. The master maintains the SCO link by using reserved slots at regular intervals. The master can support up to three simultaneous SCO links [64kbps]. Slave can support two or three SCO links. SCO packets are never retransmitted.

ACL, asynchronous connectionless –
Point to multipoint link between the master and all the slaves in the piconet. In slots not reserved for SCO links, the master can exchange packets with any slave. Only a single ACL link can exist.

SCO links used for guaranteed data rate but without guaranteed delivery such as audio data.

ACL links provide packet-switched style of connection. No bandwidth reservation. Delivery may be guaranteed through error detection and retransmission. Data can be sent either unprotected or protected with forward error correction code.

Packet format


Access code – used for timing synchronization, offset compensation, paging and inquiry
The assess code field consists of a four-bit preamble, a four-bit trailer and a 64 bit synchronization PN sequence. The 48 bit MAC address unique to every Bluetooth device is used as the seed to derive the PN-sequence for hopping frequencies of the device.

There are four different types of access codes.
The first type identifies a M terminal and its piconet address.
The second type of access code specifies an S identity that is used to page a specific S.
The third type is a fixed access code reserved for the inquiry process.
The fourth type is the dedicated access code that is reserved to identify specific set of devices such as fax, printers or cellular phones.

DAC – device access code, for paging and its subsequent response
IAC - inquiry access code, for inquiry
CAC – channel access code, identify a piconet

Header – used to identify packet type and to carry protocol control

The header field has 18 bits that are repeated three times with FEC code. The 18 bit starts with a 3 bit S address, 4 bit packet type, 3 bit status and 8 bit error check. The 3 bit S add is the temporary address assigned to slave in the piconet. A transmission from master to slave or slave to master contains that address. ) is reserved for broadcast from master to slaves.

Type – identify packet types allowing 16 choices for different grade of voice services, data services at different rates and four control packets.

3 bit status - - used to flag overflow, acknowledgment and sequencing to differentiate the sent and resent packets. Transmitted packets are alternately labeled with 0 and 1.
F – flow control, 1 indicates buffer full
A – Ack [ Bluetooth uses Stop-and-wait]
S – Sequence number [ 1 bit is sufficient for stop and wait]

HEC – 8 bit header error correction
The header has three identical 18 bit sections. [ie. Repeat 3 times]. The receiver compares these three sections bit by bit and uses the majority opinion rules. This forward error correction is for header only.

Payload
For some packet types, the baseband spec defines a format for the payload field. For voice payload, no header is defined.

Payload header – 8 bit header defined for single slot packet and 16 bits for multi-slot packets
Payload body – user info
CRC – 16 bit
L_CH – logical channel ID
Flow – flow control
Length – number of data bytes excluding header and CRC.

Error correction schemes - 1/3 rate (forward error correction) FEC, 2/3 rate FEC and ARQ

Logical Channels –
Link control (LC), link management(LM), user asynchronous data (UA) and user isochronous data (UI) channels.

Connection Management
The link manager layer and L2CAP layer perform the link setup, authentication and link configuration.

In the beginning, all devices are in SB mode. One of the device starts with an Inquiry and becomes the M. During the Inquiry process, the M register all SB terminals and then becomes S terminals.

After the Inquiry process, identification and timing of all S terminals is sent to the M. Connection starts with a PAGE from the M sending its timing and identification to the S. When connection is established, communication session takes place. At the end, the terminal can be sent back to the SB, Hold, Park or Sniff states.


Hold mode- In this mode, device idle at reduced power or possibly participate in another piconet.
Sniff mode – slave listen to the piconet at reduced interval according to application need.
Park mode – device give up its MAC address but remain synchronized to the piconet. A park device does not participate in traffic but occasionally listens to the traffic of the M terminal to synchronise and check on broadcast message.
Standby – low power, default state
Connected - connected to piconet as a master or slave

Figure shows a state diagram.


Channel control

Page – used by master to activate and connect to a slave.
Page scan – device listening for a page
Master response – master receives a page response from a slave and can either enter connection state or page state to page for other slave.
Slave response – slave response to a page from master. If connection setup succeeds, the device enters the connection state. Otherwise, it returns to the page scan state.

Inquiry – to find the identity of devices within range.
Inquiry scan – device listening for an inquiry
Inquiry response – respond to Inquiry


Inquiry Procedure
The first step when establishing a piconet is for a potential master to identify devices within range. Triggered by user application, a master begins an inquiry procedure. The inquiry procedure begins when the potential master transmits an ID packet with an IAC, which is a code common to all Bluetooth devices.
Of the 79 carriers, 32 are considered wake up carriers.

In the Inquiry state, the master broadcasts the IAC over each of the 32 wakeup carriers in turn. Device in SB periodically enter the inquiry scan state to search for IAC on the wake up carriers. When a device receives the inquiry, it enters the inquiry response state and returns a FHS packet with its device address and timing information, which is required by the master to initiate a connection. The master does not respond the FHS packet and may remain in the inquiry state until it is satisfied that all radios have been found.

Once a device has responded to an inquiry, it moves to the page scan state to wait for a page from the master in order to establish a connection. However, if a collision occurred in the inquiry response phase, no page will be received. The device may need to return to the inquiry scan state.

Note - FHS packet – control packet to reveal device address and clock of sender


Page Procedure
For each device to be paged, the master use the device’s address to calculate a page frequency-hopping sequence to contact the device during paging. The master pages by using an ID packet with the slave’s DAC[device access code]. The slave responds by returning the same DAC to the master in the same hopping sequence known as the page mode hopping sequence used by the master.

The master responds with it’s own device address and it’s own real time bluetooth clock value. The slave responds to confirm and transit to connection state and begin to use the connection hopping sequence defined in the master’s FHS packet. The master continues to page until it has connected to all the desired slaves and then transits to connection state.


Physical connection
PHY layer is embedded in the RF and Base band layers.
Use FHSS modem with a nominal antenna power of 0dbm (10 m coverage), option to operate at 20 dbm (100 meter coverage).
Use a two-level GFSK modem with a transmission rate of 1 Mbps that hops over 79 channels in the ISM bands starting at 2.402G and stop at 2.480G. The hopping rate is 1600 hops per sec

A second mode with 23 hopping frequencies for Japan, France and Spain.
A specific frequency-hopping pattern is assigned for each piconet.

The frequency sequence is determined by the master and follows a pseudo random number sequence which is calculated from the master’s device address. It is therefore unique to each pico network. The overall hopping pattern is divided into 32 hop segments. Each 32-hop sequence starts at a point in the spectrum and hops over the pattern that covers 64 Mhz.

The 79 frequency hops are arranged in odd and even classes. It hops either on odd or even frequencies. After completion of each segment, the sequence is altered and the segment is shifted 16 frequencies to the forward direction. The segment slide through the carrier list to maintain the average time each frequency is used at an equal probability.



MAC mechanism
The nominal hop rate is 1600 hops per sec. To set this up, the master assigns all slaves in the pico network time slot with a length of 625 us [625 bits at 1 Mbps]. Slave can only start to transmit at the start of a times slot. The time slots are numbered from 0 to 226 [ie 227 slots = 3 x 79 hops ]

.
Frame Format
Base on one packet per hop[625 us]. Frame can be extended to three slot [ 1875 us] and five slot [3125 us].

This allows different data rate.

二、識之功能,非局限于肉身,而交遍于法界,識與大腦之不同者,不僅大腦有質礙,
識無質礙。尤其重要者,識的功能交遍法界,而大腦的作用僅局限于根身(如感覺神經與
運動神經,其作用僅局限于我人的肉身。)。

什麼叫做交逼法界?譬如我們登山臨水,所見所聞,至遠至廣。舉凡所見所聞,皆是我人眼識、耳識、意識( 此處指五俱意識 )之所在。

試問此所見所聞,是在我人大腦之內,抑在大腦之外?大腦不過方寸之地,與所見所聞比較,
有如爪上塵與大地土,其不是大腦所能範圍者,至為明瞭。因此,識的功用在大腦之外,又
不可以十百千萬里計。是故其量必同虛空而無極,因此稱識的功用交遍法界( 此係就種子
而言,至于識的現行,則隨量之大小而有局限 )。

三、識為種子之現行,而種子起現行,必待緣俱:識為一種功能,此功能未起現行之前,
不稱識而稱種子;種子起現行時,不稱種子而稱識。所以種子是潛在的功能,識是此潛在功
能的發生作用( 即現行 )。而識之起現行,必待四緣俱備。四緣者,因緣、等無間緣、所緣
緣、增上緣。

上文稱:「識為種子之現行」,種子又是什麼呢?種子仍然是功能。如前所述,「功能」
一詞初見于無著菩薩的《攝大乘論》,世親、護法諸論師繼述之,謂一切功能,潛藏于現象
界之後,而為現象作根菱,建立本識以統攝之。功能是什麼?是「非物質而產生物質之力用」
者,事實上即是物理學上之「能」。「能」為心物活動的潛力,亦為心物之質料,為產生有
為法之果的功用勢力。

《中論頌》曰:「諸法不自生,亦不從他生,不共不無因。」《阿毗達磨
雜集論》釋此頌曰:「自種有故不從他,待眾緣故非自作,無作用故非共生,有功能故非無
因。」是以諸法之因即是功能,而阿賴耶識所攝持的萬法種子,種子生現行,現行薰種子,
一切變現, 皆是功能之力。所以所謂功能,即是種子異名。

種子一詞,法相宗所立,為唯識學上極重要之術語,指在阿賴耶識中,生起一切有漏無
漏有為法的功能。《成唯識論》卷二曰:「此中何法名為種子,謂本識(阿賴耶識)中,親自
生果功能差別。此與本識及所生果,不一不異。體用因果,理應爾故。」

識為一種功能,此功能未發生作用、于潛在狀態時,不稱識而稱種子;其發生作用——
即起現行時,不種子而稱識。所謂現行,即是能生起色心各別不同現象的作用。種種不同
色心現象,都自有他的親因,此親因即《識論》所稱的功能。名為種子者,以其有生起諸法
的作用,猶如草木種子,能生芽莖也。

原來所謂宇宙諸法——即世間種種精神的、物質的現象,皆是阿賴耶識中種子變現而
起。阿賴耶識攝持諸法種子,有生起色心諸法的力用,此力用即稱為種子。沉隱的種子(潛
伏的功能)生起色心諸法時,稱為現行。所以種子、阿賴耶識、和它所生起的現行果法,這
三者是體用因果的關係,是「不一不異」。

因為本識是體,種子是用,體用之間,體是體,用是用,所以非一;但體是此用之體,用是此體之用,體不離用,用不離體,所以非異。

再者,種子與現行之間,種子是因,現行是果, 因是因,果是果,所以非一;但因是此果之因,果是此因之果,所以非異。這體用因果的道理,「理應故爾」。于此,進一步詮釋種子如下。



Keine Kommentare: