Changes between Initial Version and Version 1 of HowTo/Bluetooth/UsingCL


Ignore:
Timestamp:
May 9, 2007, 10:42:27 AM (18 years ago)
Author:
harisk
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/Bluetooth/UsingCL

    v1 v1  
     1= Using Bluetooth from the command line =
     2
     3== hci, hciconfig, and hcitool ==
     4
     5To Do
     6
     7{{{
     8/etc/bluetooth/hcid.conf
     9}}}
     10
     11== rfcomm ==
     12
     13The device is treated as a serial port and this utility enables to connect devices, i.e. stuff like
     14 * set channel
     15 * bind to a particular MAC address
     16
     17Affects file:
     18
     19{{{
     20/etc/bluetooth/rfcomm.conf
     21}}}
     22
     23Example:
     24
     25The device on node1-2 has MAC address 00:0A:3A:53:D4:CD
     26
     27{{{
     28node1-2:~# rfcomm -i hci0 listen 0 1
     29Waiting for connection on channel 1
     30Connection from 00:0A:3A:53:D4:82 to /dev/rfcomm0
     31Press CTRL-C for hangup
     32}}}
     33
     34{{{
     35node1-1:~# rfcomm -i hci0 connect 0 00:0A:3A:53:D4:CD 1
     36Connected /dev/rfcomm0 to 00:0A:3A:53:D4:CD on channel 1
     37Press CTRL-C for hangup
     38}}}
     39
     40== sdpd and sdptool ==
     41
     42To Do.
     43
     44== pand ==
     45
     46The daemon responsible for Personal Area Networks. Example:
     47
     48Set infrastructure mode: node1-1 as the master and node1-2 as the slave:
     49
     50{{{
     51node1-1:~# pand --listen -role NAP --master --autozap
     52node1-1:~# ifconfig bnep0 192.168.1.1
     53node1-1:~# ping 192.168.1.2
     54PING 192.168.1.2 (192.168.1.2): 56 data bytes
     5564 bytes from 192.168.1.2: icmp_seq=0 ttl=64 time=53.0 ms
     56}}}
     57
     58{{{
     59node1-2:~# pand --connect 00:0A:3A:53:D4:82 --service NAP --autozap
     60node1-2:~# ifconfig bnep0 192.168.1.2
     61node1-2:~# ping 192.168.1.1
     62PING 192.168.1.1 (192.168.1.1): 56 data bytes
     6364 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=74.9 ms
     6464 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=39.6 ms
     65}}}