How to use bluetooth tools --- hciattach hciconfig hcitool sdptool rfcomm .
2012-07-09 15:05
495 查看
create connection to bt device
1. HCI UART driver initialization, Attach the tty device
hciattach /dev/ttyS1 any 38400 flow
2. Open and initialize HCI device
hciconfig hci0 up
3. Get/Set local name
hciconfig hci0 name [name]
hciconfig hci0 name TEST --- set the name as "TEST"
4. Display local devices
hcitool dev
5. Scan for remote devices
hcitool scan
6. Create connection to remote device
hcitool cc
create connection to bt
spp
1. browse the spp sevice
# sdptool browse bdaddr
2. bind to a rfcomm device
# rfcomm bind /dev/rfcomm0 bdaddr
3. create a connection
# hcitool cc bdaddr
4. open minicom
Serial Device : /dev/rfcomm0
Bps/Par/Bits : 115200 8N1
Hardware Flow Control : No
Software Flow Control : No
# minicom -s rfc0
hcitool
Usage:
hcitool [options] <command> [command parameters]
Options:
--help Display help
-i dev HCI device
Commands:
dev Display local devices
inq Inquire remote devices
scan Scan for remote devices
name Get name from remote device
info Get information from remote device
spinq Start periodic inquiry
epinq Exit periodic inquiry
cmd Submit arbitrary HCI commands
con Display active connections
cc Create connection to remote device
dc Disconnect from remote device
sr Switch master/slave role
cpt Change connection packet type
rssi Display connection RSSI
lq Display link quality
tpl Display transmit power level
afh Display AFH channel map
lp Set/display link policy settings
lst Set/display link supervision timeout
auth Request authentication
enc Set connection encryption
key Change connection link key
clkoff Read clock offset
clock Read local or remote clock
sdptool
sdptool - SDP tool v4.60
Usage:
sdptool [options] <command> [command parameters]
Options:
-h Display help
-i Specify source interface
Commands:
search Search for a service
browse Browse all available services
records Request all records
add Add local service
del Delete local service
get Get local service
setattr Set/Add attribute to a SDP record
setseq Set/Add attribute sequence to a SDP record
Services:
DID SP DUN LAN FAX OPUSH FTP PRINT HS HSAG HF HFAG SAP PBAP NAP
GN PANU HCRP HID KEYB WIIMOTE CIP CTP A2SRC A2SNK AVRCT AVRTG
UDIUE UDITE SEMCHLA SR1 SYNCML SYNCMLSERV ACTIVESYNC HOTSYNC
PALMOS NOKID PCSUITE NFTP NSYNCML NGAGE APPLE ISYNC
rfcomm
RFCOMM configuration utility ver 4.60
Usage:
rfcomm [options] <command> <dev>
Options:
-i [hciX|bdaddr] Local HCI device or BD Address
-h, --help Display help
-r, --raw Switch TTY into raw mode
-A, --auth Enable authentication
-E, --encrypt Enable encryption
-S, --secure Secure connection
-M, --master Become the master of a piconet
-f, --config [file] Specify alternate config file
-a Show all devices (default)
Commands:
bind <dev> <bdaddr> [channel] Bind device
release <dev> Release device
show <dev> Show device
connect <dev> <bdaddr> [channel] Connect device
listen <dev> [channel [cmd]] Listen
watch <dev> [channel [cmd]] Watch
1. HCI UART driver initialization, Attach the tty device
hciattach /dev/ttyS1 any 38400 flow
2. Open and initialize HCI device
hciconfig hci0 up
3. Get/Set local name
hciconfig hci0 name [name]
hciconfig hci0 name TEST --- set the name as "TEST"
4. Display local devices
hcitool dev
5. Scan for remote devices
hcitool scan
6. Create connection to remote device
hcitool cc
create connection to bt
spp
1. browse the spp sevice
# sdptool browse bdaddr
2. bind to a rfcomm device
# rfcomm bind /dev/rfcomm0 bdaddr
3. create a connection
# hcitool cc bdaddr
4. open minicom
Serial Device : /dev/rfcomm0
Bps/Par/Bits : 115200 8N1
Hardware Flow Control : No
Software Flow Control : No
# minicom -s rfc0
hcitool
Usage:
hcitool [options] <command> [command parameters]
Options:
--help Display help
-i dev HCI device
Commands:
dev Display local devices
inq Inquire remote devices
scan Scan for remote devices
name Get name from remote device
info Get information from remote device
spinq Start periodic inquiry
epinq Exit periodic inquiry
cmd Submit arbitrary HCI commands
con Display active connections
cc Create connection to remote device
dc Disconnect from remote device
sr Switch master/slave role
cpt Change connection packet type
rssi Display connection RSSI
lq Display link quality
tpl Display transmit power level
afh Display AFH channel map
lp Set/display link policy settings
lst Set/display link supervision timeout
auth Request authentication
enc Set connection encryption
key Change connection link key
clkoff Read clock offset
clock Read local or remote clock
sdptool
sdptool - SDP tool v4.60
Usage:
sdptool [options] <command> [command parameters]
Options:
-h Display help
-i Specify source interface
Commands:
search Search for a service
browse Browse all available services
records Request all records
add Add local service
del Delete local service
get Get local service
setattr Set/Add attribute to a SDP record
setseq Set/Add attribute sequence to a SDP record
Services:
DID SP DUN LAN FAX OPUSH FTP PRINT HS HSAG HF HFAG SAP PBAP NAP
GN PANU HCRP HID KEYB WIIMOTE CIP CTP A2SRC A2SNK AVRCT AVRTG
UDIUE UDITE SEMCHLA SR1 SYNCML SYNCMLSERV ACTIVESYNC HOTSYNC
PALMOS NOKID PCSUITE NFTP NSYNCML NGAGE APPLE ISYNC
rfcomm
RFCOMM configuration utility ver 4.60
Usage:
rfcomm [options] <command> <dev>
Options:
-i [hciX|bdaddr] Local HCI device or BD Address
-h, --help Display help
-r, --raw Switch TTY into raw mode
-A, --auth Enable authentication
-E, --encrypt Enable encryption
-S, --secure Secure connection
-M, --master Become the master of a piconet
-f, --config [file] Specify alternate config file
-a Show all devices (default)
Commands:
bind <dev> <bdaddr> [channel] Bind device
release <dev> Release device
show <dev> Show device
connect <dev> <bdaddr> [channel] Connect device
listen <dev> [channel [cmd]] Listen
watch <dev> [channel [cmd]] Watch
相关文章推荐
- How to use bluetooth tools --- hciattach hciconfig hcitool sdptool rfcomm
- How to use bluetooth tools --- hciattach hciconfig hcitool sdptool rfcomm
- How to use Bundle&Minifier and bundleconfig.json in ASP.NET Core
- How to use the "Enties Generator" tool to create an entities project.
- How to use the tools provided to train Tesseract for a new language.
- How to use the tools provided to train Tesseract for a new language
- How To Install and Use the Web Application Stress (WAS) Tool
- Umdhtools.exe: How to Use Umdh.exe to Find Memory Leaks
- How to use the tools provided to train Tesseract for a new language
- How to use BMW Multi Tool 7.3 to replace lost key for BMW X1
- How to use QToolBar and QToolButton in Qt
- How to use QToolBar and QToolButton in Qt
- Howto use vimdiff as "git diff"'s diff tool
- How to use Tornado GNU tools with Eclipse 3.2 / CDT 3.1
- how to config when use hibernate+sqlserver2005
- how to config and use apt-get
- How to use the Security Configuration and Analysis tool
- How to Use Android ADB Command Line Tool on mac
- Managing Compiler Toolchains How to manage XDCtools use of your compiler toolchain
- 如何使用表维护工具。how to use the table extent maintenance tool