rfcomm connection setup
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerHi Patrick,
Quoted 9 lines
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.
Quoted 7 lines
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 3 lines · On Wed, 09 Jun 2004 01:06:11 +0200 Marcel Holtmann <[email protected]> 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
Marcel Holtmann
maintainerHi Patrick,
Quoted 3 lines
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.
Quoted 4 lines
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users