2006-10-04 20:00:40

by Per Thomas Jahr

[permalink] [raw]
Subject: [Bluez-users] Problems with security block

Hi,

(I hope this is the correct list to post questions like this to).

I'm programming a Java server that listens for incoming bluetooth
connections. This server runs on Fedora 4 with the avetana library as
the layer between Java and bluez. For the client, I use a Sony Ericsson
K800i with a small application written in Java Micro Edition.

Most things works fine, except for the second connection attempt from my
client to the server. For this attempt, I always get the message
"security block" in the client and the connection attempt fails. The
only way to connect again is to restart my server. Using hcidump shows
that there is far less information exchanged in the second attempt than
in the first.

Does anyone know what happens? It seems like bluez keeps information
about known devices or handle devices that have connected differently.
If so, can I somehow get bluez to forget about already connected
devices?

The documentation [1] says this about the error I'm getting:

SECURITY_BLOCK:
"Indicates the connection failed because the security settings on the
local device or the remote device were incompatible with the request."

Thanks
Per Thomas Jahr


[1]
http://java.sun.com/javame/reference/apis/jsr082/javax/bluetooth/BluetoothConnectionException.html


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2006-10-05 06:49:31

by Per Thomas Jahr

[permalink] [raw]
Subject: Re: [Bluez-users] Problems with security block

On Wed, 2006-10-04 at 22:20 +0200, Marcel Holtmann wrote:
> Hi Per,
>
> > > show us the output of "hcidump -X -V" for both attempts.
> >
> > That was quick :-)
> >
> > Outputs for both attempts are attached.
>
> it seems that the RFCOMM server on the Linux died between the connects
> or is no longer accepting another incoming connection.

OK, I see. I will take a closer look at my accept and open loop in the
server. Thanks.

--
Per Thomas


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-10-04 20:20:27

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Problems with security block

Hi Per,

> > show us the output of "hcidump -X -V" for both attempts.
>
> That was quick :-)
>
> Outputs for both attempts are attached.

it seems that the RFCOMM server on the Linux died between the connects
or is no longer accepting another incoming connection.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-10-04 20:05:39

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Problems with security block

Hi Per,

> I'm programming a Java server that listens for incoming bluetooth
> connections. This server runs on Fedora 4 with the avetana library as
> the layer between Java and bluez. For the client, I use a Sony Ericsson
> K800i with a small application written in Java Micro Edition.
>
> Most things works fine, except for the second connection attempt from my
> client to the server. For this attempt, I always get the message
> "security block" in the client and the connection attempt fails. The
> only way to connect again is to restart my server. Using hcidump shows
> that there is far less information exchanged in the second attempt than
> in the first.
>
> Does anyone know what happens? It seems like bluez keeps information
> about known devices or handle devices that have connected differently.
> If so, can I somehow get bluez to forget about already connected
> devices?

show us the output of "hcidump -X -V" for both attempts.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users