2003-10-29 14:21:32

by Dan ABITBOL

[permalink] [raw]
Subject: [Bluez-users] CLASS OF DEVICE AND L2CAP INCOMING CONNECTION REQUESTS

Hello,
I just wanted to know how to :

1/ get the class of device of the remote device when I accept an l2cap incoming connection request...
2/ and/or make a filter to allow l2cap incoming connections requests only from devices that have a specific class of device .

Thanks

Dan Abitbol
--------------------------------------------
Bloophone/Protocols Team
--------------------------------------------
96, bld Sebastopol
75003 Paris, France
tel: +(33)1 44 54 05 50
fax: +(33)1 44 54 05 15
mob:+(33)6 62 16 86 17
--------------------------------------------
Come visit us at http://www.bloophone.com


Attachments:
logobloo_1.jpg (4.52 kB)

2003-10-29 15:15:21

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] CLASS OF DEVICE AND L2CAP INCOMING CONNECTION REQUESTS

Hi Xavier,

> > > 2/ and/or make a filter to allow l2cap incoming connections requests
> > > only from devices that have a specific class of device .
> >
> > I don't have any real thought about this. Any comments from other
> > people?
>
> This can be achieved at hci level by sending a Set_Event_Filter command (OGF =
> 3, OCF =5) with filter type set to 2, Filter_condition_type to 1 and the
> condition, composed of the CoD that interrests you followed by a mask
> indicating the bits of interrest in the preceding CoD.
>
> The problem is i'm sure you need to be root to do that and it forbids hci
> connections ...

you will need to be root for that and it will block all HCI connections
without the correct CoD. This is only usable for device where you have a
limited or known number of supported profiles. We should build this at
L2CAP level and use the same filter structure like the spec. uses for
Set_Event_Filter.

One reason for me in which case this makes sense is for the HID server
process on the host, because the connections from non-HID devices on the
L2CAP PSM's can be dropped at L2CAP level and the HID server don't have
to care about it. This means that no unneeded SDP connections are made.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2003-10-29 15:07:45

by Xavier Garreau

[permalink] [raw]
Subject: Re: [Bluez-users] CLASS OF DEVICE AND L2CAP INCOMING CONNECTION REQUESTS

Le Mercredi 29 Octobre 2003 15:33, Marcel Holtmann a =E9crit :
> > 2/ and/or make a filter to allow l2cap incoming connections request=
s
> > only from devices that have a specific class of device .
>
> I don't have any real thought about this. Any comments from other
> people?

This can be achieved at hci level by sending a Set_Event_Filter command (=
OGF =3D=20
3, OCF =3D5) with filter type set to 2, Filter_condition_type to 1 and th=
e=20
condition, composed of the CoD that interrests you followed by a mask=20
indicating the bits of interrest in the preceding CoD.

The problem is i'm sure you need to be root to do that and it forbids hci=
=20
connections ...

Regards,
--=20
Xavier Garreau
http://www.xgarreau.org

2003-10-29 14:33:18

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] CLASS OF DEVICE AND L2CAP INCOMING CONNECTION REQUESTS

Hi Dan,

first of all, start sending emails without background images and don't
write the subject complete in upper cases. Some spam filter can kick you
away and I tend to delete such mails without reading it ;)

> 1/ get the class of device of the remote device when I accept an l2cap incoming connection request...

I already thought of this. First we should add a class of device field
to the kernel structure hci_conn. The HCI core layer must fill in the
correct values on HCI connection request events.

> 2/ and/or make a filter to allow l2cap incoming connections requests only from devices that have a specific class of device .

I don't have any real thought about this. Any comments from other
people?

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users