2005-01-25 11:11:43

by Matthias

[permalink] [raw]
Subject: [Bluez-devel] Bypass for L2CAP packets

Hi Folks,
sorry for a question to the same problem again...
I have a (problem) with the L2CAP layer from BlueZ.
I wrote a program that communicates with a mobile phone by using its own L2CAP
layer (the program builds its own L2CAP packets for protocol testing).
For example I send a valid "connection request" to that phone and the phone
answers with a valid "connection response".
So far so good.
But then the L2CAP layer from BlueZ sends a "command reject", because this
layer doesn´t know about the "connection request" and cannot handle
the "connection response".
Ok, i understand that.
But has anybody an idea how i can communicate with my own L2CAP layer and the
phone only without using the BlueZ L2CAP layer, because the Bluez layer always
prevents a further communication?
Hmm... is in this case the L2CAP RAW socket the solution?
I´m stucked with that problem and i hope anybody as an idea.

Many thanks.

Matthias



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2005-01-25 12:54:00

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Bypass for L2CAP packets

Hi Matthias,

> sorry for a question to the same problem again...
> I have a (problem) with the L2CAP layer from BlueZ.
> I wrote a program that communicates with a mobile phone by using its ow=
n L2CAP=20
> layer (the program builds its own L2CAP packets for protocol testing).
> For example I send a valid "connection request" to that phone and the p=
hone=20
> answers with a valid "connection response".
> So far so good.=20
> But then the L2CAP layer from BlueZ sends a "command reject", because t=
his=20
> layer doesn=B4t know about the "connection request" and cannot handle=20
> the "connection response".
> Ok, i understand that.=20
> But has anybody an idea how i can communicate with my own L2CAP layer a=
nd the=20
> phone only without using the BlueZ L2CAP layer, because the Bluez layer=
always=20
> prevents a further communication?
> Hmm... is in this case the L2CAP RAW socket the solution?
> I=B4m stucked with that problem and i hope anybody as an idea.

as Xavier mentioned the easiest solution is to unload the L2CAP kernel
module. However I looked at the code and it seems that the the kernel
respond to packets with all idents. It should not do that, because they
are shared between the kernel and the userspace. I think a patch for
that is needed so that for commands from the RAW socket no responses are
send.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-01-25 11:50:15

by Xavier Garreau

[permalink] [raw]
Subject: Re: [Bluez-devel] Bypass for L2CAP packets

> sorry for a question to the same problem again...
> I have a (problem) with the L2CAP layer from BlueZ.
> I wrote a program that communicates with a mobile phone by using its ow=
n L2CAP=20
> layer (the program builds its own L2CAP packets for protocol testing).
> For example I send a valid "connection request" to that phone and the p=
hone=20
> answers with a valid "connection response".
> So far so good.=20
> But then the L2CAP layer from BlueZ sends a "command reject", because t=
his=20
> layer doesn=C2=B4t know about the "connection request" and cannot handl=
e=20
> the "connection response".
> Ok, i understand that.=20
> But has anybody an idea how i can communicate with my own L2CAP layer a=
nd the=20
> phone only without using the BlueZ L2CAP layer, because the Bluez layer=
always=20
> prevents a further communication?
> Hmm... is in this case the L2CAP RAW socket the solution?
> I=C2=B4m stucked with that problem and i hope anybody as an idea.

You can unload the l2cap module.

BR,
Xavier Garreau
http://www.xgarreau.org/


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel