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.
> c
Connect OK!
Version: 0x10. Flags: 0x00
> p hello.txt hw.txt
PUT file (local, remote)> name=hello.txt, size=31
PUT successful!
> 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.
> 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
> HCI Event: Connect Request (0x04) plen 10
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
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.
> s
Timeout while doing OBEX_HandleInput()
> 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
[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.
> c
Connect OK!
Version: 0x10. Flags: 0x00
> p hello.txt hw.txt
PUT file (local, remote)> name=hello.txt, size=31
PUT successful!
> 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.
> 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
> HCI Event: Connect Request (0x04) plen 10
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
Ԩ????լ ????????
Ԩ????լ ????????
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.
> c
Connect OK!
Version: 0x10. Flags: 0x00
> p hello.txt hw.txt
PUT file (local, remote)> name=hello.txt, size=31
PUT successful!
> 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.
> 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
> HCI Event: Connect Request (0x04) plen 10
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
Ԩ????լ ????????