Skip to contentSkip to conversation

Can't send file to bluetooth obex server

Bluez-users attaboyu 1 participant 3 messages Jul 10, 2008 Bluetooth drivers

lore
Share & tools
lore

attaboyu

author
#0 lore raw

hi all

I've got a problem to send file to my bluetooth obex server. my toolchain:
bluez-libs-3.12, bluez-utils-3.12, bluez-hcidump-1.37, openobex-1.3 my platform is arm based system(local).

1.if the local(arm based) send file to remote(usb dongle on PC) as openobex work in client, it's totally OK.
$obex_test -b 00:17:cd:60:00:5c 1
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.

Quoted 1 line

c

Connect OK!
Version: 0x10. Flags: 0x00

Quoted 1 line

p hello.txt hw.txt

PUT file (local, remote)> name=hello.txt, size=31
PUT successful!

Quoted 1 line

q

2.if the local(arm based) work as obex server, it always go wrong.
$obex_test -b ff:ff:ff:00:00:00 9
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.

Quoted 1 line

s

at this time, the remote(usb dongle on pc) try to connect local and send a file to it, then the obex server go wrong like this:

Timeout while doing OBEX_HandleInput()

the file transfer failed every time when my arm based system work as obex server, here is the hcidump data, a little long.

HCI sniffer - Bluetooth packet analyzer ver 1.37

Quoted 1 line

HCI Event: Connect Request (0x04) plen 10

< HCI Command: Accept Connection Request (0x01|0x0009) plen 7

Quoted 4 lines

HCI Event: Command Status (0x0f) plen 4
HCI Event: Connect Complete (0x03) plen 11
HCI Event: Page Scan Repetition Mode Change (0x20) plen 7 HCI Event: Max Slots Change (0x1b) plen 3

< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4

Quoted 2 lines

HCI Event: Command Complete (0x0e) plen 6 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 1 scid 0x0094
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0094 result 0 status 0
      Connection successful

< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4

Quoted 4 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Command Status (0x0f) plen 4
HCI Event: Connection Packet Type Changed (0x1d) plen 5 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 0x0094 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0094 flags 0x00 clen 0
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 17

    L2CAP(d): cid 0x0040 len 13 [psm 1]
        SDP SS Req: tid 0x0 len 0x8
          pat uuid-16 0x1105 (OBEXObjPush)
          max 64
          cont 00
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0094 len 14 [psm 1]
        SDP SS Rsp: tid 0x0 len 0x9
          count 1
          handle 0x10000
          cont 00
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 23

    L2CAP(d): cid 0x0040 len 19 [psm 1]
        SDP SA Req: tid 0x1 len 0xe
          handle 0x10000
          max 300
          aid(s) 0x0000 - 0xffff
          cont 00
< ACL data: handle 42 flags 0x02 dlen 111
    L2CAP(d): cid 0x0094 len 107 [psm 1]
        SDP SA Rsp: tid 0x1 len 0x66
          count 99
          aid 0x0000 (SrvRecHndl)
             uint 0x10000
          aid 0x0001 (SrvClassIDList)
             < uuid-16 0x1105 (OBEXObjPush) >
          aid 0x0004 (ProtocolDescList)
             < < uuid-16 0x0100 (L2CAP) > <
             uuid-16 0x0003 (RFCOMM) uint 0x9 > <
             uuid-16 0x0008 (OBEX) > >
          aid 0x0005 (BrwGrpList)
             < uuid-16 0x1002 (PubBrwsGrp) >
          aid 0x0009 (BTProfileDescList)
             < < uuid-16 0x1105 (OBEXObjPush) uint 0x100 > >
          aid 0x0100 (SrvName)
             str "OBEX Object Push"
          aid 0x0303 (SuppFormatsList)
             < uint 0x1 uint 0x2 uint 0x3 uint 0x4 uint 0x5 uint 0x6 >
          cont 00
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0094
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 3 scid 0x0095
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0094
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0095 result 0 status 0
      Connection successful
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 16

    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1710 
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0095 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0095 flags 0x00 clen 4
      MTU 1024 
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7 
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 18

L2CAP(d): cid 0x0040 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 0 ack_timer 0 frame_size 1012 max_retrans 0 credits 7
< ACL data: handle 42 flags 0x02 dlen 18
L2CAP(d): cid 0x0095 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 0 ack_timer 0 frame_size 1012 max_retrans 0 credits 7

Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 18 pf 1 ilen 0 fcs 0x32 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 18 pf 1 ilen 0 fcs 0xf9 
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0095 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0095 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 9

    L2CAP(d): cid 0x0040 len 5 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 18 pf 1 ilen 0 fcs 0xd2 credits 100
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 15

    L2CAP(d): cid 0x0040 len 11 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 18 pf 0 ilen 7 fcs 0xce 
        OBEX: Connect cmd(f): len 7 version 1.0 flags 0 mtu 32573
< ACL data: handle 42 flags 0x02 dlen 9
    L2CAP(d): cid 0x0095 len 5 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 18 pf 1 ilen 0 fcs 0x8 credits 34
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 18 fc 0 rtc 0 rtr 0 ic 0 dv 0 b1 1 b2 1 b3 0 len 0
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0095 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 18 fc 0 rtc 0 rtr 0 ic 0 dv 0 b1 1 b2 1 b3 0 len 0
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 1 dlci 18 pf 1 ilen 0 fcs 0xd3 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 18 pf 1 ilen 0 fcs 0xf9 
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7 
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0095
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0095
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Disconn Complete (0x05) plen 4

I can't figure it out. is the server side need an agent to comfirm the client's request? who can help me out , many thanks in advance!

tony

--

Best Regards
------------
Tony

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#1 lore raw

hi

after read the openobex code, i find out if the obex_test work as server, it definitely run to obex_transport.c line 115-126 which list below:

             DEBUG(4, "Data available on server socket\n");
            /* Accept : create the connected socket */
            ret = obex_transport_accept(self);

            /* Tell the app to perform the OBEX_Accept() */
            if(self->keepserver)
                obex_deliver_event(self, OBEX_EV_ACCEPTHINT,
                           0, 0, FALSE);
            /* Otherwise, just disconnect the server */
            if((ret >= 0) && (! self->keepserver)) {
                obex_transport_disconnect_server(self);
            }

the server really accept connection of the client and return 0, but the self->keepserver==0, so it suddenly run to obex_transport_disconnect_server(self).

after that, obex_transport_handle_input return 0 which course the "Timeout while doing OBEX_HandleInput()" issue out

how to fix this problem
--

Best Regards
------------
Tony

hi all

I've got a problem to send file to my bluetooth obex server. my toolchain:
bluez-libs-3.12, bluez-utils-3.12, bluez-hcidump-1.37, openobex-1.3 my platform is arm based system(local).

1.if the local(arm based) send file to remote(usb dongle on PC) as openobex work in client, it's totally OK.
$obex_test -b 00:17:cd:60:00:5c 1
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.

Quoted 1 line

c

Connect OK!
Version: 0x10. Flags: 0x00

Quoted 1 line

p hello.txt hw.txt

PUT file (local, remote)> name=hello.txt, size=31
PUT successful!

Quoted 1 line

q

2.if the local(arm based) work as obex server, it always go wrong.
$obex_test -b ff:ff:ff:00:00:00 9
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.

Quoted 1 line

s

at this time, the remote(usb dongle on pc) try to connect local and send a file to it, then the obex server go wrong like this:

Timeout while doing OBEX_HandleInput()

the file transfer failed every time when my arm based system work as obex server, here is the hcidump data, a little long.

HCI sniffer - Bluetooth packet analyzer ver 1.37

Quoted 1 line

HCI Event: Connect Request (0x04) plen 10

< HCI Command: Accept Connection Request (0x01|0x0009) plen 7

Quoted 4 lines

HCI Event: Command Status (0x0f) plen 4
HCI Event: Connect Complete (0x03) plen 11
HCI Event: Page Scan Repetition Mode Change (0x20) plen 7 HCI Event: Max Slots Change (0x1b) plen 3

< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4

Quoted 2 lines

HCI Event: Command Complete (0x0e) plen 6 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 1 scid 0x0094
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0094 result 0 status 0
      Connection successful

< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4

Quoted 4 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Command Status (0x0f) plen 4
HCI Event: Connection Packet Type Changed (0x1d) plen 5 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 0x0094 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0094 flags 0x00 clen 0
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 17

    L2CAP(d): cid 0x0040 len 13 [psm 1]
        SDP SS Req: tid 0x0 len 0x8
          pat uuid-16 0x1105 (OBEXObjPush)
          max 64
          cont 00
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0094 len 14 [psm 1]
        SDP SS Rsp: tid 0x0 len 0x9
          count 1
          handle 0x10000
          cont 00
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 23

    L2CAP(d): cid 0x0040 len 19 [psm 1]
        SDP SA Req: tid 0x1 len 0xe
          handle 0x10000
          max 300
          aid(s) 0x0000 - 0xffff
          cont 00
< ACL data: handle 42 flags 0x02 dlen 111
    L2CAP(d): cid 0x0094 len 107 [psm 1]
        SDP SA Rsp: tid 0x1 len 0x66
          count 99
          aid 0x0000 (SrvRecHndl)
             uint 0x10000
          aid 0x0001 (SrvClassIDList)
             < uuid-16 0x1105 (OBEXObjPush) >
          aid 0x0004 (ProtocolDescList)
             < < uuid-16 0x0100 (L2CAP) > <
             uuid-16 0x0003 (RFCOMM) uint 0x9 > <
             uuid-16 0x0008 (OBEX) > >
          aid 0x0005 (BrwGrpList)
             < uuid-16 0x1002 (PubBrwsGrp) >
          aid 0x0009 (BTProfileDescList)
             < < uuid-16 0x1105 (OBEXObjPush) uint 0x100 > >
          aid 0x0100 (SrvName)
             str "OBEX Object Push"
          aid 0x0303 (SuppFormatsList)
             < uint 0x1 uint 0x2 uint 0x3 uint 0x4 uint 0x5 uint 0x6 >
          cont 00
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0094
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 3 scid 0x0095
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0094
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0095 result 0 status 0
      Connection successful
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 16

    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1710 
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0095 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0095 flags 0x00 clen 4
      MTU 1024 
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7 
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 18

L2CAP(d): cid 0x0040 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 0 ack_timer 0 frame_size 1012 max_retrans 0 credits 7
< ACL data: handle 42 flags 0x02 dlen 18
L2CAP(d): cid 0x0095 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 0 ack_timer 0 frame_size 1012 max_retrans 0 credits 7

Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 18 pf 1 ilen 0 fcs 0x32 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 18 pf 1 ilen 0 fcs 0xf9 
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0095 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0095 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 9

    L2CAP(d): cid 0x0040 len 5 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 18 pf 1 ilen 0 fcs 0xd2 credits 100
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 15

    L2CAP(d): cid 0x0040 len 11 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 18 pf 0 ilen 7 fcs 0xce 
        OBEX: Connect cmd(f): len 7 version 1.0 flags 0 mtu 32573
< ACL data: handle 42 flags 0x02 dlen 9
    L2CAP(d): cid 0x0095 len 5 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 18 pf 1 ilen 0 fcs 0x8 credits 34
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 18 fc 0 rtc 0 rtr 0 ic 0 dv 0 b1 1 b2 1 b3 0 len 0
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0095 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 18 fc 0 rtc 0 rtr 0 ic 0 dv 0 b1 1 b2 1 b3 0 len 0
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 1 dlci 18 pf 1 ilen 0 fcs 0xd3 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 18 pf 1 ilen 0 fcs 0xf9 
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7 
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0095
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0095
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Disconn Complete (0x05) plen 4

I can't figure it out. is the server side need an agent to comfirm the client's request? who can help me out , many thanks in advance!

tony

--

Best Regards
------------
Tony

渊波阔宅 湖景人生

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#2 lore raw

after reading the code, i find a way to transport file from remote(client) to local(server) through obex_test like this:

$obex_test -b ff:ff:ff:00:00:00 9
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.

Quoted 1 line

s

Timeout while doing OBEX_HandleInput()

Quoted 1 line

s

Server request finished!
Disconnect done!

because of the self->fd is -1,when run "s" command first time, and the accept function will initialize it after remote connection, so when run "s" second time the self->fd is available, then the server can receive the data that remote device sent.

is this a bug or feature? pls give me some advise.

--

Best Regards
------------
Tony

在2008-07-10,[email protected] 写道:

hi

after read the openobex code, i find out if the obex_test work as server, it definitely run to obex_transport.c line 115-126 which list below:

             DEBUG(4, "Data available on server socket\n");
            /* Accept : create the connected socket */
            ret = obex_transport_accept(self);

            /* Tell the app to perform the OBEX_Accept() */
            if(self->keepserver)
                obex_deliver_event(self, OBEX_EV_ACCEPTHINT,
                           0, 0, FALSE);
            /* Otherwise, just disconnect the server */
            if((ret >= 0) && (! self->keepserver)) {
                obex_transport_disconnect_server(self);
            }

the server really accept connection of the client and return 0, but the self->keepserver==0, so it suddenly run to obex_transport_disconnect_server(self).

after that, obex_transport_handle_input return 0 which course the "Timeout while doing OBEX_HandleInput()" issue out

how to fix this problem
--

Best Regards
------------
Tony

hi all

I've got a problem to send file to my bluetooth obex server. my toolchain:
bluez-libs-3.12, bluez-utils-3.12, bluez-hcidump-1.37, openobex-1.3 my platform is arm based system(local).

1.if the local(arm based) send file to remote(usb dongle on PC) as openobex work in client, it's totally OK.
$obex_test -b 00:17:cd:60:00:5c 1
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.

Quoted 1 line

c

Connect OK!
Version: 0x10. Flags: 0x00

Quoted 1 line

p hello.txt hw.txt

PUT file (local, remote)> name=hello.txt, size=31
PUT successful!

Quoted 1 line

q

2.if the local(arm based) work as obex server, it always go wrong.
$obex_test -b ff:ff:ff:00:00:00 9
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.

Quoted 1 line

s

at this time, the remote(usb dongle on pc) try to connect local and send a file to it, then the obex server go wrong like this:

Timeout while doing OBEX_HandleInput()

the file transfer failed every time when my arm based system work as obex server, here is the hcidump data, a little long.

HCI sniffer - Bluetooth packet analyzer ver 1.37

Quoted 1 line

HCI Event: Connect Request (0x04) plen 10

< HCI Command: Accept Connection Request (0x01|0x0009) plen 7

Quoted 4 lines

HCI Event: Command Status (0x0f) plen 4
HCI Event: Connect Complete (0x03) plen 11
HCI Event: Page Scan Repetition Mode Change (0x20) plen 7 HCI Event: Max Slots Change (0x1b) plen 3

< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4

Quoted 2 lines

HCI Event: Command Complete (0x0e) plen 6 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 1 scid 0x0094
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0094 result 0 status 0
      Connection successful

< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4

Quoted 4 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Command Status (0x0f) plen 4
HCI Event: Connection Packet Type Changed (0x1d) plen 5 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 0x0094 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0094 flags 0x00 clen 0
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 17

    L2CAP(d): cid 0x0040 len 13 [psm 1]
        SDP SS Req: tid 0x0 len 0x8
          pat uuid-16 0x1105 (OBEXObjPush)
          max 64
          cont 00
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0094 len 14 [psm 1]
        SDP SS Rsp: tid 0x0 len 0x9
          count 1
          handle 0x10000
          cont 00
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 23

    L2CAP(d): cid 0x0040 len 19 [psm 1]
        SDP SA Req: tid 0x1 len 0xe
          handle 0x10000
          max 300
          aid(s) 0x0000 - 0xffff
          cont 00
< ACL data: handle 42 flags 0x02 dlen 111
    L2CAP(d): cid 0x0094 len 107 [psm 1]
        SDP SA Rsp: tid 0x1 len 0x66
          count 99
          aid 0x0000 (SrvRecHndl)
             uint 0x10000
          aid 0x0001 (SrvClassIDList)
             < uuid-16 0x1105 (OBEXObjPush) >
          aid 0x0004 (ProtocolDescList)
             < < uuid-16 0x0100 (L2CAP) > <
             uuid-16 0x0003 (RFCOMM) uint 0x9 > <
             uuid-16 0x0008 (OBEX) > >
          aid 0x0005 (BrwGrpList)
             < uuid-16 0x1002 (PubBrwsGrp) >
          aid 0x0009 (BTProfileDescList)
             < < uuid-16 0x1105 (OBEXObjPush) uint 0x100 > >
          aid 0x0100 (SrvName)
             str "OBEX Object Push"
          aid 0x0303 (SuppFormatsList)
             < uint 0x1 uint 0x2 uint 0x3 uint 0x4 uint 0x5 uint 0x6 >
          cont 00
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0094
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 3 scid 0x0095
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0094
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0095 result 0 status 0
      Connection successful
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 16

    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1710 
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0095 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0095 flags 0x00 clen 4
      MTU 1024 
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7 
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 18

L2CAP(d): cid 0x0040 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 0 ack_timer 0 frame_size 1012 max_retrans 0 credits 7
< ACL data: handle 42 flags 0x02 dlen 18
L2CAP(d): cid 0x0095 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 0 ack_timer 0 frame_size 1012 max_retrans 0 credits 7

Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 18 pf 1 ilen 0 fcs 0x32 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 18 pf 1 ilen 0 fcs 0xf9 
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0095 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0095 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 9

    L2CAP(d): cid 0x0040 len 5 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 18 pf 1 ilen 0 fcs 0xd2 credits 100
Quoted 1 line

ACL data: handle 42 flags 0x02 dlen 15

    L2CAP(d): cid 0x0040 len 11 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 18 pf 0 ilen 7 fcs 0xce 
        OBEX: Connect cmd(f): len 7 version 1.0 flags 0 mtu 32573
< ACL data: handle 42 flags 0x02 dlen 9
    L2CAP(d): cid 0x0095 len 5 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 18 pf 1 ilen 0 fcs 0x8 credits 34
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 18 fc 0 rtc 0 rtr 0 ic 0 dv 0 b1 1 b2 1 b3 0 len 0
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0095 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 18 fc 0 rtc 0 rtr 0 ic 0 dv 0 b1 1 b2 1 b3 0 len 0
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 1 dlci 18 pf 1 ilen 0 fcs 0xd3 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 18 pf 1 ilen 0 fcs 0xf9 
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0095 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7 
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 42 flags 0x02 dlen 12

    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0095
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0095
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Disconn Complete (0x05) plen 4

I can't figure it out. is the server side need an agent to comfirm the client's request? who can help me out , many thanks in advance!

tony

--

Best Regards
------------
Tony

渊波阔宅 湖景人生

渊波阔宅 湖景人生

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users