* [PATCH 1/2] Add RequestSecurePinCode to agent API
@ 2011-06-08 14:05 Waldemar Rymarkiewicz
2011-06-08 14:05 ` [PATCH 2/2] Request secure pincode from agent when necessary Waldemar Rymarkiewicz
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Waldemar Rymarkiewicz @ 2011-06-08 14:05 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Johan Hedberg, Waldemar Rymarkiewicz
The method is called if min. 16 bytes pincode is mendatory
to authenticate connection.
In practice this will be called only with mgmtops switched on. Hciops
don't support secure pin code so far.
---
doc/agent-api.txt | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/doc/agent-api.txt b/doc/agent-api.txt
index 9ab2063..b1cb354 100644
--- a/doc/agent-api.txt
+++ b/doc/agent-api.txt
@@ -31,6 +31,17 @@ Methods void Release()
Possible errors: org.bluez.Error.Rejected
org.bluez.Error.Canceled
+ string RequestSecurePinCode(object device)
+
+ This method gets called when the service daemon
+ needs to get the secure passkey for an authentication.
+
+ The return value should be a string of 16 characters
+ length. The string can be alphanumeric.
+
+ Possible errors: org.bluez.Error.Rejected
+ org.bluez.Error.Canceled
+
uint32 RequestPasskey(object device)
This method gets called when the service daemon
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/2] Request secure pincode from agent when necessary 2011-06-08 14:05 [PATCH 1/2] Add RequestSecurePinCode to agent API Waldemar Rymarkiewicz @ 2011-06-08 14:05 ` Waldemar Rymarkiewicz 2011-06-08 17:56 ` [PATCH 1/2] Add RequestSecurePinCode to agent API Gustavo F. Padovan 2011-06-09 10:24 ` Marcel Holtmann 2 siblings, 0 replies; 10+ messages in thread From: Waldemar Rymarkiewicz @ 2011-06-08 14:05 UTC (permalink / raw) To: linux-bluetooth; +Cc: Johan Hedberg, Waldemar Rymarkiewicz --- src/agent.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/agent.c b/src/agent.c index 7bba849..d1494de 100644 --- a/src/agent.c +++ b/src/agent.c @@ -428,11 +428,9 @@ static int pincode_request_new(struct agent_request *req, const char *device_pat { struct agent *agent = req->agent; - /* TODO: Add a new method or a new param to Agent interface to request - secure pin. */ - req->msg = dbus_message_new_method_call(agent->name, agent->path, - "org.bluez.Agent", "RequestPinCode"); + "org.bluez.Agent", secure ? + "RequestSecurePinCode" : "RequestPinCode"); if (req->msg == NULL) { error("Couldn't allocate D-Bus message"); return -ENOMEM; -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Add RequestSecurePinCode to agent API 2011-06-08 14:05 [PATCH 1/2] Add RequestSecurePinCode to agent API Waldemar Rymarkiewicz 2011-06-08 14:05 ` [PATCH 2/2] Request secure pincode from agent when necessary Waldemar Rymarkiewicz @ 2011-06-08 17:56 ` Gustavo F. Padovan 2011-06-09 8:45 ` Waldemar.Rymarkiewicz 2011-06-09 10:24 ` Marcel Holtmann 2 siblings, 1 reply; 10+ messages in thread From: Gustavo F. Padovan @ 2011-06-08 17:56 UTC (permalink / raw) To: Waldemar Rymarkiewicz; +Cc: linux-bluetooth, Johan Hedberg * Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> [2011-06-08 16:05:19 +0200]: > The method is called if min. 16 bytes pincode is mendatory > to authenticate connection. > > In practice this will be called only with mgmtops switched on. Hciops > don't support secure pin code so far. > --- > doc/agent-api.txt | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/doc/agent-api.txt b/doc/agent-api.txt > index 9ab2063..b1cb354 100644 > --- a/doc/agent-api.txt > +++ b/doc/agent-api.txt > @@ -31,6 +31,17 @@ Methods void Release() > Possible errors: org.bluez.Error.Rejected > org.bluez.Error.Canceled > > + string RequestSecurePinCode(object device) > + > + This method gets called when the service daemon > + needs to get the secure passkey for an authentication. > + > + The return value should be a string of 16 characters > + length. The string can be alphanumeric. > + > + Possible errors: org.bluez.Error.Rejected > + org.bluez.Error.Canceled > + Why RequestPinCode() isn't enough? It can accept up to 16 characters. Alternatively we can add a Property to tell when to use pin code or not. For BlueZ 5.0 we can break this and add a length param to RequestPinCode(). Gustavo ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/2] Add RequestSecurePinCode to agent API 2011-06-08 17:56 ` [PATCH 1/2] Add RequestSecurePinCode to agent API Gustavo F. Padovan @ 2011-06-09 8:45 ` Waldemar.Rymarkiewicz 0 siblings, 0 replies; 10+ messages in thread From: Waldemar.Rymarkiewicz @ 2011-06-09 8:45 UTC (permalink / raw) To: padovan; +Cc: linux-bluetooth, johan.hedberg Hi Gustavo, >Why RequestPinCode() isn't enough? It can accept up to 16 characters. >Alternatively we can add a Property to tell when to use pin >code or not. > >For BlueZ 5.0 we can break this and add a length param to >RequestPinCode(). > It's not really matter of the length but the agent needs to know if secure pincode is required. RequestSecurePinCode doesn't break existing API as it's used with mgmtops only. If we go for RequestPinCode(boolean secure) this will break the API immediately. Property? Do you mean agent, adapter or device property? Well, RequestSecurePinCode seems to be the most clean solution for me, but of course it's a matter of discussion. Waldek ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Add RequestSecurePinCode to agent API 2011-06-08 14:05 [PATCH 1/2] Add RequestSecurePinCode to agent API Waldemar Rymarkiewicz 2011-06-08 14:05 ` [PATCH 2/2] Request secure pincode from agent when necessary Waldemar Rymarkiewicz 2011-06-08 17:56 ` [PATCH 1/2] Add RequestSecurePinCode to agent API Gustavo F. Padovan @ 2011-06-09 10:24 ` Marcel Holtmann 2011-06-09 12:38 ` Luiz Augusto von Dentz 2011-06-09 14:00 ` Waldemar.Rymarkiewicz 2 siblings, 2 replies; 10+ messages in thread From: Marcel Holtmann @ 2011-06-09 10:24 UTC (permalink / raw) To: Waldemar Rymarkiewicz; +Cc: linux-bluetooth, Johan Hedberg Hi Waldemar, > The method is called if min. 16 bytes pincode is mendatory > to authenticate connection. > > In practice this will be called only with mgmtops switched on. Hciops > don't support secure pin code so far. > --- > doc/agent-api.txt | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/doc/agent-api.txt b/doc/agent-api.txt > index 9ab2063..b1cb354 100644 > --- a/doc/agent-api.txt > +++ b/doc/agent-api.txt > @@ -31,6 +31,17 @@ Methods void Release() > Possible errors: org.bluez.Error.Rejected > org.bluez.Error.Canceled > > + string RequestSecurePinCode(object device) > + > + This method gets called when the service daemon > + needs to get the secure passkey for an authentication. > + > + The return value should be a string of 16 characters > + length. The string can be alphanumeric. > + > + Possible errors: org.bluez.Error.Rejected > + org.bluez.Error.Canceled > + I do not like this since it is really legacy stuff and makes since really complicated. And now we are making big efforts to support this and that is bad. Since Simple Pairing solved this nicely for us. However I need to talk with Johan about this and figure something out. Regards Marcel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Add RequestSecurePinCode to agent API 2011-06-09 10:24 ` Marcel Holtmann @ 2011-06-09 12:38 ` Luiz Augusto von Dentz 2011-06-09 19:18 ` Gustavo F. Padovan 2011-06-09 14:00 ` Waldemar.Rymarkiewicz 1 sibling, 1 reply; 10+ messages in thread From: Luiz Augusto von Dentz @ 2011-06-09 12:38 UTC (permalink / raw) To: Marcel Holtmann; +Cc: Waldemar Rymarkiewicz, linux-bluetooth, Johan Hedberg Hi Marcel, On Thu, Jun 9, 2011 at 7:24 PM, Marcel Holtmann <marcel@holtmann.org> wrote= : > Hi Waldemar, > >> The method is called if min. 16 bytes pincode is mendatory >> to authenticate connection. >> >> In practice this will be called only with mgmtops switched on. Hciops >> don't support secure pin code so far. >> --- >> =A0doc/agent-api.txt | =A0 11 +++++++++++ >> =A01 files changed, 11 insertions(+), 0 deletions(-) >> >> diff --git a/doc/agent-api.txt b/doc/agent-api.txt >> index 9ab2063..b1cb354 100644 >> --- a/doc/agent-api.txt >> +++ b/doc/agent-api.txt >> @@ -31,6 +31,17 @@ Methods =A0 =A0 =A0 =A0 =A0 =A0void Release() >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Possible errors: org.bluez.E= rror.Rejected >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0org.bluez.Error.Canceled >> >> + =A0 =A0 =A0 =A0 =A0 =A0 string RequestSecurePinCode(object device) >> + >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 This method gets called when t= he service daemon >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 needs to get the secure passke= y for an authentication. >> + >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 The return value should be a s= tring of 16 characters >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 length. The string can be alph= anumeric. >> + >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Possible errors: org.bluez.Err= or.Rejected >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0org.bluez.Error.Canceled >> + > > I do not like this since it is really legacy stuff and makes since > really complicated. And now we are making big efforts to support this > and that is bad. Since Simple Pairing solved this nicely for us. > > However I need to talk with Johan about this and figure something out. We are getting closer to 4.100, maybe it is time to start doing the transition to 5.x, which means we could start thinking on fixing the current API without worrying if it breaks or not. How about that? --=20 Luiz Augusto von Dentz Computer Engineer ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Add RequestSecurePinCode to agent API 2011-06-09 12:38 ` Luiz Augusto von Dentz @ 2011-06-09 19:18 ` Gustavo F. Padovan 2011-06-10 0:54 ` Luiz Augusto von Dentz 2011-06-10 1:14 ` Johan Hedberg 0 siblings, 2 replies; 10+ messages in thread From: Gustavo F. Padovan @ 2011-06-09 19:18 UTC (permalink / raw) To: Luiz Augusto von Dentz Cc: Marcel Holtmann, Waldemar Rymarkiewicz, linux-bluetooth, Johan Hedberg * Luiz Augusto von Dentz <luiz.dentz@gmail.com> [2011-06-09 21:38:22 +0900]: > Hi Marcel, >=20 > On Thu, Jun 9, 2011 at 7:24 PM, Marcel Holtmann <marcel@holtmann.org> wro= te: > > Hi Waldemar, > > > >> The method is called if min. 16 bytes pincode is mendatory > >> to authenticate connection. > >> > >> In practice this will be called only with mgmtops switched on. Hciops > >> don't support secure pin code so far. > >> --- > >> =A0doc/agent-api.txt | =A0 11 +++++++++++ > >> =A01 files changed, 11 insertions(+), 0 deletions(-) > >> > >> diff --git a/doc/agent-api.txt b/doc/agent-api.txt > >> index 9ab2063..b1cb354 100644 > >> --- a/doc/agent-api.txt > >> +++ b/doc/agent-api.txt > >> @@ -31,6 +31,17 @@ Methods =A0 =A0 =A0 =A0 =A0 =A0void Release() > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Possible errors: org.bluez= =2EError.Rejected > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0org.bluez.Error.Canceled > >> > >> + =A0 =A0 =A0 =A0 =A0 =A0 string RequestSecurePinCode(object device) > >> + > >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 This method gets called when= the service daemon > >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 needs to get the secure pass= key for an authentication. > >> + > >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 The return value should be a= string of 16 characters > >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 length. The string can be al= phanumeric. > >> + > >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Possible errors: org.bluez.E= rror.Rejected > >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0org.bluez.Error.Canceled > >> + > > > > I do not like this since it is really legacy stuff and makes since > > really complicated. And now we are making big efforts to support this > > and that is bad. Since Simple Pairing solved this nicely for us. > > > > However I need to talk with Johan about this and figure something out. >=20 > We are getting closer to 4.100, maybe it is time to start doing the > transition to 5.x, which means we could start thinking on fixing the > current API without worrying if it breaks or not. How about that? I'm with Luiz here. Unless we want the the crazy idea of have a development branch we should start breaking the API someday. How about now? And if we are really going for it a roadmap made public somewhere would be good. :) Gustavo ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Add RequestSecurePinCode to agent API 2011-06-09 19:18 ` Gustavo F. Padovan @ 2011-06-10 0:54 ` Luiz Augusto von Dentz 2011-06-10 1:14 ` Johan Hedberg 1 sibling, 0 replies; 10+ messages in thread From: Luiz Augusto von Dentz @ 2011-06-10 0:54 UTC (permalink / raw) To: Luiz Augusto von Dentz, Marcel Holtmann, Waldemar Rymarkiewicz, linux-bluetooth, Johan Hedberg Hi, On Fri, Jun 10, 2011 at 4:18 AM, Gustavo F. Padovan <padovan@profusion.mobi> wrote: > * Luiz Augusto von Dentz <luiz.dentz@gmail.com> [2011-06-09 21:38:22 +090= 0]: > >> Hi Marcel, >> >> On Thu, Jun 9, 2011 at 7:24 PM, Marcel Holtmann <marcel@holtmann.org> wr= ote: >> > Hi Waldemar, >> > >> >> The method is called if min. 16 bytes pincode is mendatory >> >> to authenticate connection. >> >> >> >> In practice this will be called only with mgmtops switched on. Hciops >> >> don't support secure pin code so far. >> >> --- >> >> =A0doc/agent-api.txt | =A0 11 +++++++++++ >> >> =A01 files changed, 11 insertions(+), 0 deletions(-) >> >> >> >> diff --git a/doc/agent-api.txt b/doc/agent-api.txt >> >> index 9ab2063..b1cb354 100644 >> >> --- a/doc/agent-api.txt >> >> +++ b/doc/agent-api.txt >> >> @@ -31,6 +31,17 @@ Methods =A0 =A0 =A0 =A0 =A0 =A0void Release() >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Possible errors: org.blue= z.Error.Rejected >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0org.bluez.Error.Canceled >> >> >> >> + =A0 =A0 =A0 =A0 =A0 =A0 string RequestSecurePinCode(object device) >> >> + >> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 This method gets called whe= n the service daemon >> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 needs to get the secure pas= skey for an authentication. >> >> + >> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 The return value should be = a string of 16 characters >> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 length. The string can be a= lphanumeric. >> >> + >> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Possible errors: org.bluez.= Error.Rejected >> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0org.bluez.Error.Canceled >> >> + >> > >> > I do not like this since it is really legacy stuff and makes since >> > really complicated. And now we are making big efforts to support this >> > and that is bad. Since Simple Pairing solved this nicely for us. >> > >> > However I need to talk with Johan about this and figure something out. >> >> We are getting closer to 4.100, maybe it is time to start doing the >> transition to 5.x, which means we could start thinking on fixing the >> current API without worrying if it breaks or not. How about that? > > I'm with Luiz here. Unless we want the the crazy idea of have a developme= nt > branch we should start breaking the API someday. How about now? > > And if we are really going for it a roadmap made public somewhere would b= e > good. :) Actually we can do it without breaking 4.x API like we did with 3.x where both API lives side by side until we decide it is stable enough, to do that we can have the new API having a different interface prefix e.g. org.bluez5 or just have a different connection with same interfaces names, the 1 option is less complicated for bluetoothd but requires more work on the client side while the second is more complicated for the daemon while the client just need to change the bus id. --=20 Luiz Augusto von Dentz Computer Engineer ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] Add RequestSecurePinCode to agent API 2011-06-09 19:18 ` Gustavo F. Padovan 2011-06-10 0:54 ` Luiz Augusto von Dentz @ 2011-06-10 1:14 ` Johan Hedberg 1 sibling, 0 replies; 10+ messages in thread From: Johan Hedberg @ 2011-06-10 1:14 UTC (permalink / raw) To: Luiz Augusto von Dentz, Marcel Holtmann, Waldemar Rymarkiewicz, linux-bluetooth Hi Gustavo, On Thu, Jun 09, 2011, Gustavo F. Padovan wrote: > > We are getting closer to 4.100, maybe it is time to start doing the > > transition to 5.x, which means we could start thinking on fixing the > > current API without worrying if it breaks or not. How about that? > > I'm with Luiz here. Unless we want the the crazy idea of have a development > branch we should start breaking the API someday. How about now? I'd prefer to have mgmtops.c on par with hciops.c for BR/EDR before doing the move to 5.x. I do prefer the RequestPinCode with the boolean parameter option, but since it breaks the API I think it needs to wait until we're ready to go for 5.0. Johan ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/2] Add RequestSecurePinCode to agent API 2011-06-09 10:24 ` Marcel Holtmann 2011-06-09 12:38 ` Luiz Augusto von Dentz @ 2011-06-09 14:00 ` Waldemar.Rymarkiewicz 1 sibling, 0 replies; 10+ messages in thread From: Waldemar.Rymarkiewicz @ 2011-06-09 14:00 UTC (permalink / raw) To: marcel; +Cc: linux-bluetooth, johan.hedberg, luiz.dentz Hi Marcel, >I do not like this since it is really legacy stuff and makes=20 >since really complicated. And now we are making big efforts to=20 >support this and that is bad. Since Simple Pairing solved this=20 >nicely for us. > >However I need to talk with Johan about this and figure something out. That's what happen when we do something that should be done at the begining= .=20 One good news, this seems like the last patchset in this topic :) I agree with Luiz, it's good idea to do it in bluez 5.x by adding just new = param in PinCodeRequest. Waldek ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-06-10 1:14 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-06-08 14:05 [PATCH 1/2] Add RequestSecurePinCode to agent API Waldemar Rymarkiewicz 2011-06-08 14:05 ` [PATCH 2/2] Request secure pincode from agent when necessary Waldemar Rymarkiewicz 2011-06-08 17:56 ` [PATCH 1/2] Add RequestSecurePinCode to agent API Gustavo F. Padovan 2011-06-09 8:45 ` Waldemar.Rymarkiewicz 2011-06-09 10:24 ` Marcel Holtmann 2011-06-09 12:38 ` Luiz Augusto von Dentz 2011-06-09 19:18 ` Gustavo F. Padovan 2011-06-10 0:54 ` Luiz Augusto von Dentz 2011-06-10 1:14 ` Johan Hedberg 2011-06-09 14:00 ` Waldemar.Rymarkiewicz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).