Skip to contentSkip to conversation

MTU in l2test

Bluez-users Manjunath Prabhu 2 participants 6 messages Dec 30, 2004 – Jan 3, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi Marcel,
I am varying the mtu and data size variables in the l2test program.

Quoted 1 line

From the docs, I learnt that maximum L2CAP payload is 65535 bytes. I

am unable to set the data size above 45000 bytes inspite of setting my MTU to 65535 (both on the sender and the receiver).
I get an error saying "Send failed. Resource temporarily unavailable".
Hope you can help me with this one.

Also, in the l2test, is the data channel connectionless(6 byte L2CAP header) or connection oriented(4 byte L2CAP header).I am asking this because the code seems to have a 6-byte offset for the header which means the data channel might be connectionless but i am also able to see the "connection request" and "configuration request" which is a feature of connection oriented data channels.

Also, how is that I am able to see the packet size of ACL Data in "HCI dump", say a 339 byte packet for DH5 packets. Isn't this supposed to happen at the Baseband?

thanks,
regards,
Manjunath

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#1 lore raw

Hi Manjunath,

Quoted 6 lines

I am varying the mtu and data size variables in the l2test program. From the docs, I learnt that maximum L2CAP payload is 65535 bytes. I am unable to set the data size above 45000 bytes inspite of setting my MTU to 65535 (both on the sender and the receiver).
I get an error saying "Send failed. Resource temporarily unavailable".
Hope you can help me with this one.

the MTU is different for incoming and outgoing side. With what kind of device and what commands lines are you testing these.

Quoted 6 lines

Also, in the l2test, is the data channel connectionless(6 byte L2CAP header) or connection oriented(4 byte L2CAP header).I am asking this because the code seems to have a 6-byte offset for the header which means the data channel might be connectionless but i am also able to see the "connection request" and "configuration request" which is a feature of connection oriented data channels.

Actually the connectionless L2CAP is not really supported and maybe somekind of buggy. Feel free to send in any improvements.

Quoted 3 lines

Also, how is that I am able to see the packet size of ACL Data in "HCI dump", say a 339 byte packet for DH5 packets. Isn't this supposed to happen at the Baseband?

The HCI sends up the ACL data and actually for most chips it is the same size as on the baseband. As far as I know this is not recommanded, but it is a good way to not introduce too much overhead for the chip. The final SAR is done by the L2CAP layer.

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#2 lore raw
Quoted 11 lines · Marcel Holtmann

Hi Manjunath,

Quoted 6 lines

I am varying the mtu and data size variables in the l2test program. From the docs, I learnt that maximum L2CAP payload is 65535 bytes. I am unable to set the data size above 45000 bytes inspite of setting my MTU to 65535 (both on the sender and the receiver).
I get an error saying "Send failed. Resource temporarily unavailable".
Hope you can help me with this one.

the MTU is different for incoming and outgoing side. With what kind of device and what commands lines are you testing these.

I am using anycom-120 dongles and using the l2test utility. I am also setting the incoming and outgoing mtu values (imtu and omtu variables) to the same value, say 65000 bytes. My 'datasize' is about 45000 bytes. I get the error as mentioned above.

thanks,
Regards,
manjunath

Quoted 6 lines

Regards

Marcel

Quoted 9 lines

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#3 lore raw

Hi Manjunath,

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

I am varying the mtu and data size variables in the l2test program. From the docs, I learnt that maximum L2CAP payload is 65535 bytes. I am unable to set the data size above 45000 bytes inspite of setting my MTU to 65535 (both on the sender and the receiver).
I get an error saying "Send failed. Resource temporarily unavailable".
Hope you can help me with this one.

Quoted 7 lines
Quoted 2 lines

the MTU is different for incoming and outgoing side. With what kind of device and what commands lines are you testing these.

I am using anycom-120 dongles and using the l2test utility. I am also setting the incoming and outgoing mtu values (imtu and omtu variables) to the same value, say 65000 bytes. My 'datasize' is about 45000 bytes. I get the error as mentioned above.

what is the output of "hciconfig -a" of the Anycom dongle. Check when this error occurs. Do you see it only when calling the send()/write() function? Maybe there is a buffer problem. What do you see with hcidump? Is the MTU correctly negotiated?

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#4 lore raw
Quoted 17 lines · Marcel Holtmann

Hi Manjunath,

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

I am varying the mtu and data size variables in the l2test program. From the docs, I learnt that maximum L2CAP payload is 65535 bytes. I am unable to set the data size above 45000 bytes inspite of setting my MTU to 65535 (both on the sender and the receiver).
I get an error saying "Send failed. Resource temporarily unavailable".
Hope you can help me with this one.

Quoted 7 lines
Quoted 2 lines

the MTU is different for incoming and outgoing side. With what kind of device and what commands lines are you testing these.

I am using anycom-120 dongles and using the l2test utility. I am also setting the incoming and outgoing mtu values (imtu and omtu variables) to the same value, say 65000 bytes. My 'datasize' is about 45000 bytes. I get the error as mentioned above.

Quoted 4 lines

what is the output of "hciconfig -a" of the Anycom dongle. Check when this error occurs. Do you see it only when calling the send()/write() function? Maybe there is a buffer problem. What do you see with hcidump? Is the MTU correctly negotiated?

hi marcel,

the "hciconfig -a" shows

hci0: Type: USB

        BD Address: 00:0B:0D:30:5D:EA ACL MTU: 120:20  SCO MTU: 64:0
        UP RUNNING PSCAN ISCAN
        RX bytes:114526 acl:28 sco:0 events:15460 errors:0
        TX bytes:4857089 acl:39552 sco:0 commands:1400 errors:0
        Features: 0xff 0xff 0x05 0x00 0x00 0x00 0x00 0x00
        Packet type: DH5
        Link policy:
        Link mode: SLAVE ACCEPT
        Name: ''
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Ver: 1.1 (0x1) HCI Rev: 0x0 LMP Ver: 1.1 (0x1) LMP Subver: 0x757
        Manufacturer: Silicon Wave (11)

I get this error when i use the send() function to pump the data out. May be there is a problem with the HCI buffer. Is there some way to add a delay. The L2CAP connection is correctly established and the MTU is also correctly negotiated to the set value (65000) as seen in the hcidump on both sides.

regards,
manjunath

Quoted 4 lines

Regards

Marcel

Quoted 9 lines

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#5 lore raw

Hi Manjunath,

Quoted 15 lines
Quoted 9 lines
Quoted 4 lines

I am using anycom-120 dongles and using the l2test utility. I am also setting the incoming and outgoing mtu values (imtu and omtu variables) to the same value, say 65000 bytes. My 'datasize' is about 45000 bytes. I get the error as mentioned above.

what is the output of "hciconfig -a" of the Anycom dongle. Check when this error occurs. Do you see it only when calling the send()/write() function? Maybe there is a buffer problem. What do you see with hcidump? Is the MTU correctly negotiated?

hi marcel,

the "hciconfig -a" shows

hci0: Type: USB

Quoted 14 lines
        BD Address: 00:0B:0D:30:5D:EA ACL MTU: 120:20  SCO MTU: 64:0
        UP RUNNING PSCAN ISCAN
        RX bytes:114526 acl:28 sco:0 events:15460 errors:0
        TX bytes:4857089 acl:39552 sco:0 commands:1400 errors:0
        Features: 0xff 0xff 0x05 0x00 0x00 0x00 0x00 0x00
        Packet type: DH5
        Link policy:
        Link mode: SLAVE ACCEPT
        Name: ''
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Ver: 1.1 (0x1) HCI Rev: 0x0 LMP Ver: 1.1 (0x1) LMP Subver: 0x757
        Manufacturer: Silicon Wave (11)

leave the packet types to the default (all on).

Quoted 5 lines

I get this error when i use the send() function to pump the data out. May be there is a problem with the HCI buffer. Is there some way to add a delay. The L2CAP connection is correctly established and the MTU is also correctly negotiated to the set value (65000) as seen in the hcidump on both sides.

The problem is maybe inside the l2cap_do_send() kernel function. I never played with MTUs such big.

You should think about using RFCOMM, because this is a stream and so MTU less.

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users