untitled

Similar documents

Microsoft Word doc

untitled

PowerPoint 프레젠테이션

6주차.key

슬라이드 1

PowerPoint 프레젠테이션

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

슬라이드 1

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션

<3034B1E2B9DD32302DBAB8B0EDBCAD2D DC0FCC6C4C0DABFF BAB0C3A53420C8A8B3D7C6AEBFF6C5A9292E687770>

<BDBAB8B6C6AE2D C5EBBDC52E >

untitled

/chroot/lib/ /chroot/etc/

Chap04(Signals and Sessions).PDF

PowerPoint 프레젠테이션

Embeddedsystem(6)_2.PDF

Microsoft Word - KPMC-400,401 SW 사용 설명서

Chapter_06

K&R2 Reference Manual 번역본

chap8.PDF

Microsoft Word - FS_ZigBee_Manual_V1.3.docx

SRC PLUS 제어기 MANUAL

untitled

Microsoft PowerPoint - lab14.pptx

歯Cablexpert제안서.PDF

Microsoft Word _whitepaper_latency_throughput_v1.0.1_for_

본 강의에 들어가기 전

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

KR

int main(void) int a; int b; a=3; b=a+5; printf("a : %d \n", a); printf("b : %d \n", b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf(" a : %x \

(SW3704) Gingerbread Source Build & Working Guide

KEY 디바이스 드라이버

<4D F736F F F696E74202D20C0BDBCBA484D4920C0FBBFEB20C5DAB7B9B8C5C6BDBDBA20B4DCB8BBB1E228B9DFC7A5C0DAB7E129>

PowerPoint 프레젠테이션

03장.스택.key

2

Plc\PLC-p

<30322E20B9ABBCB1B7A32E687770>

歯AG-MX70P한글매뉴얼.PDF

PowerPoint 프레젠테이션

bn2019_2

vi 사용법

Microsoft PowerPoint - chap9 [호환 모드]

Microsoft PowerPoint - 09-Pipe

Copyright 2009 Hewlett-Packard Development Company, L.P. Intel 은 미국 및 다른 국가에서 Intel Corporation 의 상표입니다. Microsoft 및 Windows 는 Microsoft Corporation 의

MAX+plus II Getting Started - 무작정따라하기

lecture4(6.범용IO).hwp

untitled


디지털 오디오 방송 연구.PDF

Chap7.PDF

SMB_ICMP_UDP(huichang).PDF

제 3 편

LEICA C-LUX

untitled

hd1300_k_v1r2_Final_.PDF

목차 Wire to Wireless Personal Area Network Runners-up Bluetooth Usage Models Evolutions & Revolutions Mobile Integration Conclusion 2

1. GigE Camera Interface를 위한 최소 PC 사양 CPU : Intel Core 2 Duo, 2.4GHz이상 RAM : 2GB 이상 LANcard : Intel PRO/1000xT 이상 VGA : PCI x 16, VRAM DDR2 RAM 256MB

CAN-fly Quick Manual

ABC 11장

Sena Technologies, Inc. HelloDevice Super 1.1.0

BMP 파일 처리

USB USB DV25 DV25 REC SRN-475S REC SRN-475S LAN POWER LAN POWER Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl C

Copyright 2009 Hewlett-Packard Development Company, L.P. Microsoft 및 Windows 는 Microsoft Corporation 의 미국 등록 상표입니다. Bluetooth 는 해당 소유권자가 소유한 상표이 며 Hew

안전을 위한 주의사항 제품을 올바르게 사용하여 위험이나 재산상의 피해를 미리 막기 위한 내용이므로 반드시 지켜 주시기 바랍니다. 2 경고 설치 관련 지시사항을 위반했을 때 심각한 상해가 발생하거나 사망에 이를 가능성이 있는 경우 설치하기 전에 반드시 본 기기의 전원을

untitled

chap7.key

1. PVR Overview PVR (Personal Video Recorder), CPU, OS, ( 320 GB) 100 TV,,, Source: MindBranch , /, (Ad skip) Setop BoxDVD Combo

Microsoft Word - HD-35 메뉴얼_0429_.doc

Infinity(∞) Strategy

untitled

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D D382E687770>

chapter4

Microsoft PowerPoint ppt

13주-14주proc.PDF

제1장 Unix란 무엇인가?

PowerPoint 프레젠테이션

, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float

목차 제 1 장 inexio Touch Driver소개 소개 및 주요 기능 제품사양... 4 제 2 장 설치 및 실행 설치 시 주의사항 설치 권고 사양 프로그램 설치 하드웨

<4D F736F F D F4E464320B1E2BCFAB0FA20BCADBAF1BDBAC0C720C7F6C0E7BFCD20B9CCB7A120C0FCB8C15FBCF6C1A45F>

MR-3000A-MAN.hwp


Chap06(Interprocess Communication).PDF

MPLAB C18 C

untitled

Preliminary spec(K93,K62_Chip_081118).xls

untitled

교육지원 IT시스템 선진화

고급 프로그래밍 설계

Information Memorandum Danam Communications Inc

5.스택(강의자료).key

(30) 우선권주장 61/360, 년06월30일 미국(US) 61/446, 년02월23일 미국(US) - 2 -

歯9장.PDF

인켈(국문)pdf.pdf

Transcription:

Bluetooth Embedded System Lab. II

Bluetooth Bluetooth 10 Harald Blaatand Project Ericsson Mobile Communication,1994 Embedded System Lab. II 2

Bluetooth Bluetooth SIG (Special Interest Group) Members Promoters : Ericsson, Nokia, IBM, Toshiba, Intel, Microsoft, Motorola, 3Com, Lucent Technologies Associate Adopter Website : www.bluetooth.com, www.bluetooth.org Embedded System Lab. II 3

Bluetooth Concept PDA PDA 10~100m PC LAN Bluetooth PC Embedded System Lab. II 4

Bluetooth Concept Data/Voice Access Points Cable Replacement Personal Ad-hoc Networks Embedded System Lab. II 5

Bluetooth,, Low Cost : $5 per Chip Low Power : 0.3~30mA ( ) Short Range : 10m~100m, (PAN),, 2.4GHz ISM (Industrial Scientific Medical) Band 79 Channel,1MHz/CH : 10~100m : 1Mbps Embedded System Lab. II 6

Bluetooth, PDA, SIG (Special Interest Group),. :,, // :,, Embedded System Lab. II 7

Bluetooth 2400~2483.5Mhz : 2Mhz / : 2Mhz 3.5Mhz BT = 0.5 GFSK, : 1Mbps, : 0.28~0.35 -FH ( 1,600, 1 time slot = 625usec - 79 (1MHz ), 23-1 : 100 mw, - 2 : 0.25~25 mw, 8~2 db - 3 : 1 mw 70 dbm (), BER = 10 TDD ( Time Division Duplex) :, : -, : 432.6 kbps -, : 721 kbps - 1/3 : 3-2/3 : (15,10) (Shortened /hamming) - ARQ (Automatic Repeat Request) Bluetooth 1.0b Embedded System Lab. II 8

Bluetooth :, PC ( PC), PC, PDA,, AV,,,, LAN () :, LAN (), Embedded System Lab. II 9

Bluetooth (Piconet) Bluetooth 1 Master 10m 7 Slave (Scatternet) 100m 100 Embedded System Lab. II 10

Embedded System Lab. II 11

Pxa255 Pro Bluetooth Module Product Name : BlueSEM-CII Bluetooth V1.1 Module New Product ID : BTxZ50x2xx (Old ID :BTM1C2NR50, BTMZ5012x0 &BTMZ5012x1) Product ID Definition Digit 1~2 : Product's Abbreviation (BT: Bluetooth) Digit 3 : Interface/Application (A: USB Interface) (B: RFCOMM Interface) (E: UART Interface, 115.2k) (x: Undecided Code) Digit 4~6 : Module Size ( Z50 : 0.5cc ) Digit 7 : Hardware Revision (Starting from 0 ; x: Undecided Code) Digit 8 : Power Class ( 2 : Class2 ) Digit 9 : Customer Code (x: Undecided Code) Digit 10 : Firmware Revision (x: Undecided Code) Embedded System Lab. II 12

Bluetooth Block Diagram Embedded System Lab. II 13

Bluetooth Physical Dimension Embedded System Lab. II 14

Bluetooth Pin Description Embedded System Lab. II 15

Bluetooth Pin Description Embedded System Lab. II 16

Bluetooth Test Application PXA-255 Bluetooth : 7 On Bluetooth ttys1 Ramdisk ttys2 Embedded System Lab. II 17

Bluetooth Test Application #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <termios.h> // tcgetattr(), tcsetattr() #include <stdio.h> #include <strings.h> #include <signal.h> #define BAUDRATE B115200 // #define MODEMDEVICE "/dev/ttys1" //ttys! #define _POSIX_SOURCE 1 #define FALSE 0 volatile int STOP=FALSE; Embedded System Lab. II 18

Bluetooth Test Application int main() { int test = 0; int c, res; struct termios oldtio,newtio; pid_t pid; int fdttys1; char my_nick[9]; char other_nick[9]; char sendtemp[255]; char sendbuf[255]; char receivebuf[255]; char ch; int nicksize,sendsize,i; //termids Embedded System Lab. II 19

Bluetooth Test Application fdttys1 = open(modemdevice, O_RDWR O_NOCTTY );//, if (fdttys1 <0) {perror(modemdevice); exit(-1); } tcgetattr(fdttys1,&oldtio); //guswo wkdclfmf djesmsek, termios, bzero(&newtio, sizeof(newtio));// clear newtio.c_cflag = BAUDRATE CS8 CLOCAL CREAD; //,, 8bit, local connetction( ), newtio.c_iflag = IGNPAR ICRNL; /* IGNPAR : Parity. ICRNL : CR NL. ( CR.) otherwise make device raw (no other input processing) */ newtio.c_oflag = 0; newtio.c_lflag = ICANON; /* ICANON : canonical. disable all echo functionality, and don't send signals to calling program */ Embedded System Lab. II 20

Bluetooth Test Application newtio.c_cc[vintr] = 0; //ctrl-c newtio.c_cc[vquit] = 0; //ctrl-/ newtio.c_cc[verase] = 0; //del newtio.c_cc[vkill] = 0; //@ newtio.c_cc[veof] = 4; //ctrl-d newtio.c_cc[vtime] = 0; //time -> inter-character timer unused newtio.c_cc[vmin] = 1; //read, blocking read until 1 character arrives newtio.c_cc[vswtc] = 0; //'\0' newtio.c_cc[vstart] = 0; //ctrl-q newtio.c_cc[vstop] = 0; //ctrl-s newtio.c_cc[vsusp] = 0; //ctrl-z newtio.c_cc[veol] = 0; //'\0' newtio.c_cc[vreprint] = 0; //ctrl-r newtio.c_cc[vdiscard] = 0; //ctrl-u newtio.c_cc[vwerase] = 0; //ctrl-w newtio.c_cc[vlnext] = 0; //ctrl-v newtio.c_cc[veol2] = 0; //'\0' /* modem. */ tcflush(fdttys1, TCIFLUSH); tcsetattr(fdttys1,tcsanow,&newtio); Embedded System Lab. II 21

Bluetooth Test Application printf("input your nickname(length<=8):"); scanf("%8s",&my_nick); nicksize=strlen(my_nick); for(i=0;i<nicksize;i++) sendbuf[i]=my_nick[i]; // my_nick sendbuf[nicksize++]='`'; // sendbuf[nicksize++]='s'; sendbuf[nicksize++]='a'; sendbuf[nicksize++]='y'; sendbuf[nicksize++]=':'; sendsize=0; char recv_id[9]; char allo_id[9]; //broadcast bluetooth nickname printf("input nickname to communicate(length<=8):"); scanf("%8s",&allo_id); printf("input 'q' to quit\n"); Embedded System Lab. II 22

Bluetooth Test Application if((pid=fork())<0){//child process printf("error!!"); return -1; } if(pid>0){//parent process //terminal data read while(ch!='q'){ res = read(fdttys1,receivebuf,255);//ttys1. for(i = 0; i < 9; i++){ if(receivebuf[i]!= '`') recv_id[i] = receivebuf[i]; else break; } if(!strcmp(allo_id, recv_id)){// nickname if(res>0) printf("%s\n",receivebuf); ch=receivebuf[nicksize]; } } kill(pid, SIGQUIT); } Embedded System Lab. II 23

Bluetooth Test Application } else{//child process // data terminal write gets(sendtemp); while(ch!='q'){ printf("=>"); gets(sendtemp); sendsize=strlen(sendtemp); if(sendsize>0){ for(i=nicksize;i<nicksize+sendsize;i++) sendbuf[i]=sendtemp[i-nicksize]; sendbuf[sendsize+nicksize]='\0'; sendbuf[sendsize+nicksize+1]='\n'; test = write(fdttys1,sendbuf,nicksize+2+sendsize); if(test == 0) printf("write error\n"); printf("%s\n",sendbuf); ch=sendtemp[0]; } } kill(pid, SIGQUIT); } tcsetattr(fdttys1,tcsanow,&oldtio); return 0; Embedded System Lab. II 24

Bluetooth Embedded System Lab. II 25