1ORG.BLUEZ.AGENT(5) Linux System Administration ORG.BLUEZ.AGENT(5)
2
3
4
6 org.bluez.Agent - BlueZ D-Bus Agent API documentation
7
9 Service
10 unique name
11
12 Interface
13 org.bluez.Agent1
14
15 Object path
16 freely definable
17
18 Methods
19 void Release()
20 This method gets called when the service daemon unregisters the
21 agent. An agent can use it to do cleanup tasks. There is no need to
22 unregister the agent, because when this method gets called it has
23 already been unregistered.
24
25 string RequestPinCode(object device)
26 This method gets called when the service daemon needs to get the
27 passkey for an authentication.
28
29 The return value should be a string of 1-16 characters length. The
30 string can be alphanumeric.
31
32 Possible errors:
33
34 org.bluez.Error.Rejected
35
36 org.bluez.Error.Canceled
37
38 void DisplayPinCode(object device, string pincode)
39 This method gets called when the service daemon needs to display a
40 pincode for an authentication.
41
42 An empty reply should be returned. When the pincode needs no longer
43 to be displayed, the Cancel method of the agent will be called.
44
45 This is used during the pairing process of keyboards that don't sup‐
46 port Bluetooth 2.1 Secure Simple Pairing, in contrast to Display‐
47 Passkey which is used for those that do.
48
49 This method will only ever be called once since older keyboards do
50 not support typing notification.
51
52 Note that the PIN will always be a 6-digit number, zero-padded to 6
53 digits. This is for harmony with the later specification.
54
55 Possible errors:
56
57 org.bluez.Error.Rejected
58
59 org.bluez.Error.Canceled
60
61 uint32 RequestPasskey(object device)
62 This method gets called when the service daemon needs to get the
63 passkey for an authentication.
64
65 The return value should be a numeric value between 0-999999.
66
67 Possible errors:
68
69 org.bluez.Error.Rejected
70
71 org.bluez.Error.Canceled
72
73 void DisplayPasskey(object device, uint32 passkey, uint16 entered)
74 This method gets called when the service daemon needs to display a
75 passkey for an authentication.
76
77 The entered parameter indicates the number of already typed keys on
78 the remote side.
79
80 An empty reply should be returned. When the passkey needs no longer
81 to be displayed, the Cancel method of the agent will be called.
82
83 During the pairing process this method might be called multiple
84 times to update the entered value.
85
86 Note that the passkey will always be a 6-digit number, so the dis‐
87 play should be zero-padded at the start if the value contains less
88 than 6 digits.
89
90 void RequestConfirmation(object device, uint32 passkey)
91 This method gets called when the service daemon needs to confirm a
92 passkey for an authentication.
93
94 To confirm the value it should return an empty reply or an error in
95 case the passkey is invalid.
96
97 Note that the passkey will always be a 6-digit number, so the dis‐
98 play should be zero-padded at the start if the value contains less
99 than 6 digits.
100
101 Possible errors:
102
103 org.bluez.Error.Rejected
104
105 org.bluez.Error.Canceled
106
107 void RequestAuthorization(object device)
108 This method gets called to request the user to authorize an incoming
109 pairing attempt which would in other circumstances trigger the
110 just-works model, or when the user plugged in a device that imple‐
111 ments cable pairing. In the latter case, the device would not be
112 connected to the adapter via Bluetooth yet.
113
114 Possible errors:
115
116 org.bluez.Error.Rejected
117
118 org.bluez.Error.Canceled
119
120 void AuthorizeService(object device, string uuid)
121 This method gets called when the service daemon needs to authorize a
122 connection/service request.
123
124 Possible errors:
125
126 org.bluez.Error.Rejected
127
128 org.bluez.Error.Canceled
129
130 void Cancel()
131 This method gets called to indicate that the agent request failed
132 before a reply was returned.
133
134
135
136
137BlueZ October 2023 ORG.BLUEZ.AGENT(5)