[Bluez-devel] RFComm auth/encrypt

Denis KENZIOR
2006-08-23T06:21:38Z

Marcel,

I'm trying to use the OpenOBEX bluetooth functions, but want to control the
service level security options. Since OpenOBEX does a listen for me, I can't
set the security options before a listen occurs. So my question is:
On a rfcomm server socket, when is the right time to set the link_mode flags?
E.g. do I have to set it before the listen call? Or setting them at any
point after the listen is OK (and actually works) as well?

E.g. Here's what I'm trying to do:
BtOBEX_ServerRegister(self, &bdaddr, channel);
setsockopt(OBEX_GetFD(self), SOL_RFCOMM, RFCOMM_LM, &lm, sizeof(lm));

And on the client side, it seems that the client can request security options
to be set as well. Again, when is the right time to do this? After the
socket call but before the connect? Can authentication be requested after
the client socket is connected?

-Denis