Skip to contentSkip to conversation

BNEP connection destroing :(

Bluez-users Todor Todorov 2 participants 6 messages Mar 1, 2005 – Mar 5, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi. I successful make a bnep connection between my laptop (with Slackware 10.0, kernel 2.4.26 with openmosix patch and latest version of bluez libs and bluez pand, but i tryed also with other versions) and desktop PC with Windows XP Pro, after few minutes (not measured), on linux system the bnep0 interface was destroyed.

Attempting to reconnect with pand worked silently, but the bnep0 interface was not created. Workaround was to remove and re-insert the dongle on my laptop, then i recreate the bnep connection again.
I make a simple script for making bnep connection with windows machine:

#!/bin/sh
hciconfig hci0 up
#sdpd
#sdptool add LAN
echo "Making PAN connection"
#pand --role PANU -c 00:10:60:A6:1C:30 --service GN pand --role PANU -c 00:10:60:A6:1C:30 --service PANU echo "Wait for connection"
sleep 6
echo "Bring UP BNEP"
hcitool lst 00:10:60:A6:1C:30 0
ifconfig bnep0 10.0.0.2 netmask 255.255.255.0 ifconfig bnep0 up
route add default gw 10.0.0.1
rm /etc/resolv.conf
touch /etc/resolv.conf
echo "nameserver 10.13.0.1" > /etc/resolv.conf

This is my kernel config for bluez:

CONFIG_BLUEZ=y
CONFIG_BLUEZ_L2CAP=y
# CONFIG_BLUEZ_SCO is not set
CONFIG_BLUEZ_RFCOMM=y
CONFIG_BLUEZ_RFCOMM_TTY=y
CONFIG_BLUEZ_BNEP=y
# CONFIG_BLUEZ_BNEP_MC_FILTER is not set
# CONFIG_BLUEZ_BNEP_PROTO_FILTER is not set
# CONFIG_BLUEZ_CMTP is not set
CONFIG_BLUEZ_HCIUSB=y
# CONFIG_BLUEZ_USB_SCO is not set
# CONFIG_BLUEZ_HCIUART is not set
# CONFIG_BLUEZ_HCIBFUSB is not set
# CONFIG_BLUEZ_HCIDTL1 is not set
# CONFIG_BLUEZ_HCIBT3C is not set
# CONFIG_BLUEZ_HCIBLUECARD is not set
# CONFIG_BLUEZ_HCIBTUART is not set
# CONFIG_BLUEZ_HCIVHCI is not set

Help me to resolve this problem.
Thank you in advance.

-------------------------------------------------------
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-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#1 lore raw

Hi Todor,

Quoted 6 lines

I successful make a bnep connection between my laptop (with Slackware 10.0, kernel 2.4.26 with openmosix patch and latest version of bluez libs and bluez pand, but i tryed also with other versions) and desktop PC with Windows XP Pro, after few minutes (not measured), on linux system the bnep0 interface was destroyed.

Attempting to reconnect with pand worked silently, but the bnep0 interface was not created. Workaround was to remove and re-insert the dongle on my laptop, then i recreate the bnep connection again.

run "hcidump -X -V" as root while connecting and see what really happens.

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-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#2 lore raw
In reply to Todor Todorov

OK.
First i run run "hcidump -X -V", after that i make bnep connection and start normal internet work (surfing web sites and icq).
Here is the result:

this is the end of the result:

< ACL data: handle 41 flags 0x02 dlen 67

    L2CAP(d): cid 0x0045 len 63 [psm 15]
      BNEP: Compressed(0x02|0)
        [proto 0x0800]
        0000: 45 00 00 3c 49 d3 40 00  40 06 dc e6 0a 00 00 02  E..<I.@.@.......
        0010: 0a 00 00 01 0c d3 03 28  35 2b e7 f6 00 00 00 00  .......(5+......
        0020: a0 02 16 d0 41 c2 00 00  02 04 05 b4 04 02 08 0a  ....A...........
        0030: 00 2f ae 25 00 00 00 00  01 03 03 01              ./.%........
< ACL data: handle 41 flags 0x02 dlen 67
    L2CAP(d): cid 0x0045 len 63 [psm 15]
      BNEP: Compressed(0x02|0)
        [proto 0x0800]
        0000: 45 00 00 3c 06 56 40 00  40 06 20 64 0a 00 00 02  E..<.V@.@. d....
        0010: 0a 00 00 01 0c d4 03 28  35 6b a8 73 00 00 00 00  .......(5k.s....
        0020: a0 02 16 d0 81 04 00 00  02 04 05 b4 04 02 08 0a  ................
        0030: 00 2f ae 25 00 00 00 00  01 03 03 01              ./.%........

< ACL data: handle 41 flags 0x02 dlen 192
< ACL data: handle 41 flags 0x01 dlen 192
< ACL data: handle 41 flags 0x01 dlen 192
< ACL data: handle 41 flags 0x01 dlen 192
< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 41 reason 0x13
Reason: Remote User Teminated Connection

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

    Disconnect (0x01|0x0006) status 0x00 ncmd 1
Quoted 1 line

HCI Event: Disconn Complete (0x05) plen 4

status 0x00 handle 41 reason 0x16
Reason: Connection Terminated by Local Host

And this is the result when i try to make a new connection without re-plug the bluetooth usb dongle:

HCI sniffer - Bluetooth packet analyzer ver 1.18
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr 00:10:60:A6:1C:30 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000 Packet type: DM1 DM3 DM5 DH1 DH3 DH5

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

    Create Connection (0x01|0x0005) status 0x00 ncmd 1
Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

    status 0x00 handle 41 bdaddr 00:10:60:A6:1C:30 type ACL encrypt 0x00
< ACL data: handle 41 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 15 scid 0x0040
Quoted 1 line

HCI Event: Page Scan Repetition Mode Change (0x20) plen 7

0000: 30 1c a6 60 10 00 01 0..`...

Quoted 1 line

HCI Event: Max Slots Change (0x1b) plen 3

0000: 29 00 05 )..
< HCI Command: Write Link Supervision Timeout (0x03|0x0037) plen 4
0000: 29 00 00 00 )...

Quoted 1 line

HCI Event: Command Complete (0x0e) plen 6

Write Link Supervision Timeout (0x03|0x0037) ncmd 1
0000: 00 29 00 .).

I don't understand what is the problem i how can i fix it.

-------------------------------------------------------
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-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#3 lore raw

I forgot to say that i sharing my internet connection on windows machine with proxy (CC Proxy 6.0). Also when i try to transfer one file up to 50MB, and connection was destroyed after nearly 20MB transfer, but when i re-plug the dongle and reconnect again the whole 50MB file was transfered. I tried also to ping the desktop PC with ping 60k and the connection whas imмediately destroyed. This i fix(i think so) with this "hcitool lst 00:10:60:A6:1C:
30 0"
This is tried also when i use windows on the laptop and desktop, and there isn't problem.

-------------------------------------------------------
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-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#4 lore raw
In reply to Todor Todorov

Hi Todor,

Quoted 3 lines

< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 41 reason 0x13
Reason: Remote User Teminated Connection

this means that we terminate the connection. This is funny, because I have no idea why that happens. Maybe you should use a 2.6.11-rc5 kernel instead of an old 2.4 kernel.

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-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#5 lore raw
Quoted 6 lines

Hi Todor,

Quoted 3 lines

< HCI Command: Disconnect (0x01|0x0006) plen 3
handle 41 reason 0x13
Reason: Remote User Teminated Connection

Quoted 7 lines

this means that we terminate the connection. This is funny, because I have no idea why that happens. Maybe you should use a 2.6.11-rc5 kernel instead of an old 2.4 kernel.

Regards

Marcel

OK. After few days of testing with the latest - 2.6.11 kernel, i can confurm that the problem is fixed :).

Thanks 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-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users