Skip to contentSkip to conversation

L2CAP retransmission, flow control

Bluez-devel Imre Deak 2 participants 7 messages Feb 9, 2005 Bluetooth drivers

lore
Share & tools
lore

Imre Deak

author
#0 lore raw

Hi,

is anyone involved in implementing L2CAP rfc according to the 1.2 spec? If not I'll give it a try.

Regards,
Imre

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Imre,

Quoted 1 line

is anyone involved in implementing L2CAP rfc according to the 1.2 spec?

not that I know of.

Quoted 1 line

If not I'll give it a try.

Feel free to start. I am happy to get L2CAP 1.2 support included. The L2CAP options now contain a mode value and this is exactly for this purpose. Let the rest of the RFC config values be the defaults from the specification by now. Another way to activate RFC would be to use the SOCK_STREAM socket type.

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

author
#2 lore raw
Quoted 9 lines · ext Marcel Holtmann

Hi Imre,

Quoted 1 line

is anyone involved in implementing L2CAP rfc according to the 1.2 spec?

not that I know of.

Quoted 1 line

If not I'll give it a try.

Feel free to start. I am happy to get L2CAP 1.2 support included. The

Ok, we'll have already some basic stuff to support the new config options, I'll start then to implement the rest. L2CAP QoS could also be done at some point, for the moment I don't plan to add support to anything but 'best effort'.

Quoted 5 lines

L2CAP options now contain a mode value and this is exactly for this purpose. Let the rest of the RFC config values be the defaults from the specification by now. Another way to activate RFC would be to use the SOCK_STREAM socket type.

Yes, I agree. Is it ok then to do the following?

For SOCK_STREAM try to negotiate RFC, if peer doesn't accept use basic mode.

For SOCK_DGRAM, SOCK_RAW try to negotiate FC, if peer doesn't accept use basic mode.

Other issues I was thinking about:

The 1.2 spec says it's possible for L2CAP to send incorrect packets (with missing fragments) to upper layers with indication of the incorrect parts of the given packet. The only possiblity I found so far, is to signal that L2CAP reliability can't be guaranteed any more and drop the packet.
Is there a way or is there a case at all where we should support applications that need such incorrect packets?

Regards,
Imre

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#3 lore raw

Hi Imre,

Quoted 6 lines
Quoted 1 line

Feel free to start. I am happy to get L2CAP 1.2 support included. The

Ok, we'll have already some basic stuff to support the new config options, I'll start then to implement the rest. L2CAP QoS could also be done at some point, for the moment I don't plan to add support to anything but 'best effort'.

don't worry too much about QoS at the moment.

Quoted 10 lines
Quoted 5 lines

L2CAP options now contain a mode value and this is exactly for this purpose. Let the rest of the RFC config values be the defaults from the specification by now. Another way to activate RFC would be to use the SOCK_STREAM socket type.

Yes, I agree. Is it ok then to do the following?

For SOCK_STREAM try to negotiate RFC, if peer doesn't accept use basic mode.

If SOCK_STREAM is requested and RFC negotiation fails, then also the connection must fail. For SOCK_STREAM you need flow control.

Quoted 2 lines

For SOCK_DGRAM, SOCK_RAW try to negotiate FC, if peer doesn't accept use basic mode.

For SOCK_DGRAM and SOCK_RAW we don't do anything. The SOCK_DGRAM is for connection-less channels and SOCK_RAW gives access to the signal channel itself.

If you use SOCK_SEQPACKET (current type) and mode > 0 then negotiate RFC and if success then use it, otherwise fail.

Quoted 9 lines

Other issues I was thinking about:

The 1.2 spec says it's possible for L2CAP to send incorrect packets (with missing fragments) to upper layers with indication of the incorrect parts of the given packet. The only possiblity I found so far, is to signal that L2CAP reliability can't be guaranteed any more and drop the packet.
Is there a way or is there a case at all where we should support applications that need such incorrect packets?

I think it is bad idea to support this and we don't really need it. This interaction between different layers is useless from my point.

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

author
#4 lore raw
Quoted 10 lines · ext Marcel Holtmann

If SOCK_STREAM is requested and RFC negotiation fails, then also the connection must fail. For SOCK_STREAM you need flow control.

For SOCK_DGRAM and SOCK_RAW we don't do anything. The SOCK_DGRAM is for connection-less channels and SOCK_RAW gives access to the signal channel itself.

If you use SOCK_SEQPACKET (current type) and mode > 0 then negotiate RFC and if success then use it, otherwise fail.

Thanks, it got clearer now.
Shouldn't we support the flow control only mode, so without retransmission? For SOCK_SEQPACKET and a specific mode value for example.

--Imre

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#5 lore raw

Hi Imre,

Quoted 7 lines
Quoted 7 lines

If SOCK_STREAM is requested and RFC negotiation fails, then also the connection must fail. For SOCK_STREAM you need flow control.

For SOCK_DGRAM and SOCK_RAW we don't do anything. The SOCK_DGRAM is for connection-less channels and SOCK_RAW gives access to the signal channel itself.

Quoted 7 lines
Quoted 3 lines

If you use SOCK_SEQPACKET (current type) and mode > 0 then negotiate RFC and if success then use it, otherwise fail.

Shouldn't we support the flow control only mode, so without retransmission? For SOCK_SEQPACKET and a specific mode value for example.

if you select SOCK_SEQPACKET and set the mode to flow control and retransmission then this must be negotiated and on success this can be used.

For SOCK_STREAM only the flow control is really needed, but also having retransmission whould be great.

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

author
#6 lore raw
Quoted 6 lines · ext Marcel Holtmann

if you select SOCK_SEQPACKET and set the mode to flow control and retransmission then this must be negotiated and on success this can be used.

For SOCK_STREAM only the flow control is really needed, but also having retransmission whould be great.

Ok, thanks for elaborating this.

--Imre

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel