첨부자료 : WECOM_Bluetooth_Seminar

Download Report

Transcript 첨부자료 : WECOM_Bluetooth_Seminar

Bluetooth
Agenda
Overview
2. WinCE 6.0 Modular Bluetooth Architecture
3. WinCE 6.0 Bluetooth Profile
4. Vendor Specific Module
5. Developing Bluetooth Application
6. Certificate Qualification
1.
Bluetooth Overview



What is Bluetooth?
Where is Bluetooth?
Why use Bluetooth?




Low Cost
Low Power Usage
Standardized Usage Protocols
Small Form Factor
Bluetooth Overview

What is a Bluetooth Stack?

Layered Architecture
HCI – Host Controller Interface
Baseband and Link Management Protocol
Upper layers minimally consist of L2CAPP, RFCOMM, and SDP

Many to one relationship between layers of the upper stack



Higher Layers
Link Manager
Higher Layers
Link Management Protocol
Link Manager
Link Controller
Link Controller
Radio Frequency
Radio Frequency
Physical Layer
Device A
Device B
WinCE 6.0 Modular
Bluetooth Architecture

BB (Baseband) : piconet을 형성하는
bluetooth unit사이에서 물리적인 RF 링크
를 가능하게 한다.

LMP (Link Manager Protocol) : 블루투스
장치들 사이에서 링크 설립을 다루는 프로
토콜이다.

HCI Transport Layer : 블루투스 하드웨어
로 HCI 명령어를 전달해주는 레이어이다.

Bluetooth Universal Transport Manager
(BthUniv) : transport layer와 HCI layer사
이에서 중간 전송 드라이버이다. PnP 디바
이스를 발견하고, 적절한 전송 드라이버를
로드한다.

HCI (Host Controller Interface) : 컨트롤러
관리, 링크 설립과 유지를 책임지는,
블루투스 하드웨어와의 기본적인 인터페이
스이다.
WinCE 6.0 Modular
Bluetooth Architecture

Third Party Extensions : 새로운 프로파일
을 생성하여, 하위 스택만을 사용하여 새
로운 개발이 가능하다. 그러나, Bluetooth
에 대한 많은 지식이 필요하다.

L2CAP (Logical Link Control and
Adaptation Protocol) : multiplexing, 패
킷을 segmentation과 reassemble을 하
고, quality of Service(QoS)를 구현한
connection-based 프로토콜이다.

HID (Human Interface Device) profile :
키보드, 마우스와 같은 장비를 지원하기
위한 기능을 정의한다.

PAN (Personal Area Network) profile :
Bluetooth Transport layer를 통하여 진행
되는 표준 IP-based 네트워크 서비스를
지원하기 위한 절차를 정의한다.
WinCE 6.0 Modular
Bluetooth Architecture

RFCOMM (Serial Cable Emulation
Protocol) : TS07.10 프로토콜의 블루투
스 adaptation이다. Virtual COM
emulation 설립과 점대점 프로토콜을 제
공한다.

SDP (Service Discovery Protocol) : 블루
투스 스택 상위에서 서비스들의 설정/발
견을 다루는 프로토콜이다.

COM Port Emulation : RFCOMM 채널을
통하여 만들어지는 virtual COM port를 사
용할 수 있도록 만들어준다. dial-up과
LAN access profile들은 이것을 사용한다

TDI (Transport Driver Interface) :
Winsock 기반으로 하는 유저 API를 제공
하는 인터페이스 레이어이다.

OBEX (Object Exchange) : Bluetooth와
IrDA통신을 통해서 winsock상위에 구현
된 Object교환 프로토콜이다.
WinCE 6.0 Bluetooth Profile
Generic Access Profile (GAP)
Service Discovery
Application

엔드유저기능을 구현하기 위한 표준 시
스템의 Specification이 어떻게 되어야
하는지를 설명한다.

동일한 표준에 의한 구현으로 호환성을
높인다.

각각 선택사항의 구현은 Application들
이 동일한 기능을 갖도록 한다.

파라미터들은 Application이 동일하게 작
동하도록 한다.

서로 다른 표준들을 조합하기 위한 방식
이 정의된다.

유저 인터페이스 가이드라인이 정의된다.
Telephony Control Protocol Specification (TCS)
Cordless Telephony
HID
PAN
Serial Port Profile (SPP)
Intercom
Generic Object Exchange (GOEP)
Dial-Up Networking
File Transfer
FAX
Object Push
HeadSet
Synchronization
HandsFree
Basic Imaging
Basic printing
LAN Access




Advanced Audio Distribution Profile (A2DP)
Audio Video Remote Control Profile (AVRCP)
Audio / Video Control Transport Protocol (AVCTP)
Audio / Video Distribution Transport Protocol (AVDTP)
Vendor Specific Module
Btd.dll
(Bluetooth Protocol Stack)
BthUniv.dll
(Bluetooth Universal Loadable Driver)
BthUsb.dll
BthUart.dll
BthCsr.dll
BthSc.dll
Registry
Settings
BthAmb.dll
BthSdio.dll
Vendor Specific Module
Bluetooth Stack Driver
ev
en
t
Device Manager
ca
rd
(G
UI
D)
Bluetooth
Universal
Loadable Driver
Built-In
Bluetooth
Hardware
Module
In
se
rt
Pn
P
Bluetooth Transport Driver
PnP
Bluetooth
Hardware
Module
WinCE 6.0 Bluetooth
Component
Developing Bluetooth Application
Btdrt Helper Library (Btdrt.dll)
유저 프로그램에 management API를 제공하는 runtime thunk
dll이다.
 Power mode, Security, inquiry, SDP (Service Discovery
Protocol) 등등을 Bluetooth Management 기능을 심플한
interface로 제공한다.
 이 함수의 대부분은 동등한 Winsock 함수를 갖는다.
 매우 단순화하다는 장점이 있지만, 좀 더 세밀하게 사용할 수
없다는 단점을 갖고 있다.

Developing Bluetooth Application
Winsock Programming









Winsock interface는 다음의 함수들을 통하여 Bluetooth 접속
을 지원한다.
socket – 특정 서비스에 소켓 바운드를 생성한다.
bind – socket을 가지고 local address를 associate한다.
getsockname – local socket 이름을 가져온다.
getpeername – socket peer의 이름을 가져온다.
connect – 특정 소켓으로 접속을 만든다.
accept – 들어오는 접속을 허용한다.
getsockopt – 소켓 옵션 정보를 가져온다.
setsockopt – 소켓 옵션 정보를 설정한다.
Developing Bluetooth Application
COM Port Emulation







COM Port emulator는 RFCOMM에게 가상의 COM port를 기반으
로 하는 접속을 제공한다.
COM Port emulation 레이어가 Bluetooth stack에 존재할 때, 가상
서버 또는 COM port 클라이언트는 Outgoing 접속을 생성할 수 있
고, incoming RFCOMM 접속을 받아들일 수 있다.
가상 COM port를 생성하기 위해서는, 다음과 같이 RegisterDevice
를 하면 된다.
RegisterDevice (L"COM", index, L"btd.dll", (DWORD)&pp);
가상 COM Port를 제거하려면, DeregisterDevice함수를 부르면 된
다.
한번 생성되면, COM port는 serial port와 똑같이 동작하고, serial
API과 같은 API들을 사용하여 port에 접근이 가능하다.
클라이언트 Port들에서는, 물리적 접속은 장치가 CreateFile API를
사용하여 read / write 접근일때만 생성된다. 물리적인 접속은 read
또는 write 접근의 첫번째 handle이 끝났을 때만 서버와 클라이언
트가 종료한다.
Sample Applications

Virtual COM Port Sample – sca.exe


Winsock Interface Sample – ssa.exe


Windows CE에서 Bluetooth protocol extension을 생성하는 절차를 설
명하였다.
Device Driver Management Sample – btloader.exe


블루투스 Stack과 Security subsystem의 사용을 설명하기 위해
querying, pairing과 사용자 인증을 구현하였다.
Protocol Extension Sample – bthlink.exe


텍스트 메시지와 파일을 교환하기 위해, Winsock Interface를 통하여
Stack을 사용하는 예제이다.
Querying and Pairing Sample – btpair.exe


텍스트 메시지와 파일을 교환하기 위해, Virtual COM Port Interface를 통
하여 Stack을 사용하는 예제이다.
PCMCIA/CF 카드들 위한 블루투스 장치 드라이버를 관리하는 예제이다.
SDP Search and Record Generator Sample – bthnscreate.exe

SDP record를 생성하고, SDP Service 또는 Attribute를 초기화한다.
Sample Applications

Virtual COM Port Creation Sample – comtest.exe


Flow Control Sample – fctest.exe


client측 프린터을 위한 Bluetooth port emulator, 장치 발견과 SDP 요청을 하는 방
법을 나타내었다.
SDP Search Sample – sdpsearch.exe


client측 모뎀을 위한 Bluetooth port emulator, 장치 발견과 SDP 요청을 하는 방법
을 나타내었다.
Printer Discovery Sample – printui.exe


Stack에서 Winsock getsockopt와 setsockopt programming interface를 사용하는
예제이다.
Phone Management Sample – phoneui.exe


Stack에서 flow control의 사용 예를 보여준다.
Winsock Options Sample – opttest.exe


Virtual COM port를 생성하고, 테스트 한다.
SDP 응답을 분석하기 위해 sdpuser.dll로부터 COM 과정을 사용 예를 설명한다.
Bluetooth Control Panel – Bthpnl.cpl

장치 검색 및 Inquiry, Pairing을 모두 보여주고, Virtual COM port를 사용하고 있는
종합적인 예이
다. %_WINCEROOT%\public\common\oak\drivers\netui\btmgmtui.cpp
Certificate Qualification
Bluetooth SIG
Regulatory Working Group
TF2/TF1
Bluetooth Qualification Review Board
BQRB
Bluetooth
Qualification
Administrator
(BQA)
Bluetooth
Qualification
Test Facility
(BQTF)
Bluetooth
Qualification
Body
(BQB)
Bluetooth
Technical
Advisory Board
(BTAB)
Certificate Qualification
Certificate Qualification
Q&A
감사합니다.