Fix build break for rpm
[framework/connectivity/bluez.git] / doc / serial-api.txt
1 BlueZ D-Bus Serial API description
2 **********************************
3
4 Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
5
6
7 Serial hierarchy
8 ================
9
10 Service         org.bluez
11 Interface       org.bluez.Serial
12 Object path     [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
13
14 Methods         string Connect(string pattern)
15
16                         Connects to a specific RFCOMM based service on a
17                         remote device and then creates a RFCOMM TTY
18                         device for it. The RFCOMM TTY device is returned.
19
20                         Possible patterns: UUID 128 bit as string
21                                            Profile short names, e.g: spp, dun
22                                            RFCOMM channel as string, 1-30
23
24                         Possible errors: org.bluez.Error.InvalidArguments
25                                          org.bluez.Error.InProgress
26                                          org.bluez.Error.ConnectionAttemptFailed
27                                          org.bluez.Error.NotSupported
28
29 Methods         fd ConnectFD(string pattern) [experimental]
30
31                         Connects to a specific RFCOMM based service on a
32                         remote device and returns a file descriptor to talk
33                          with this device.
34
35                         Possible patterns: UUID 128 bit as string
36                                            Profile short names, e.g: spp, dun
37                                            RFCOMM channel as string, 1-30
38
39                         Possible errors: org.bluez.Error.InvalidArguments
40                                          org.bluez.Error.InProgress
41                                          org.bluez.Error.ConnectionAttemptFailed
42                                          org.bluez.Error.NotSupported
43
44
45                 void Disconnect(string device)
46
47                         Disconnect a RFCOMM TTY device that has been
48                         created by Connect method.
49
50                         To abort a connection attempt in case of errors or
51                         timeouts in the client it is fine to call this method.
52
53                         In that case one of patterns of the Connect method should
54                         be supplied instead of the TTY device.
55
56                         Possible errors: org.bluez.Error.InvalidArguments
57                                          org.bluez.Error.DoesNotExist
58
59 Serial Proxy Manager hierarchy [experimental]
60 =============================================
61
62 Service         org.bluez
63 Interface       org.bluez.SerialProxyManager
64 Object path     [variable prefix]/{hci0,hci1,...}
65
66 Methods         array{string} ListProxies()
67
68                         Returns an array of the object path strings of
69                         all the proxies created for the adapter.
70
71                 string CreateProxy(string pattern, string address)
72
73                         Possible patterns: UUID 128 bit as string
74                                            Profile short names, e.g: spp, dun
75                                            RFCOMM channel as string, 1-30
76
77                         Address is the path to the TTY or Unix socket to be used.
78                         Only one proxy per address (TTY or Unix socket)
79                         is allowed.
80
81                         The object path of created proxy is returned.
82                         On success this will emit a ProxyCreated signal.
83
84                         Possible Errors: org.bluez.Error.InvalidArguments
85                                          org.bluez.Error.AlreadyExists
86                                          org.bluez.Error.Failed
87
88                 void RemoveProxy(string path)
89
90                         This removes the proxy object at the given path.
91                         On success this will emit a ProxyRemoved signal.
92
93                         Possible Errors: org.bluez.Error.DoesNotExist
94                                          org.bluez.Error.NotAuthorized
95
96 Signals         ProxyCreated(string path)
97
98                         This signal indicates a proxy was created.
99                         Parameter is object path of created proxy.
100
101                 ProxyRemoved(string path)
102
103                         This signal indicates a proxy was removed.
104                         Parameter is object path of removed proxy.
105
106 Serial Proxy hierarchy [experimental]
107 =====================================
108
109 Service         org.bluez
110 Interface       org.bluez.SerialProxy
111 Object path     [variable prefix]/{hci0,hci1,...}/{proxy0,proxy1,...}
112
113 Methods         void Enable()
114
115                         Starts to listen to the TTY or Unix socket, allocates
116                         a RFCOMM channel and add record to the server.
117
118                         Possible errors: org.bluez.Error.Failed
119
120                 void Disable()
121
122                         Stops to listen to the TTY or Unix socket, shutdown
123                         the RFCOMM channel allocated for the proxy, and remove
124                         record from the server.
125
126                         Possible errors: org.bluez.Error.Failed
127
128                 dict GetInfo()
129
130                         Returns all properties for the proxy. See the
131                         properties section for available properties.
132
133                 void SetSerialParameters(string rate, uint8 data, uint8 stop,
134                         string parity)
135
136                         Configures serial communication setting baud rate,
137                         data bits, stop bits and parity.
138
139                         Doesn't allow change TTY settings if it is open.
140
141                         Possible errors: org.bluez.Error.InvalidArguments
142                                          org.bluez.Error.NotAuthorized
143
144 Properties      string uuid [readonly]
145
146                         128-bit UUID that represents the available remote service.
147
148                 string address [readonly]
149
150                         Address is the path to the TTY or Unix socket name used,
151                         set when the proxy was created.
152
153                 uint8 channel [readonly]
154
155                         RFCOMM channel.
156
157                 boolean enabled [readonly]
158
159                         Indicates if the proxy is currently enabled.
160
161                 boolean connected [readonly]
162
163                         Indicates if the proxy is currently connected.