public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] rfcomm connection setup
@ 2004-06-08 21:01 Patrick Duchstein
  2004-06-08 23:06 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick Duchstein @ 2004-06-08 21:01 UTC (permalink / raw)
  To: bluez-users

Hi,

I am currently working on my own embedded solution of a Bluetooth
protocol stack, and always actively testing its interoperability with
BlueZ. First thing to say: great work for reference, thanks a lot!

I am currently stuck on setting up an rfcomm connection. L2CAP works
totally fine, but when connecting over an rfcomm socket with either
rctest or rfcomm, bluez does not seem to send out a SABM frame on DLCI 0
as mentioned in the specification; a timeout appears after some time.

Since I do not have any other BT devices to check it, I would be very
pleased if somebody on this list could help me by just sending me the
full debugging output of the bluez modules (3 kernel definitons) of a
successfully established rfcomm connection using rctest -s -N 2. Though
I am by now very familiar with both the Bluetooth 1.1 and TS 07.10
specs, I probably understood something wrong; thus, a connection trace
would help me a lot.

Many thanks in advance,
Patrick


-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bluez-users] rfcomm connection setup
  2004-06-08 21:01 [Bluez-users] rfcomm connection setup Patrick Duchstein
@ 2004-06-08 23:06 ` Marcel Holtmann
  2004-06-09  1:00   ` Patrick Duchstein
  0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2004-06-08 23:06 UTC (permalink / raw)
  To: Patrick Duchstein; +Cc: BlueZ Mailing List

Hi Patrick,

> I am currently working on my own embedded solution of a Bluetooth
> protocol stack, and always actively testing its interoperability with
> BlueZ. First thing to say: great work for reference, thanks a lot!
> 
> I am currently stuck on setting up an rfcomm connection. L2CAP works
> totally fine, but when connecting over an rfcomm socket with either
> rctest or rfcomm, bluez does not seem to send out a SABM frame on DLCI 0
> as mentioned in the specification; a timeout appears after some time.
> 
> Since I do not have any other BT devices to check it, I would be very
> pleased if somebody on this list could help me by just sending me the
> full debugging output of the bluez modules (3 kernel definitons) of a
> successfully established rfcomm connection using rctest -s -N 2. Though
> I am by now very familiar with both the Bluetooth 1.1 and TS 07.10
> specs, I probably understood something wrong; thus, a connection trace
> would help me a lot.

since you mention "rctest -s -N 2" I assume that you try to connect from
BlueZ to your stack. Run "hcidump -w <file>" as root on the BlueZ side
and show us the resulting file.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bluez-users] rfcomm connection setup
  2004-06-08 23:06 ` Marcel Holtmann
@ 2004-06-09  1:00   ` Patrick Duchstein
  2004-06-09  8:51     ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick Duchstein @ 2004-06-09  1:00 UTC (permalink / raw)
  To: bluez-users

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]

On Wed, 09 Jun 2004 01:06:11 +0200
Marcel Holtmann <marcel@holtmann.org> wrote:

> since you mention "rctest -s -N 2" I assume that you try to connect
> from BlueZ to your stack. Run "hcidump -w <file>" as root on the BlueZ
> side and show us the resulting file.
yep that's correct. I attached the resulting file; l2cap parameter
negotiation (conf_req/conf_rsp from both sides) runs without problems,
and then nothing else happens, whilst IMHO bluez should send SABM.

Btw, is there a reason for bluez rejecting non-default l2cap parameters,
such as a smaller MTU? I might consider implementing this into bluez
when I find the time if it is desired at all....at least by me it
definitely is since I'm working on only 4KB of RAM.

Again, thanks for your help.

/Patrick

[-- Attachment #2: dump --]
[-- Type: application/octet-stream, Size: 486 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bluez-users] rfcomm connection setup
  2004-06-09  1:00   ` Patrick Duchstein
@ 2004-06-09  8:51     ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2004-06-09  8:51 UTC (permalink / raw)
  To: Patrick Duchstein; +Cc: BlueZ Mailing List

Hi Patrick,

> yep that's correct. I attached the resulting file; l2cap parameter
> negotiation (conf_req/conf_rsp from both sides) runs without problems,
> and then nothing else happens, whilst IMHO bluez should send SABM.

	< ACL data: handle 0x0029 flags 0x02 dlen 12
	    L2CAP(s): Connect req: psm 3 scid 0x0040
	< HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4
	  29 00 0E 00 
	> HCI Event: Number of Completed Packets(0x13) plen 5
	  01 29 00 01 00 
	> HCI Event: Command Complete(0x0e) plen 6
	  01 0D 08 00 29 00 
	> ACL data: handle 0x0029 flags 0x02 dlen 16
	    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
	< ACL data: handle 0x0029 flags 0x02 dlen 16
	    L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 4
	    MTU 1024 
	> HCI Event: Max Slots Change(0x1b) plen 3
	  29 00 05 
	> HCI Event: Number of Completed Packets(0x13) plen 5
	  01 29 00 01 00 
	> ACL data: handle 0x0029 flags 0x02 dlen 15
	    L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 3 clen 1
	    Unknown (type 04, len 4) 
	< ACL data: handle 0x0029 flags 0x02 dlen 12
	    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040

take another look at your L2CAP code, because the config response is not
correct and BlueZ disconnects. The config type 4 is a Bluetooth 1.2 only
feature which is not supported at the moment. However you must response
to the MTU config request.

If the L2CAP link is not fully setup, the RFCOMM layer won't send the
SABM command.

> Btw, is there a reason for bluez rejecting non-default l2cap parameters,
> such as a smaller MTU? I might consider implementing this into bluez
> when I find the time if it is desired at all....at least by me it
> definitely is since I'm working on only 4KB of RAM.

I don't see your problem here, because the MTU can be different for the
incoming and outgoing side. And for the above RFCOMM layer we accept any
OMTU that the other system gave us and we say that our IMTU is 1024.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-06-09  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-08 21:01 [Bluez-users] rfcomm connection setup Patrick Duchstein
2004-06-08 23:06 ` Marcel Holtmann
2004-06-09  1:00   ` Patrick Duchstein
2004-06-09  8:51     ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox