最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【整理】Linux/Ubuntu中的sdptool和sdptool中的OPUSH

Linux crifan 5793浏览 0评论

看到别人提到sdptool,去查了查,是个蓝牙方面的工具。

 

1.

sdptool(1) – Linux man page

sdptool(1) – Linux man page

Name sdptool — control and interrogate SDP servers

Synopsis

sdptool [options] {command} [command parameters …]

Description

sdptool provides the interface for performing SDP queries on Bluetooth devices, and administering a local sdpd.

Commands

The following commands are available. In all cases bdaddr specifies the device to search or browse. If local is used for bdaddr, then the local sdpd is searched.

Services are identified and manipulated with a 4-byte record_handle (NOT the service name). To find a service’s record_handle, look for the "Service RecHandle" line in the search or browse results

search [–bdaddr bdaddr] [–tree] [–raw] [–xml] service_name
Search for services..
Known service names are DID, SP, DUN, LAN, FAX, OPUSH,
FTP, HS, HF, HFAG, SAP, NAP, GN, PANU, HCRP, HID, CIP, A2SRC, A2SNK, AVRCT, AVRTG, UDIUE, UDITE and SYNCML.
browse [–tree] [–raw] [–xml] [bdaddr]
Browse all available services on the device specified by a Bluetooth address as a parameter.
records [–tree] [–raw] [–xml] bdaddr
Retrieve all possible service records.
add [ –handle=N –channel=N ]
Add a service to the local sdpd.
You can specify a handle for this record using
the –handle option.
You can specify a channel to add the service on
using the –channel option.
del record_handle
Remove a service from the local sdpd.
get [–tree] [–raw] [–xml] [–bdaddr bdaddr] record_handle
Retrieve a service from the local sdpd.
setattr record_handle attrib_id attrib_value
Set or add an attribute to an SDP record.
setseq record_handle attrib_id attrib_values
Set or add an attribute sequence to an SDP record.

Options

–help
Displays help on using sdptool.

Examples

sdptool browse 00:80:98:24:15:6D

sdptool browse local

sdptool add DUN

sdptool del 0x10000

 

2.看到其中有个:

OPUSH

感觉像是:

OPP

但是不确定。

后来是参考了:

List of Bluetooth profiles – Wikipedia, the free encyclopedia

Object Push Profile (OPP)

A basic profile for sending "objects" such as pictures, virtual business cards, or appointment details. It is called push because the transfers are always instigated by the sender (client), not the receiver (server).

OPP uses the APIs of OBEX profile and the OBEX operations which are used in OPP are connect, disconnect, put, get and abort. By using these API the OPP layer will reside over OBEX and hence follow the specifications of the Bluetooth stack.

确定此处的:

OPUSH就是OPP==Object Push Profile==用于发送传输文件的profile

 

后来看到:

Mobile phone access via bluetooth on Linux | Linux Tutorials

# sdptool search OPUSH
Inquiring …
Searching for OPUSH on 00:1F:01:28:B2:36 …
Service Name: OBEX Object Push

更加确定了:

OPUSH==OPP

转载请注明:在路上 » 【整理】Linux/Ubuntu中的sdptool和sdptool中的OPUSH

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.193 seconds, using 22.10MB memory