This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
pan:nap_operation [2017/10/29 03:01] 1.241.172.144 created |
pan:nap_operation [2017/11/07 16:40] (current) 1.241.172.144 |
||
|---|---|---|---|
| Line 219: | Line 219: | ||
| <code> | <code> | ||
| # hciconfig -a | # hciconfig -a | ||
| - | hci0: Type: Primary Bus: UART | + | hci0: Type: BR/EDR Bus: UART |
| - | BD Address: 00:18:9A:07:DC:7A ACL MTU: 620:5 SCO MTU: 64:8 | + | BD Address: 00:18:9A:26:93:23 ACL MTU: 620:5 SCO MTU: 64:8 |
| DOWN | DOWN | ||
| - | RX bytes:891 acl:0 sco:0 events:23 errors:0 | + | RX bytes:870 acl:0 sco:0 events:22 errors:0 |
| - | TX bytes:705 acl:0 sco:0 commands:22 errors:0 | + | TX bytes:446 acl:0 sco:0 commands:21 errors:0 |
| - | Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x59 0x83 | + | Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80 |
| Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 | Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 | ||
| Link policy: RSWITCH HOLD SNIFF PARK | Link policy: RSWITCH HOLD SNIFF PARK | ||
| Line 237: | Line 237: | ||
| Device setup complete | Device setup complete | ||
| # hciconfig -a | # hciconfig -a | ||
| - | hci0: Type: Primary Bus: UART | + | hci0: Type: BR/EDR Bus: UART |
| - | BD Address: 00:18:9A:07:DC:7A ACL MTU: 620:5 SCO MTU: 64:8 | + | BD Address: 00:18:9A:26:93:23 ACL MTU: 620:5 SCO MTU: 64:8 |
| - | UP RUNNING | + | UP RUNNING PSCAN |
| - | RX bytes:1754 acl:0 sco:0 events:45 errors:0 | + | RX bytes:870 acl:0 sco:0 events:22 errors:0 |
| - | TX bytes:1404 acl:0 sco:0 commands:45 errors:0 | + | TX bytes:446 acl:0 sco:0 commands:21 errors:0 |
| - | Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x59 0x83 | + | Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80 |
| Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 | Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 | ||
| Link policy: RSWITCH HOLD SNIFF PARK | Link policy: RSWITCH HOLD SNIFF PARK | ||
| Line 250: | Line 250: | ||
| Service Classes: Unspecified | Service Classes: Unspecified | ||
| Device Class: Miscellaneous, | Device Class: Miscellaneous, | ||
| - | HCI Version: 2.1 (0x4) Revision: 0x1899 | + | HCI Version: 2.0 (0x3) Revision: 0x10c6 |
| - | LMP Version: 2.1 (0x4) Subversion: 0x1899 | + | LMP Version: 2.0 (0x3) Subversion: 0x10c6 |
| Manufacturer: Cambridge Silicon Radio (10) | Manufacturer: Cambridge Silicon Radio (10) | ||
| </code> | </code> | ||
| Line 276: | Line 276: | ||
| LMP Version: 2.1 (0x4) Subversion: 0x1899 | LMP Version: 2.1 (0x4) Subversion: 0x1899 | ||
| Manufacturer: Cambridge Silicon Radio (10) | Manufacturer: Cambridge Silicon Radio (10) | ||
| + | </code> | ||
| + | |||
| + | 우리의 BT-AP 동작상의 PIN Code 생성을 위한 Seed를 만들어 놓기 위해 /usr/sbin/BT-Address 를 실행한다. | ||
| + | |||
| + | <code> | ||
| + | /usr/sbin/BT-Address | ||
| </code> | </code> | ||
| Line 319: | Line 325: | ||
| </code> | </code> | ||
| - | NAP 동작이 없으므로 추가 | + | NAP 동작이 없으므로 추가 - 해도되고 안해도 됨 |
| <code> | <code> | ||
| Line 338: | Line 344: | ||
| </code> | </code> | ||
| - | PANU의 연결 대기 중 | + | Agent를 등록한다. |
| + | <code> | ||
| + | #bt-agent & | ||
| + | # Agent registered | ||
| + | </code> | ||
| - | PANU 과 연결 및 Pairing | + | Network Connection을 생성한다. |
| <code> | <code> | ||
| - | Connecting to: 24:DB:ED:F2:53:4F ??? | + | #bt-nerwork --server nap br0 & |
| + | # NAP server registered | ||
| + | </code> | ||
| + | |||
| + | 대기하다보면 PANU에서 연결요청이 들어온다. | ||
| + | 이는 초기 한번만 실행된다. | ||
| + | |||
| + | <code> | ||
| + | |||
| + | Device: VI-0 (00:18:9A:26:93:23) | ||
| + | Access Bluetooth Address File | ||
| + | Retrieved line of length 9 : | ||
| + | 00515194 | ||
| + | Read Bluetooth Address Value = 00515194(0x0007DC7A) | ||
| + | Address :00515194(0x0007dc7a) | ||
| + | PIN code:11278784 | ||
| + | bluetoothd[211]: input-headset driver probe failed for device 00:18:9A:26:93:23 | ||
| - | Attempting to pair with 24:DB:ED:F2:53:4F | ||
| - | Request confirmation | ||
| - | Confirm passkey 336667 (yes/no): yes | ||
| </code> | </code> | ||
| - | #brctl addbr br0 | + | network 동작 요구 들어온다. |
| - | #bt-nerwork --server nap br0 & | + | |
| - | Network Connection을 생성한다. | + | <code> |
| + | Device: VI-0 (00:18:9A:26:93:23) | ||
| + | Authorize a connection to: 0000000f-0000-1000-8000-00805f9b34fb (yes/no)? bluetoothdbr01:: Apdodrntw c1n(ebtnoe:pb0e)0 entered blocking state | ||
| + | br0: port 1(bnep0) entered disabled state | ||
| + | device bnep0 entered promiscuous mode | ||
| + | bluetoothd[211]: bridge br0: interface bnep0br0: port 1(bnep0) entered blocking state | ||
| + | br0: port 1(bnep0) entered forwarding state | ||
| + | |||
| + | Bluetooth: Short BCSP packet | ||
| + | Bluetooth: Short BCSP packet | ||
| + | Bluetooth: Short BCSP packet | ||
| + | Bluetooth: Short BCSP packet | ||
| + | Bluetooth: Error in BCSP hdr checksum | ||
| + | Bluetooth: Short BCSP packet | ||
| + | Bluetooth: Short BCSP packet | ||
| + | Bluetooth: Short BCSP packet | ||
| + | Bluetooth: Short BCSP packet | ||
| + | Bluetooth: Short BCSP packet | ||
| + | Bluetooth: Short BCSP packet | ||
| + | Bluetooth: Error in BCSP hdr checksum | ||
| + | |||
| + | </code> | ||
| + | |||
| + | <code> | ||
| + | # ifconfig | ||
| + | bnep0 Link encap:Ethernet HWaddr 00:18:9A:07:DC:7A | ||
| + | inet6 addr: fe80::218:9aff:fe07:dc7a/64 Scope:Link | ||
| + | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | ||
| + | RX packets:11 errors:0 dropped:0 overruns:0 frame:0 | ||
| + | TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 | ||
| + | collisions:0 txqueuelen:1000 | ||
| + | RX bytes:935 (935.0 B) TX bytes:303 (303.0 B) | ||
| + | |||
| + | br0 Link encap:Ethernet HWaddr 00:18:9A:07:DC:7A | ||
| + | inet addr:172.16.10.1 Bcast:172.16.10.255 Mask:255.255.255.0 | ||
| + | inet6 addr: fe80::dcd0:e8ff:fe00:1984/64 Scope:Link | ||
| + | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | ||
| + | RX packets:11 errors:0 dropped:0 overruns:0 frame:0 | ||
| + | TX packets:17 errors:0 dropped:0 overruns:0 carrier:0 | ||
| + | collisions:0 txqueuelen:1000 | ||
| + | RX bytes:704 (704.0 B) TX bytes:1318 (1.2 KiB) | ||
| + | |||
| + | eth0 Link encap:Ethernet HWaddr 1A:B9:D9:29:CE:1C | ||
| + | inet addr:192.168.28.28 Bcast:192.168.28.255 Mask:255.255.255.0 | ||
| + | inet6 addr: fe80::18b9:d9ff:fe29:ce1c/64 Scope:Link | ||
| + | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | ||
| + | RX packets:7180 errors:0 dropped:0 overruns:0 frame:0 | ||
| + | TX packets:3174 errors:0 dropped:0 overruns:0 carrier:0 | ||
| + | collisions:0 txqueuelen:1000 | ||
| + | RX bytes:7956147 (7.5 MiB) TX bytes:514104 (502.0 KiB) | ||
| + | Interrupt:29 | ||
| + | |||
| + | lo Link encap:Local Loopback | ||
| + | inet addr:127.0.0.1 Mask:255.0.0.0 | ||
| + | inet6 addr: ::1/128 Scope:Host | ||
| + | UP LOOPBACK RUNNING MTU:65536 Metric:1 | ||
| + | RX packets:4 errors:0 dropped:0 overruns:0 frame:0 | ||
| + | TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 | ||
| + | collisions:0 txqueuelen:1 | ||
| + | RX bytes:340 (340.0 B) TX bytes:340 (340.0 B) | ||
| + | </code> | ||
| + | |||
| + | <code> | ||
| + | # route add -net 172.16.10.0 netmask 255.255.255.0 gw 172.16.10.1 dev br0 | ||
| + | # route add -net 192.168.28.0 netmask 255.255.255.0 gw 192.168.28.28 dev eth0 | ||
| + | # echo 1 > /proc/sys/net/ipv4/ip_forward | ||
| + | |||
| + | # ping 192.168.28.100 | ||
| + | PING 192.168.28.100 (192.168.28.100): 56 data bytes | ||
| + | 64 bytes from 192.168.28.100: seq=0 ttl=128 time=1.388 ms | ||
| + | 64 bytes from 192.168.28.100: seq=1 ttl=128 time=0.716 ms | ||
| + | ^C | ||
| + | --- 192.168.28.100 ping statistics --- | ||
| + | 2 packets transmitted, 2 packets received, 0% packet loss | ||
| + | round-trip min/avg/max = 0.716/1.052/1.388 ms | ||
| + | |||
| + | # ping 172.16.10.2 | ||
| + | PING 172.16.10.2 (172.16.10.2): 56 data bytes | ||
| + | 64 bytes from 172.16.10.2: seq=0 ttl=64 time=70.288 ms | ||
| + | 64 bytes from 172.16.10.2: seq=1 ttl=64 time=69.078 ms | ||
| + | ^C | ||
| + | --- 172.16.10.2 ping statistics --- | ||
| + | 3 packets transmitted, 2 packets received, 33% packet loss | ||
| + | round-trip min/avg/max = 69.078/69.683/70.288 ms | ||
| + | |||
| + | </code> | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | /etc/network/interfaces | ||
| + | |||
| + | <code> | ||
| + | auto lo | ||
| + | iface lo inet loopback | ||
| + | |||
| + | iface eth0 inet dhcp | ||
| + | |||
| + | auto br0 | ||
| + | iface br0 inet static | ||
| + | pre-up brctl addbr br0 | ||
| + | address 172.16.10.1 | ||
| + | network 172.16.10.0 | ||
| + | netmask 255.255.255.0 | ||
| + | broadcast 172.16.10.255 | ||
| + | |||
| + | auto pan1 | ||
| + | iface pan1 inet manual | ||
| + | pre-up brctl addbr br0 | ||
| + | pre-up brctl addif br0 $IFACE | ||
| + | pre-up ifconfig $IFACE 0.0.0.0 up | ||
| + | post-down ifconfig $IFACE down | ||
| + | post-down brctl delif br0 $IFACE | ||
| + | |||
| + | </code> | ||
| + | |||
| + | /etc/init.d/S80dhcp-server | ||
| + | |||
| + | <code> | ||
| + | ... | ||
| + | ## INTERFACES="" | ||
| + | INTERFACES="br0" | ||
| + | |||
| + | # Additional options that are passed to the DHCP server daemon? | ||
| + | OPTIONS="" | ||
| + | |||
| + | NAME="dhcpd" | ||
| + | DAEMON="/usr/sbin/${NAME}" | ||
| + | ## CFG_FILE="/etc/default/${NAME}" | ||
| + | CFG_FILE="/etc/dhcp/${NAME}" | ||
| + | ... | ||
| + | |||
| + | </code> | ||
| + | |||
| + | <code> | ||
| + | route | ||
| + | |||
| + | </code> | ||
| + | <code> | ||
| + | </code> | ||
| + | <code> | ||
| + | </code> | ||
| + | <code> | ||
| + | </code> | ||
| + | <code> | ||
| + | </code> | ||
| + | <code> | ||
| + | </code> | ||