EMDK-4000 에서 테스트
Emdk-4000(Linux) <== connect ==> PC (Ubuntu linux)
EMDK-4000 보드를 부팅 후,
root@h1940:~# hciconfig
root@h1940:~# hciattach /dev/ttySAC1 any 115200 noflow
root@h1940:~# hciconfig
hci0: Type: UART
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
DOWN INIT RUNNING
RX bytes:0 acl:0 sco:0 events:0 errors:0
TX bytes:4 acl:0 sco:0 commands:1 errors:0
root@h1940:~# hciconfig hci0 up
root@h1940:~# hciconfig
hci0: Type: UART
BD Address: BD:B2:03:20:00:04 ACL MTU: 339:7 SCO MTU: 64:0
UP RUNNING PSCAN ISCAN
RX bytes:132 acl:0 sco:0 events:15 errors:0
TX bytes:333 acl:0 sco:0 commands:16 errors:0
root@h1940:~# hciconfig -a
hci0: Type: UART
BD Address: BD:B2:03:20:00:04 ACL MTU: 339:7 SCO MTU: 64:0
UP RUNNING PSCAN ISCAN
RX bytes:132 acl:0 sco:0 events:15 errors:0
TX bytes:333 acl:0 sco:0 commands:16 errors:0
Features: 0xff 0xed 0x8d 0xf8 0x1a 0x08 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV3
Link policy:
Link mode: SLAVE ACCEPT
Name: 'EMDK-4O00'
Class: 0x120112
Service Classes: Networking
Device Class: Computer, Handheld
HCI Ver: 1.2 (0x2) HCI Rev: 0x698 LMP Ver: 1.2 (0x2) LMP Subver:a
Manufacturer: Philips Semiconductors (37)
root@h1940:~#
root@h1940:~# hciattach /dev/ttySAC1 any 115200 noflow
root@h1940:~# hciconfig
hci0: Type: UART
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
DOWN INIT RUNNING
RX bytes:0 acl:0 sco:0 events:0 errors:0
TX bytes:4 acl:0 sco:0 commands:1 errors:0
root@h1940:~# hciconfig hci0 up
root@h1940:~# hciconfig
hci0: Type: UART
BD Address: BD:B2:03:20:00:04 ACL MTU: 339:7 SCO MTU: 64:0
UP RUNNING PSCAN ISCAN
RX bytes:132 acl:0 sco:0 events:15 errors:0
TX bytes:333 acl:0 sco:0 commands:16 errors:0
root@h1940:~# hciconfig -a
hci0: Type: UART
BD Address: BD:B2:03:20:00:04 ACL MTU: 339:7 SCO MTU: 64:0
UP RUNNING PSCAN ISCAN
RX bytes:132 acl:0 sco:0 events:15 errors:0
TX bytes:333 acl:0 sco:0 commands:16 errors:0
Features: 0xff 0xed 0x8d 0xf8 0x1a 0x08 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV3
Link policy:
Link mode: SLAVE ACCEPT
Name: 'EMDK-4O00'
Class: 0x120112
Service Classes: Networking
Device Class: Computer, Handheld
HCI Ver: 1.2 (0x2) HCI Rev: 0x698 LMP Ver: 1.2 (0x2) LMP Subver:a
Manufacturer: Philips Semiconductors (37)
root@h1940:~#
자, 이렇게 하면 블루투스 동글이 emdk-4000 보드에 정상적으로 붙은것이다.
다른 장치에서 연결 할수 있도록, 'listen' 모드로...
'&' 는 백그라운드에서 동작여부를 선택한다.
root@h1940:~# hcitool -i hci0 scan << 다른 장치 검색
Scanning ...
00:02:72:03:6A:85 kims-desktop-0
00:02:72:03:6A:8B extrahive-0
root@h1940:~# rfcomm -i hci0 listen 0 & << 접속 대기, '&'기호는 백그라운드 동작
root@h1940:~# Waiting for connection on channel 1
root@h1940:~# cat /dev/rfcomm0
OK
ok
Good
Disconnected
Scanning ...
00:02:72:03:6A:85 kims-desktop-0
00:02:72:03:6A:8B extrahive-0
root@h1940:~# rfcomm -i hci0 listen 0 & << 접속 대기, '&'기호는 백그라운드 동작
root@h1940:~# Waiting for connection on channel 1
root@h1940:~# cat /dev/rfcomm0
OK
ok
Good
Disconnected
다른 PC에서 블루투스를 이용하여 connect !!
kims@kims-desktop:~$ rfcomm -i hci0 connect 0 BD:B2:03:20:00:04 &
[1] 12670
kims@kims-desktop:~$ Connected /dev/rfcomm0 to BD:B2:03:20:00:04 on channel 1
Press CTRL-C for hangup
kims@kims-desktop:~$ cat > /dev/rfcomm0
OK
ok
Good
Disconnected
[1]+ Done rfcomm -i hci0 connect 0 BD:B2:03:20:00:04
[1] 12670
kims@kims-desktop:~$ Connected /dev/rfcomm0 to BD:B2:03:20:00:04 on channel 1
Press CTRL-C for hangup
kims@kims-desktop:~$ cat > /dev/rfcomm0
OK
ok
Good
Disconnected
[1]+ Done rfcomm -i hci0 connect 0 BD:B2:03:20:00:04
cf) cat 명령을 이용하여 rfcomm으로 전송 되는 데이터를 확인한다.
데이터 전송 쪽 ~$ cat > /dev/rfcomm0
데이터 받는 쪽 ~$ cat /dev/rfcomm0
'이것저것 > My_Work' 카테고리의 다른 글
잡다( vi 등등) 설정 및 사용법 마구 작성 중 (0) | 2007.02.27 |
---|---|
블루투스 디버깅 관련 - Permission denied (0) | 2007.02.27 |
WinCE 플레싱 (0) | 2007.02.23 |
[UBUNTU]Samba server에 마운트!! (0) | 2007.02.19 |
[UBUNTU] C Compiler error (0) | 2007.02.19 |