1 BlueZ D-Bus Agent API description
2 **********************************
5 Agent Manager hierarchy
6 =======================
9 Interface org.bluez.AgentManager1
10 Object path /org/bluez
12 void RegisterAgent(object agent, string capability)
14 This registers an agent handler.
16 The object path defines the path of the agent
17 that will be called when user input is needed.
19 Every application can register its own agent and
20 for all actions triggered by that application its
23 It is not required by an application to register
24 an agent. If an application does chooses to not
25 register an agent, the default agent is used. This
26 is on most cases a good idea. Only application
27 like a pairing wizard should register their own
30 An application can only register one agent. Multiple
31 agents per application is not supported.
33 The capability parameter can have the values
34 "DisplayOnly", "DisplayYesNo", "KeyboardOnly",
35 "NoInputNoOutput" and "KeyboardDisplay" which
36 reflects the input and output capabilities of the
39 If an empty string is used it will fallback to
42 Possible errors: org.bluez.Error.InvalidArguments
43 org.bluez.Error.AlreadyExists
45 void UnregisterAgent(object agent)
47 This unregisters the agent that has been previously
48 registered. The object path parameter must match the
49 same value that has been used on registration.
51 Possible errors: org.bluez.Error.DoesNotExist
53 void RequestDefaultAgent(object agent)
55 This requests is to make the application agent
56 the default agent. The application is required
59 Special permission might be required to become
62 Possible errors: org.bluez.Error.DoesNotExist
69 Interface org.bluez.Agent1
70 Object path freely definable
72 Methods void Release()
74 This method gets called when the service daemon
75 unregisters the agent. An agent can use it to do
76 cleanup tasks. There is no need to unregister the
77 agent, because when this method gets called it has
78 already been unregistered.
80 string RequestPinCode(object device)
82 This method gets called when the service daemon
83 needs to get the passkey for an authentication.
85 The return value should be a string of 1-16 characters
86 length. The string can be alphanumeric.
88 Possible errors: org.bluez.Error.Rejected
89 org.bluez.Error.Canceled
91 void DisplayPinCode(object device, string pincode)
93 This method gets called when the service daemon
94 needs to display a pincode for an authentication.
96 An empty reply should be returned. When the pincode
97 needs no longer to be displayed, the Cancel method
98 of the agent will be called.
100 This is used during the pairing process of keyboards
101 that don't support Bluetooth 2.1 Secure Simple Pairing,
102 in contrast to DisplayPasskey which is used for those
105 This method will only ever be called once since
106 older keyboards do not support typing notification.
108 Note that the PIN will always be a 6-digit number,
109 zero-padded to 6 digits. This is for harmony with
110 the later specification.
112 Possible errors: org.bluez.Error.Rejected
113 org.bluez.Error.Canceled
115 uint32 RequestPasskey(object device)
117 This method gets called when the service daemon
118 needs to get the passkey for an authentication.
120 The return value should be a numeric value
123 Possible errors: org.bluez.Error.Rejected
124 org.bluez.Error.Canceled
126 void DisplayPasskey(object device, uint32 passkey,
129 This method gets called when the service daemon
130 needs to display a passkey for an authentication.
132 The entered parameter indicates the number of already
133 typed keys on the remote side.
135 An empty reply should be returned. When the passkey
136 needs no longer to be displayed, the Cancel method
137 of the agent will be called.
139 During the pairing process this method might be
140 called multiple times to update the entered value.
142 Note that the passkey will always be a 6-digit number,
143 so the display should be zero-padded at the start if
144 the value contains less than 6 digits.
146 void RequestConfirmation(object device, uint32 passkey)
148 This method gets called when the service daemon
149 needs to confirm a passkey for an authentication.
151 To confirm the value it should return an empty reply
152 or an error in case the passkey is invalid.
154 Note that the passkey will always be a 6-digit number,
155 so the display should be zero-padded at the start if
156 the value contains less than 6 digits.
158 Possible errors: org.bluez.Error.Rejected
159 org.bluez.Error.Canceled
161 void RequestAuthorization(object device)
163 This method gets called to request the user to
164 authorize an incoming pairing attempt which
165 would in other circumstances trigger the just-works
168 Possible errors: org.bluez.Error.Rejected
169 org.bluez.Error.Canceled
171 void AuthorizeService(object device, string uuid)
173 This method gets called when the service daemon
174 needs to authorize a connection/service request.
176 Possible errors: org.bluez.Error.Rejected
177 org.bluez.Error.Canceled
181 This method gets called to indicate that the agent
182 request failed before a reply was returned.