design device driver for wireless device using 32 bit microcontroller

31
A SEMINAR ON A SEMINAR ON DESIGN DEVICE DRIVER FOR DESIGN DEVICE DRIVER FOR WIRELESS DEVICE USING 32 BIT- WIRELESS DEVICE USING 32 BIT- MICROCONTROLLER” MICROCONTROLLER” UNDER THE GUIDANCE OF UNDER THE GUIDANCE OF VG VG

Upload: kantha123

Post on 30-Jan-2015

291 views

Category:

Education


6 download

DESCRIPTION

DESIGN DEVICE DRIVER FOR WIRELESS DEVICE USING 32 BIT-MICROCONTROLLER

TRANSCRIPT

Page 1: Design device driver for wireless device using 32 bit microcontroller

A SEMINAR ONA SEMINAR ON

““DESIGN DEVICE DRIVER FOR DESIGN DEVICE DRIVER FOR WIRELESS DEVICE USING 32 WIRELESS DEVICE USING 32

BIT-MICROCONTROLLER”BIT-MICROCONTROLLER”

UNDER THE GUIDANCE OFUNDER THE GUIDANCE OF

VGVG

Page 2: Design device driver for wireless device using 32 bit microcontroller

Bluetooth OverviewBluetooth Overview

Page 3: Design device driver for wireless device using 32 bit microcontroller

What is Bluetooth?What is Bluetooth?

• openopen specification specification • low-costlow-cost • low-powerlow-power • short-range radio technology short-range radio technology • Support point to point & point to Support point to point & point to

multipoint connectionmultipoint connection

Page 4: Design device driver for wireless device using 32 bit microcontroller

Bluetooth ArchitectureBluetooth Architecture

Blue tooth radio

Link Manager

Base band

Host controller Interface

Logical Link Controller And Protocol

TCS RFCOM SDP

Applications

Page 5: Design device driver for wireless device using 32 bit microcontroller

Bluetooth RadioBluetooth Radio •Provides actual physical connection

interface between Bluetooth devices

•Uses faster acknowledgement and frequency hops and shorter packets

•operating in the 2.4 GHz band

•Has range from 10m to 100m

Page 6: Design device driver for wireless device using 32 bit microcontroller

Base bandBase band

•Physical layer of the Bluetooth

•Packets transmitted in either Synchronous Connection-Oriented (SCO) links or Asynchronous Connectionless (ACL) links

•Uses inquiry and paging procedures for different Bluetooth Devices

Page 7: Design device driver for wireless device using 32 bit microcontroller

Link Manager Link Manager Protocol(LMP)Protocol(LMP)

• Provides link setup between Bluetooth devices

• Handles security aspects, such as authentication and encryption

• Controls and negotiates base band packet size

• Controls the connection states of the Bluetooth unit on a Pico net

Page 8: Design device driver for wireless device using 32 bit microcontroller

Service Discovery Service Discovery Protocol(SDP)Protocol(SDP)

• Gives applications the capability to find out which services are provided by or available through a Bluetooth device.

• Once the services available are found, the SDP gives applications the capability of determining the characteristics of those services.

• Two or more Bluetooth devices would then be able to establish a connection.

Page 9: Design device driver for wireless device using 32 bit microcontroller

HOST CONTROLLER HOST CONTROLLER INTERFACE(HCI)INTERFACE(HCI)

Page 10: Design device driver for wireless device using 32 bit microcontroller

HOST CONTROLLER INTERFACEHOST CONTROLLER INTERFACE

• The HCI provides a interface to the The HCI provides a interface to the base band controller and link base band controller and link manager, manager,

• Access to hardware status and Access to hardware status and control registers. control registers.

Page 11: Design device driver for wireless device using 32 bit microcontroller

HOST CONTROLLER HOST CONTROLLER INTERFACEINTERFACE

• HCI exists across 3 sections,HCI exists across 3 sections,

1 The Host Firmware1 The Host Firmware

2 HCI Driver (software entity)2 HCI Driver (software entity)

3 Host Controller Transport Layer 3 Host Controller Transport Layer

Page 12: Design device driver for wireless device using 32 bit microcontroller

L2CAP as a wireless L2CAP as a wireless driverdriver

• Data engine which takes data from lower base band IC Data engine which takes data from lower base band IC to upper layer of the Bluetooth stack.to upper layer of the Bluetooth stack.

• Manages the quality of service, mission from the base Manages the quality of service, mission from the base band to the upper layer.band to the upper layer.

• Decides the channeling across the different profiles for Decides the channeling across the different profiles for the application i.e. SDPthe application i.e. SDP

• Ultimately the L2CAP enables the wireless connection Ultimately the L2CAP enables the wireless connection establishment with other Bluetooth device.establishment with other Bluetooth device.

Page 13: Design device driver for wireless device using 32 bit microcontroller

LOGICAL LINK CONTROL LOGICAL LINK CONTROL AND AND

ADAPTATION ADAPTATION PROTOCOLPROTOCOL•L2CAP FUNCTIONAL OPERATIONL2CAP FUNCTIONAL OPERATION

•L2CAP GENERAL OPERATIONL2CAP GENERAL OPERATION

•L2CAP STATE MACHINEL2CAP STATE MACHINE

Page 14: Design device driver for wireless device using 32 bit microcontroller

L2CAP FUNCTIONAL L2CAP FUNCTIONAL OPERATIONOPERATION

• PROTOCOL MULTIPLEXINGPROTOCOL MULTIPLEXING

• SEGMENTATION AND REASSEMBLINGSEGMENTATION AND REASSEMBLING

• QUALITIY OF SERVICEQUALITIY OF SERVICE

Page 15: Design device driver for wireless device using 32 bit microcontroller

L2CAP FUNCTIONAL OPERATIONL2CAP FUNCTIONAL OPERATION

Page 16: Design device driver for wireless device using 32 bit microcontroller

QUALITIY OF SERVICEQUALITIY OF SERVICE

• The L2CAP connection establishment The L2CAP connection establishment process allows the exchange of process allows the exchange of information regarding the quality of information regarding the quality of service (QoS) expected between two service (QoS) expected between two Bluetooth units. Bluetooth units.

• Each L2CAP implementation must Each L2CAP implementation must monitor the resources used by the monitor the resources used by the protocol and ensure that QoS protocol and ensure that QoS contracts are honoured. contracts are honoured.

Page 17: Design device driver for wireless device using 32 bit microcontroller

L2CAP GENERAL L2CAP GENERAL OPERATIONOPERATION

• CHANNEL IDENTIFIERSCHANNEL IDENTIFIERS

• OPERATION BETWEEN DEVICESOPERATION BETWEEN DEVICES

• OPERATION BETWEEN LAYERSOPERATION BETWEEN LAYERS

Page 18: Design device driver for wireless device using 32 bit microcontroller

CHANNEL IDENTIFIERSCHANNEL IDENTIFIERS• Channel identifiers (CIDs) are local names Channel identifiers (CIDs) are local names

representing a logical channel end-point representing a logical channel end-point on the device. on the device.

• Implementations are free to manage the Implementations are free to manage the CIDs in a manner best suited for that CIDs in a manner best suited for that particular implementation.particular implementation.

• CID assignment is relative to a particular CID assignment is relative to a particular device and a device can assign CIDs device and a device can assign CIDs independently from other devices. independently from other devices.

Page 19: Design device driver for wireless device using 32 bit microcontroller

CHANNEL IDENTIFIERSCHANNEL IDENTIFIERS

Page 20: Design device driver for wireless device using 32 bit microcontroller

OPERATION BETWEEN DEVICESOPERATION BETWEEN DEVICES

Page 21: Design device driver for wireless device using 32 bit microcontroller

OPERATION BETWEEN LAYERSOPERATION BETWEEN LAYERS

Page 22: Design device driver for wireless device using 32 bit microcontroller

High Level DesignHigh Level DesignL2CAP Signalling AssumptionsL2CAP Signalling Assumptions• Prefix signal between peers at the same layer with the Prefix signal between peers at the same layer with the

protocol initials(L2CAP)protocol initials(L2CAP)• Prefix signal between higher and lower layers with the Prefix signal between higher and lower layers with the

lower layer’s initials (L2CA)lower layer’s initials (L2CA)• Suffix requests from a higher layer to a lower layer with Suffix requests from a higher layer to a lower layer with

“Req”“Req”• Suffix confirmation of requests sent from a lower layer to Suffix confirmation of requests sent from a lower layer to

an upper layer with “Cnf”an upper layer with “Cnf”• If a response from a lower layer is negative , the suffix If a response from a lower layer is negative , the suffix

“Neg” may be used instead of “Cnf”.“Neg” may be used instead of “Cnf”.• Suffix indications of events sent from a lower layer to Suffix indications of events sent from a lower layer to

higher layer with “Ind”higher layer with “Ind”• Suffix responses to indication sent from a higher layer to Suffix responses to indication sent from a higher layer to

a lower layer with “Rsp”a lower layer with “Rsp”• If a response to an indication requires further processing , If a response to an indication requires further processing ,

“Rsp “ may be replaced with “Pnd”, which is an “Rsp “ may be replaced with “Pnd”, which is an abbreviation for pending response.abbreviation for pending response.

Page 23: Design device driver for wireless device using 32 bit microcontroller

Establishing a ConnectionEstablishing a Connection

Once An ACL connection is established across the lower Once An ACL connection is established across the lower layers, L2CAP packets can be sent across it.layers, L2CAP packets can be sent across it.

The first message sent is an L2CAP_ConnectReq. In addition The first message sent is an L2CAP_ConnectReq. In addition to the usual Opcode, identifier, and Length fields, the to the usual Opcode, identifier, and Length fields, the message carries the following parametersmessage carries the following parameters

• A Protocol Service Multiplexer (PSM) valve specifying the A Protocol Service Multiplexer (PSM) valve specifying the protocol using this connectionprotocol using this connection

• A source Channel ID(CID) the Channel CID allocated to the A source Channel ID(CID) the Channel CID allocated to the connection by initiating deviceconnection by initiating device

Page 24: Design device driver for wireless device using 32 bit microcontroller

L2CAP THE STATE L2CAP THE STATE MACHINEMACHINE

• CLOSEDCLOSED

• WAIT_CONNECTWAIT_CONNECT

• WAIT_CONNECT_RSPWAIT_CONNECT_RSP

• CONFIG CONFIG

• OPENOPEN

• WAIT_DISCONNECTWAIT_DISCONNECT

Page 25: Design device driver for wireless device using 32 bit microcontroller

Configuration states and transitionsConfiguration states and transitions

Page 26: Design device driver for wireless device using 32 bit microcontroller

States and transitions for L2CAPStates and transitions for L2CAP

Page 27: Design device driver for wireless device using 32 bit microcontroller

RESULTRESULT• Protocol/channel multiplexingProtocol/channel multiplexing

Input: Input:

Test logger function TestLog_L2CAP_Prot_HCI () is used to provide the Test logger function TestLog_L2CAP_Prot_HCI () is used to provide the input like.input like.

Number of channels : 2Number of channels : 2

Channel ID: 1 Protocol RFCOM1 with Input string “Data from channel 1”Channel ID: 1 Protocol RFCOM1 with Input string “Data from channel 1”

Channel ID: 2 Protocol TCP with Input string “Data from channel 2”Channel ID: 2 Protocol TCP with Input string “Data from channel 2”

Channel ID: 3 Protocol RFCOM2 with Input string “Data from channel 3”Channel ID: 3 Protocol RFCOM2 with Input string “Data from channel 3”

• Output in the textlogger.txtOutput in the textlogger.txt

Function used for output “TestLog_L2CAP_Prot_SDP ()”Function used for output “TestLog_L2CAP_Prot_SDP ()”

RFCOM1 mapped to Channel 1 “Data from channel1”RFCOM1 mapped to Channel 1 “Data from channel1”

TCP mapped to Channel 2 “Data from channel2”TCP mapped to Channel 2 “Data from channel2”

RFCOM2 not mapped to a channel “exceeded channel capacity”RFCOM2 not mapped to a channel “exceeded channel capacity”

Page 28: Design device driver for wireless device using 32 bit microcontroller

• Segmentation and reassembly, Fragmentation and Segmentation and reassembly, Fragmentation and RecombinationRecombination

Input: Input: Test logger function TestLog_L2CAP_Seg_HCI () is used to Test logger function TestLog_L2CAP_Seg_HCI () is used to

provide the input like.provide the input like.Length of Data: 120454 BytesLength of Data: 120454 BytesPacket size: 16 BytesPacket size: 16 BytesInput file: clouds.jpegInput file: clouds.jpeg

Output in the textlogger.txtOutput in the textlogger.txtFunction used for output TestLog_L2CAP_Seg_SDP()Function used for output TestLog_L2CAP_Seg_SDP()Data is sent in 1044 packets with delimiter as 16 bytes per Data is sent in 1044 packets with delimiter as 16 bytes per

packetpacket Segment Size: 32 Segment Size: 32 Fragmentation unit: 32Fragmentation unit: 32 Data Loss: NILLData Loss: NILL

Page 29: Design device driver for wireless device using 32 bit microcontroller

• Quality of ServiceQuality of ServiceInput: Input: Test logger function TestLog_L2CAP_QoS_HCI()is Test logger function TestLog_L2CAP_QoS_HCI()is

used to provide the input like.used to provide the input like.Length of Data: 120464 BytesLength of Data: 120464 BytesPacket size: 16 BytesPacket size: 16 BytesInput file: earth.jpegInput file: earth.jpeg

Output in the textlogger.txtOutput in the textlogger.txtFunction used for output TestLog_L2CAP_QoS_SDP()Function used for output TestLog_L2CAP_QoS_SDP() The variable length data 120464 bytes are The variable length data 120464 bytes are

received successfully received successfully

Page 30: Design device driver for wireless device using 32 bit microcontroller

REFERENCEREFERENCE• [1][1] Bluetooth wireless Technology specifications, Bluetooth wireless Technology specifications,

version 1.1. version 1.1. • [2] www.pal_wireless.com [2] www.pal_wireless.com • [3][3] Palm’s Bluetooth Wireless Technology Page Palm’s Bluetooth Wireless Technology Page

http://http://www.palmos.com/dev/tech/bluetoothwww.palmos.com/dev/tech/bluetooth//• [4][4] Palm’s Bluetooth WhitepaperPalm’s Bluetooth Whitepaper

http://www.palmos.com/dev/tech/bluetooth/palm_bluetoothhttp://www.palmos.com/dev/tech/bluetooth/palm_bluetooth_whitepaper.pdf_whitepaper.pdf

• [5][5] http://http://www.lynuxworks.comwww.lynuxworks.com/writing/writing device driver for device driver for on lynux OS on lynux OS

• [6][6]http://www.oreilly.com/catalog/linuxdrive2/chapter/bookhttp://www.oreilly.com/catalog/linuxdrive2/chapter/book

• [7][7] C Programming language BRIAN W. KERNIGAHAN C Programming language BRIAN W. KERNIGAHAN DENNIS M.RITCHIE DENNIS M.RITCHIE

• [8][8] MauriceJ.Bach, “The Design of the UNIX operating MauriceJ.Bach, “The Design of the UNIX operating system”, Prentice-Hall of India Private Limited ND.system”, Prentice-Hall of India Private Limited ND.

Page 31: Design device driver for wireless device using 32 bit microcontroller

THANK YOU ALLTHANK YOU ALL