2005-11-12 15:33:10

by Artur Almeida

[permalink] [raw]
Subject: [Bluez-devel] rfcomm simultaneous connection

Hi
Can someone please confirm me that i have the correct understanding of the
following:
Im trying to send a file over obex to device 1 a bt phone. He receives the
prompt to accept the file and i dont answer.
If i try to send another file to device 2 anoter btphone, bluez says no
resources, but if i accept the file in device 1 and start to download it i
can then prompt the device 2 to accept the file and transmit to both at the
same time. Resuming when rfcomm is trying to connect to a device he haves to
wait until that device gives a time out or accepts the connection before
trying to connect to another device.
Is this true? Can i control the timeout of the connection on the bluez
side?
Is there a way to establish several connections to many devices without
depending between them?
Thank you
Regards
Artur


Attachments:
(No filename) (824.00 B)
(No filename) (1.07 kB)
Download all attachments

2005-11-13 14:32:24

by Peter Wippich

[permalink] [raw]
Subject: Re: [Bluez-devel] rfcomm simultaneous connection


Hi Marcel,

On Sun, 13 Nov 2005, Marcel Holtmann wrote:

> Hi Peter,
>
> > or we need to change the HCI layer to enable it to queue the commands
> > correctly ..... but this is not trivial.
>
> this might be possible, but it can also end up in a horrible race
> condition and other problems with chips that doesn't really support
> multiple ACL links or multiple piconets.
It's ugly ! The risk for screwing things up is very high and it is awfull
to debug. However, it is nice to have from a users point of view.

> I personally think that this should be queued in the link manager, but
> there might exists other limitations that I am not aware of.
I agree. But it may be even more difficult to handle in the link manager
because of usualy very limited buffer space.

Ciao,

Peter

> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

| Peter Wippich Voice: +49 30 46776411 |
| G&W Instruments GmbH fax: +49 30 46776419 |
| Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
| D-13355 Berlin / Germany |




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-11-13 14:18:01

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] rfcomm simultaneous connection

Hi Peter,

> or we need to change the HCI layer to enable it to queue the commands
> correctly ..... but this is not trivial.

this might be possible, but it can also end up in a horrible race
condition and other problems with chips that doesn't really support
multiple ACL links or multiple piconets.

I personally think that this should be queued in the link manager, but
there might exists other limitations that I am not aware of.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-11-13 14:03:00

by Peter Wippich

[permalink] [raw]
Subject: Re: [Bluez-devel] rfcomm simultaneous connection



Hi Marcel,

or we need to change the HCI layer to enable it to queue the commands
correctly ..... but this is not trivial.

Could'nt resist ;-)..

Peter

On Sat, 12 Nov 2005, Marcel Holtmann wrote:

> Hi Artur,
>
> > t01:/# /usr/local/sbin/hcidump -X -V
> > HCI sniffer - Bluetooth packet analyzer ver 1.27
> > device: hci0 snap_len: 1028 filter: 0xffffffff
> > < HCI Command: Create Connection (0x01|0x0005) plen 13
> > bdaddr 00:13:FD:BB:22:3F ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> > Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > > HCI Event: Command Status (0x0f) plen 4
> > Create Connection (0x01|0x0005) status 0x00 ncmd 1
> > < HCI Command: Create Connection (0x01|0x0005) plen 13
> > bdaddr 00:14:60:01:23:45 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> > Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > > HCI Event: Command Status (0x0f) plen 4
> > Create Connection (0x01|0x0005) status 0x0c ncmd 1
> > Error: Command Disallowed
>
> you try to create both piconets at the same time. This can't work,
> because the Bluetooth chip can only page one. You must wait at least
> until one piconet is established.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

| Peter Wippich Voice: +49 30 46776411 |
| G&W Instruments GmbH fax: +49 30 46776419 |
| Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
| D-13355 Berlin / Germany |




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-11-12 20:52:12

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] rfcomm simultaneous connection

Hi Artur,

> t01:/# /usr/local/sbin/hcidump -X -V
> HCI sniffer - Bluetooth packet analyzer ver 1.27
> device: hci0 snap_len: 1028 filter: 0xffffffff
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> bdaddr 00:13:FD:BB:22:3F ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > HCI Event: Command Status (0x0f) plen 4
> Create Connection (0x01|0x0005) status 0x00 ncmd 1
> < HCI Command: Create Connection (0x01|0x0005) plen 13
> bdaddr 00:14:60:01:23:45 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> > HCI Event: Command Status (0x0f) plen 4
> Create Connection (0x01|0x0005) status 0x0c ncmd 1
> Error: Command Disallowed

you try to create both piconets at the same time. This can't work,
because the Bluetooth chip can only page one. You must wait at least
until one piconet is established.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-11-12 19:35:10

by Artur Almeida

[permalink] [raw]
Subject: Re: [Bluez-devel] rfcomm simultaneous connection

Hello Marcel
The output is the follow
t01:/# /usr/local/sbin/hcidump -X -V
HCI sniffer - Bluetooth packet analyzer ver 1.27
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:13:FD:BB:22:3F ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:14:60:01:23:45 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x0c ncmd 1
Error: Command Disallowed
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 42 bdaddr 00:13:FD:BB:22:3F type ACL encrypt 0x00
< ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 3 scid 0x0040
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 42 policy 0x01
Link policy: RSWITCH
> HCI Event: Command Complete (0x0e) plen 6
Write Link Policy Settings (0x02|0x000d) ncmd 1
status 0x00 handle 42
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 42 packets 1
> HCI Event: Max Slots Change (0x1b) plen 3
handle 42 slots 5
> ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x007e scid 0x0040 result 1 status 2
Connection pending - Authorization pending
> ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x007e scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x007e flags 0x00 clen 4
MTU 1024
> ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
< ACL data: handle 42 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x007e flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 17
> ACL data: handle 42 flags 0x01 dlen 1
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
Success
MTU 672
< ACL data: handle 42 flags 0x02 dlen 8
L2CAP(d): cid 0x007e len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
< ACL data: handle 42 flags 0x02 dlen 18
L2CAP(d): cid 0x007e len 14 [psm 3]
RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
dlci 18 frame_type 0 credit_flow 15 pri 7 ack_timer 0
frame_size 667 max_retrans 0 credits 7
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 18
L2CAP(d): cid 0x0040 len 14 [psm 3]
RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
dlci 18 frame_type 0 credit_flow 14 pri 7 ack_timer 0
frame_size 667 max_retrans 0 credits 3
< ACL data: handle 42 flags 0x02 dlen 8
L2CAP(d): cid 0x007e len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 18 pf 1 ilen 0 fcs 0x32
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 42 packets 1
Thank you
Regards
Artur

On 11/12/05, Marcel Holtmann <[email protected]> wrote:
>
> Hi Artur,
>
> no cross-posting. I mentioned that many times now.
>
> > Can someone please confirm me that i have the correct understanding of
> > the following:
> >
> >
> > Im trying to send a file over obex to device 1 a bt phone. He receives
> > the prompt to accept the file and i dont answer.
> > If i try to send another file to device 2 anoter btphone, bluez says
> > no resources, but if i accept the file in device 1 and start to
> > download it i can then prompt the device 2 to accept the file and
> > transmit to both at the same time. Resuming when rfcomm is trying to
> > connect to a device he haves to wait until that device gives a time
> > out or accepts the connection before trying to connect to another
> > device.
> >
> > Is this true? Can i control the timeout of the connection on the bluez
> > side?
> >
> > Is there a way to establish several connections to many devices
> > without depending between them?
>
> use "hcidump -X -V" to show what's going on.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>


Attachments:
(No filename) (4.69 kB)
(No filename) (6.75 kB)
Download all attachments

2005-11-12 15:58:29

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] rfcomm simultaneous connection

Hi Artur,

no cross-posting. I mentioned that many times now.

> Can someone please confirm me that i have the correct understanding of
> the following:
>
>
> Im trying to send a file over obex to device 1 a bt phone. He receives
> the prompt to accept the file and i dont answer.
> If i try to send another file to device 2 anoter btphone, bluez says
> no resources, but if i accept the file in device 1 and start to
> download it i can then prompt the device 2 to accept the file and
> transmit to both at the same time. Resuming when rfcomm is trying to
> connect to a device he haves to wait until that device gives a time
> out or accepts the connection before trying to connect to another
> device.
>
> Is this true? Can i control the timeout of the connection on the bluez
> side?
>
> Is there a way to establish several connections to many devices
> without depending between them?

use "hcidump -X -V" to show what's going on.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel