Hi Marcel,

Marcel Holtmann wrote:
Hi Pedro,

  
I am writing an applications that, among other things, sends an OBEX 
Push to a device (e.g. a mobile phone). This is working fine, except for 
one thing: whenever I send something to the device, the first time it 
always asks for the PIN. I have seen that, for example, kbluetooth (the 
KDE Bluetooth framework) and Impronto can send a file without pairing 
first. How can I do that?

I am sure that I am missing something, but still have not found what. In 
my application, I call to socket(), bind() to a local address 
(BDADDR_ANY) and then connect(). It is at the connect stage that the 
pairing takes place. I have been following the code of kbluetooth and 
all I can see is that I am doing essentially the same.
    

it seems that your device is working in security mode 3 and then
actually every ACL connection requests the authentication. The simple
answer is to use security mode 1/2.
  
Thank you for your fast answer.

I am not quite sure about the security mode the device is. How can I get it? In any case, I have executed (as root):

$ hciconfig hci0 noencrypt
$ hciconfig hci0 noauth

but still no success. With the same computer and configuration and as a normal user, if I send a file from KDE using kbtobexclient, it works as expected (no PIN requested, just the confirmation for receiving the message), so I believe that there is some other things to do. I guess that it should be a library call or somthing similar. Any suggestions?

Thanks,

Pedro