All of lore.kernel.org
 help / color / mirror / Atom feed
* obexd: obex_handle_input: poll event HUP ERR
@ 2011-09-15  7:43 Alex Mach
  0 siblings, 0 replies; 14+ messages in thread
From: Alex Mach @ 2011-09-15  7:43 UTC (permalink / raw)
  To: linux-bluetooth

Hello,

I have a problem with receiving files with obexd. After it receives
header (file name etc.) it hangs up the connection with
obex_handle_input: poll event HUP ERR
bluez-4.95kernel-2.6.38.7 armv5tejl 
GNU/Linuxlibopenobex1-1.5obexd-0.42/usr/sbin/obexd --auto-accept --root=/var/obex 
 -d -nobexd[844]: obexd daemon 0.42obexd[844]: src/main.c:main() Entering 
main loopobexd[844]: src/manager.c:manager_init() obexd[844]: 
src/plugin.c:plugin_init() Loading builtin pluginsobexd[844]: 
src/transport.c:obex_transport_driver_register() driver 0x37a00 transport 
bluetooth registeredobexd[844]: src/plugin.c:add_plugin() Plugin bluetooth 
loadedobexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 
0x37a94 mimetype x-obex/folder-listing registeredobexd[844]: 
src/mimetype.c:obex_mime_type_driver_register() driver 0x37a58 mimetype 
x-obex/capability registeredobexd[844]: 
src/mimetype.c:obex_mime_type_driver_register() driver 0x37ad0 mimetype 
x-obex/folder-listing registeredobexd[844]: 
src/mimetype.c:obex_mime_type_driver_register() driver 0x37a1c mimetype 
(null) registeredobexd[844]: src/plugin.c:add_plugin() Plugin filesystem 
loadedobexd[844]: src/service.c:obex_service_driver_register() driver 
0x37b18 service Object Push server registeredobexd[844]: 
src/plugin.c:add_plugin() Plugin opp loadedobexd[844]: 
src/service.c:obex_service_driver_register() driver 0x37b64 service File 
Transfer server registeredobexd[844]: src/plugin.c:add_plugin() Plugin ftp 
loadedobexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 
0x37bf0 mimetype x-bt/phonebook registeredobexd[844]: 
src/mimetype.c:obex_mime_type_driver_register() driver 0x37c2c mimetype 
x-bt/vcard-listing registeredobexd[844]: 
src/mimetype.c:obex_mime_type_driver_register() driver 0x37c68 mimetype 
x-bt/vcard registeredobexd[844]: 
src/service.c:obex_service_driver_register() driver 0x37bb0 service 
Phonebook Access server registeredobexd[844]: src/plugin.c:add_plugin() 
Plugin pbap loadedobexd[844]: 
src/mimetype.c:obex_mime_type_driver_register() driver 0x37cf0 mimetype 
(null) registeredobexd[844]: src/service.c:obex_service_driver_register() 
driver 0x37cb0 service Message Access server registeredobexd[844]: 
src/plugin.c:add_plugin() Plugin mas loadedobexd[844]: 
plugins/irmc.c:irmc_init()obexd[844]: 
src/mimetype.c:obex_mime_type_driver_register() driver 0x37d3c mimetype 
(null) registeredobexd[844]: src/service.c:obex_service_driver_register() 
driver 0x37d78 service IRMC Sync server registeredobexd[844]: 
src/plugin.c:add_plugin() Plugin irmc loadedobexd[844]: 
src/mimetype.c:obex_mime_type_driver_register() driver 0x37dc4 mimetype 
(null) registeredobexd[844]: src/service.c:obex_service_driver_register() 
driver 0x37e00 service OBEX server for SyncML, using SyncEvolution 
registeredobexd[844]: src/plugin.c:add_plugin() Plugin syncevolution 
loadedobexd[844]: src/plugin.c:plugin_init() Loading plugins 
/var/buildroot-2011.05/output/staging/usr/lib/obex/pluginsobexd[844]: 
plugins/bluetooth.c:start() listening on channel 9obexd[844]: 
plugins/bluetooth.c:start() listening on channel 10obexd[844]: 
src/server.c:obex_server_init() No service driver registeredobexd[844]: 
plugins/bluetooth.c:start() listening on channel 15obexd[844]: 
plugins/bluetooth.c:start() listening on channel 14obexd[844]: 
plugins/bluetooth.c:start() listening on channel 19obexd[844]: 
plugins/bluetooth.c:start() listening on channel 16obexd[844]: 
plugins/bluetooth.c:find_adapter() FindAdapter(any)obexd[844]: 
plugins/bluetooth.c:add_record_reply() Registered: Object Push server, 
handle: 0x10005obexd[844]: plugins/bluetooth.c:add_record_reply() 
Registered: File Transfer server, handle: 0x10006obexd[844]: 
plugins/bluetooth.c:add_record_reply() Registered: Phonebook Access server, 
handle: 0x10007obexd[844]: plugins/bluetooth.c:add_record_reply() 
Registered: IRMC Sync server, handle: 0x10008obexd[844]: 
plugins/bluetooth.c:add_record_reply() Registered: OBEX server for SyncML, 
using SyncEvolution, handle: 0x10009obexd[844]: 
plugins/bluetooth.c:add_record_reply() Registered: Message Access server, 
handle: 0x1000aobexd[844]: bluetooth: New connection from: 
04:A8:2A:36:D5:0C, channel 9obexd[844]: REQHINT(0x1), CONNECT(0x0), 
(null)(0x0)obexd[844]: REQ(0x2), CONNECT(0x0), (null)(0x0)obexd[844]: 
src/obex.c:cmd_connect() Version: 0x10. Flags: 0x00 OBEX packet length: 
32767obexd[844]: src/obex.c:cmd_connect() Resizing stream chunks to 
32567obexd[844]: src/obex.c:cmd_connect() Selected driver: Object Push 
serverobexd[844]: REQ(0x2), CONNECT(0x0), CONTINUE(0x10)obexd[844]: 
REQDONE(0x3), CONNECT(0x0), (null)(0x0)obexd[844]: REQHINT(0x1), PUT(0x2), 
(null)(0x0)obexd[844]: REQCHECK(0xb), PUT(0x2), (null)(0x0)obexd[844]: 
src/obex.c:check_put() OBEX_HDR_NAME: (null)obexd[844]: 
src/obex.c:check_put() OBEX_HDR_LENGTH: 6718obexd[844]: 
src/obex.c:check_put() OBEX_HDR_TYPE: audio/midiobexd[844]: REQDONE(0x3), 
PUT(0x2), (null)(0x0)obexd[844]: obex_handle_input: poll event HUP 
ERRobexd[844]: src/obex.c:obex_handle_destroy()obexd[844]: Terminating due 
to signal 2# hcidump hci0HCI sniffer - Bluetooth packet analyzer ver 
2.1device: hci0 snap_len: 1028 filter: 0xffffffff > HCI Event: Connect 
Request (0x04) plen 10 bdaddr xx:xx:xx:xx:xx:xx class 0x520204 type ACL< HCI 
Command: Accept Connection Request (0x01|0x0009) plen 7bdaddr 
xx:xx:xx:xx:xx:xx role 0x00 Role: Master > HCI Event: Command Status (0x0f) 
plen 4 Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1> HCI 
Event: Role Change (0x12) plen 8 status 0x00 bdaddr xx:xx:xx:xx:xx:xx role 
0x00 Role: Master > HCI Event: Connect Complete (0x03) plen 11 status 0x00 
handle 42 bdaddr xx:xx:xx:xx:xx:xx type ACL encrypt 0x00< HCI Command: Read 
Remote Supported Features (0x01|0x001b) plen 2 handle 42 > HCI Event: Page 
Scan Repetition Mode Change (0x20) plen 7 bdaddr 04:A8:2A:36:D5:0C mode 1 > 
HCI Event: Command Status (0x0f) plen 4 Read Remote Supported Features 
(0x01|0x001b) status 0x00 ncmd 0 > HCI Event: Max Slots Change (0x1b) plen 3 
handle 42 slots 5 > HCI Event: Command Status (0x0f) plen 4 Unknown 
(0x00|0x0000) status 0x00 ncmd 1 > HCI Event: Read Remote Supported Features 
(0x0b) plen 11 status 0x00 handle 42 Features: 0xbf 0xee 0x0f 0xce 0x98 0xbf 
0x59 0x83 < HCI Command: Remote Name Request (0x01|0x0019) plen 10 bdaddr 
xx:xx:xx:xx:xx:xx mode 2 clkoffset 0x0000 > HCI Event: Command Status (0x0f) 
plen 4 Remote Name Request (0x01|0x0019) status 0x00 ncmd 1 > ACL data: 
handle 42 flags 0x02 dlen 12 L2CAP(s): Connect req: psm 1 scid 0x0040 < ACL 
data: handle 42 flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0040 scid 
0x0040 result 1 status 0 Connection pending - No futher information 
available < ACL data: handle 42 flags 0x02 dlen 10 L2CAP(s): Info req: type 
2 > HCI Event: Remote Name Req Complete (0x07) plen 255 status 0x00 bdaddr 
xx:xx:xx:xx:xx:xx name 'C2-00' > HCI Event: Number of Completed Packets 
(0x13) plen 5 handle 42 packets 1 > HCI Event: Number of Completed Packets 
(0x13) plen 5 handle 42 packets 1 > ACL data: handle 42 flags 0x02 dlen 16 
L2CAP(s): Info rsp: type 2 result 0 Extended feature mask 0x0000 < ACL data: 
handle 42 flags 0x02 dlen 16 L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 
result 0 status 0 Connection successful < ACL data: handle 42 flags 0x02 
dlen 12 L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0 > HCI Event: 
Number of Completed Packets (0x13) plen 5 handle 42 packets 1 > HCI Event: 
Number of Completed Packets (0x13) plen 5 handle 42 packets 1 > ACL data: 
handle 42 flags 0x02 dlen 16 L2CAP(s): Config req: dcid 0x0040 flags 0x00 
clen 4 MTU 65535 < ACL data: handle 42 flags 0x02 dlen 18 L2CAP(s): Config 
rsp: scid 0x0040 flags 0x00 result 0 clen 4 MTU 65535 > ACL data: handle 42 
flags 0x02 dlen 14 L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 
clen 0 Success > HCI Event: Number of Completed Packets (0x13) plen 5 handle 
42 packets 1 > ACL data: handle 42 flags 0x02 dlen 17 L2CAP(d): cid 0x0040 
len 13 [psm 1] SDP SS Req: tid 0x3 len 0x8 pat uuid-16 0x1105 (OBEXObjPush) 
max 255 cont 00 < ACL data: handle 42 flags 0x02 dlen 18 L2CAP(d): cid 
0x0040 len 14 [psm 1] SDP SS Rsp: tid 0x3 len 0x9 count 1 handle 0x10005 
cont 00 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 42 
packets 1 > ACL data: handle 42 flags 0x02 dlen 24 L2CAP(d): cid 0x0040 len 
20 [psm 1] SDP SA Req: tid 0x4 len 0xf handle 0x10005 max 65435 aid(s) 
0x0001 (SrvClassIDList) 0x0004 (ProtocolDescList) cont 00 < ACL data: handle 
42 flags 0x02 dlen 44 L2CAP(d): cid 0x0040 len 40 [psm 1] SDP SA Rsp: tid 
0x4 len 0x23 count 32 aid 0x0001 (SrvClassIDList) < uuid-16 0x1105 
(OBEXObjPush) > aid 0x0004 (ProtocolDescList) < < uuid-16 0x0100 (L2CAP) > < 
uuid-16 0x0003 (RFCOMM) uint 0x9 > < uuid-16 0x0008 (OBEX) > > cont 00 > HCI 
Event: Number of Completed Packets (0x13) plen 5 handle 42 packets 1 > ACL 
data: handle 42 flags 0x02 dlen 12 L2CAP(s): Disconn req: dcid 0x0040 scid 
0x0040 < ACL data: handle 42 flags 0x02 dlen 12 L2CAP(s): Disconn rsp: dcid 
0x0040 scid 0x0040 > HCI Event: Number of Completed Packets (0x13) plen 5 
handle 42 packets 1 > ACL data: handle 42 flags 0x02 dlen 12 L2CAP(s): 
Connect req: psm 3 scid 0x0040 < ACL data: handle 42 flags 0x02 dlen 16 
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0 Connection 
successful < ACL data: handle 42 flags 0x02 dlen 16 L2CAP(s): Config req: 
dcid 0x0040 flags 0x00 clen 4 MTU 1013 > HCI Event: Number of Completed 
Packets (0x13) plen 5 handle 42 packets 1 > HCI Event: Number of Completed 
Packets (0x13) plen 5 handle 42 packets 1 > ACL data: handle 42 flags 0x02 
dlen 16 L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4 MTU 32772 < ACL 
data: handle 42 flags 0x02 dlen 18 L2CAP(s): Config rsp: scid 0x0040 flags 
0x00 result 0 clen 4 MTU 32772 > ACL data: handle 42 flags 0x02 dlen 18 
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4 MTU 1013 > HCI 
Event: Number of Completed Packets (0x13) plen 5 handle 42 packets 1 > 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 0x0040 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 handle 42 packets 1 > 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 1008 max_retrans 0 credits 0 < ACL data: handle 42 flags 0x02 
dlen 18 L2CAP(d): cid 0x0040 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 1008 max_retrans 0 credits 7 > HCI Event: Number of 
Completed Packets (0x13) plen 5 handle 42 packets 1 > 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 0x0040 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 0x0040 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 handle 42 packets 1 > HCI Event: Number of 
Completed Packets (0x13) plen 5 handle 42 packets 1 > 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 0 
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 0 dlci 0 pf 0 ilen 4 fcs 0xaa 
mcc_len 2 dlci 18 fc 0 rtc 1 rtr 1 ic 0 dv 0 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 < ACL data: handle 42 flags 0x02 
dlen 9 L2CAP(d): cid 0x0040 len 5 [psm 3] RFCOMM(d): UIH: cr 0 dlci 18 pf 1 
ilen 0 fcs 0x8 credits 33 > HCI Event: Number of Completed Packets (0x13) 
plen 5 handle 42 packets 1 > HCI Event: Number of Completed Packets (0x13) 
plen 5 handle 42 packets 1 > 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 9 > 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 32767 < ACL data: handle 42 flags 0x02 
dlen 15 L2CAP(d): cid 0x0040 len 11 [psm 3] RFCOMM(d): UIH: cr 0 dlci 18 pf 
0 ilen 7 fcs 0x14 OBEX: Connect rsp(f): status 200 len 7 version 1.0 flags 0 
mtu 32767Status 200 = Success > HCI Event: Number of Completed Packets 
(0x13) plen 5 handle 42 packets 1 > ACL data: handle 42 flags 0x02 dlen 70 
L2CAP(d): cid 0x0040 len 66 [psm 3] RFCOMM(d): UIH: cr 1 dlci 18 pf 1 ilen 
61 fcs 0xd2 credits 1OBEX: Put cmd(c): len 61Name (0x01) = Unicode length 
18Length (0xc3) = 6718Type (0x42) = Sequence length 11Time (0x44) = Sequence 
length 15< ACL data: handle 42 flags 0x02 dlen 11L2CAP(d): cid 0x0040 len 7 
[psm 3]RFCOMM(d): UIH: cr 0 dlci 18 pf 0 ilen 3 fcs 0x14OBEX: Put rsp(f): 
status 400 len 3> HCI Event: Number of Completed Packets (0x13) plen 5handle 
42 packets 1> ACL data: handle 42 flags 0x02 dlen 8L2CAP(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 8L2CAP(d): cid 0x0040 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 5handle 42 packets 1> ACL data: handle 42 flags 0x02 dlen 
8L2CAP(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 8L2CAP(d): cid 0x0040 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 5handle 42 packets 1> ACL data: handle 42 
flags 0x02 dlen 12L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040< ACL data: 
handle 42 flags 0x02 dlen 12L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040> 
HCI Event: Number of Completed Packets (0x13) plen 5handle 42 packets 1> HCI 
Event: Disconn Complete (0x05) plen 4status 0x00 handle 42 reason 
0x13Reason: Remote User Terminated Connection< HCI Command: Read Remote 
Version Information (0x01|0x001d) plen 2handle 42> HCI Event: Command Status 
(0x0f) plen 4Read Remote Version Information (0x01|0x001d) status 0x02 ncmd 
1Error: Unknown Connection IdentifierThanks,Alex. 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
  2011-09-22  7:40       ` alexvm12e
@ 2011-09-22  8:07         ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2011-09-22  8:07 UTC (permalink / raw)
  To: alexvm12e; +Cc: linux-bluetooth

Hi,

On Thu, Sep 22, 2011 at 10:40 AM,  <alexvm12e@mail.ru> wrote:
>
> Hi Luiz,
>
>
>> Can you try the following:
>
>> diff --git a/src/obex.c b/src/obex.c
>> index d8f4648..7b68814 100644
>> --- a/src/obex.c
>> +++ b/src/obex.c
>> @@ -985,6 +985,7 @@ static gboolean check_put(obex_t *obex, obex_object_t
>> *obj)
>>       unsigned int hlen;
>>       uint8_t hi;
>>       int ret;
>> +       GError *err = NULL;
>>
>>       os = OBEX_GetUserData(obex);
>>
>> @@ -1010,7 +1011,12 @@ static gboolean check_put(obex_t *obex,
>> obex_object_t *obj)
>>                               continue;
>>
>>                       os->name = g_convert((const char *) hd.bs, hlen,
>> -                                       "UTF8", "UTF16BE", NULL, NULL,
>> NULL);
>> +                                       "UTF8", "UTF16BE", NULL, NULL,
>> &err);
>> +                       if (err) {
>> +                               error("%s", err->message);
>> +                               g_error_free(err);
>> +                       }
>> +
>>                       DBG("OBEX_HDR_NAME: %s", os->name);
>>                       break;
>
> obexd[844]: Conversion from character set 'UTF16BE' to 'UTF8' is not
> supported
>
> As I understood this is a glib problem not obexd. Thanks for your help.

Yep, probably some dependency missing so that it makes glib unable to
do the conversion. Anyway I think I gonna go ahead and add these so
that it is easier to detect such problem in the future.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
  2011-09-21 12:33     ` Luiz Augusto von Dentz
@ 2011-09-22  7:40       ` alexvm12e
  2011-09-22  8:07         ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 14+ messages in thread
From: alexvm12e @ 2011-09-22  7:40 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth


Hi Luiz,


> Can you try the following:

> diff --git a/src/obex.c b/src/obex.c
> index d8f4648..7b68814 100644
> --- a/src/obex.c
> +++ b/src/obex.c
> @@ -985,6 +985,7 @@ static gboolean check_put(obex_t *obex, obex_object_t 
> *obj)
>        unsigned int hlen;
>        uint8_t hi;
>        int ret;
> +       GError *err = NULL;
>
>        os = OBEX_GetUserData(obex);
>
> @@ -1010,7 +1011,12 @@ static gboolean check_put(obex_t *obex,
> obex_object_t *obj)
>                                continue;
>
>                        os->name = g_convert((const char *) hd.bs, hlen,
> -                                       "UTF8", "UTF16BE", NULL, NULL, NULL);
> +                                       "UTF8", "UTF16BE", NULL, NULL, &err);
> +                       if (err) {
> +                               error("%s", err->message);
> +                               g_error_free(err);
> +                       }
> +
>                        DBG("OBEX_HDR_NAME: %s", os->name);
>                        break;

obexd[844]: Conversion from character set 'UTF16BE' to 'UTF8' is not supported

As I understood this is a glib problem not obexd. Thanks for your help.

Alex. 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
  2011-09-21 12:13   ` Alex Mach
@ 2011-09-21 12:33     ` Luiz Augusto von Dentz
  2011-09-22  7:40       ` alexvm12e
  0 siblings, 1 reply; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2011-09-21 12:33 UTC (permalink / raw)
  To: Alex Mach; +Cc: linux-bluetooth

Hi Alex,

On Wed, Sep 21, 2011 at 3:13 PM, Alex Mach <alexvm12e@mail.ru> wrote:
> Hi Luiz,
>
> the string in the header seems ok (file name is 1087.mid):
>
>> ACL data: handle 42 flags 0x02 dlen 70
>
>   L2CAP(d): cid 0x0040 len 66 [psm 3]
>     RFCOMM(d): UIH: cr 1 dlci 18 pf 1 ilen 61 fcs 0xd2 credits 1
>       OBEX: Put cmd(c): len 61
>       Name (0x01) = Unicode length 18
>       0000: 00 31 00 30 00 38 00 37  00 2e 00 6d 00 69 00 64
> .1.0.8.7...m.i.d
>       0010: 00 00 ..
>       Length (0xc3) = 6718
>       Type (0x42) = Sequence length 11
>       0000: 61 75 64 69 6f 2f 6d 69  64 69 00 audio/midi.
>       Time (0x44) = Sequence length 15
>       0000: 32 30 31 31 30 39 30 33  54 31 33 32 36 34 38 20110903T132648

No top posting please, please use inline posting.

Can you try the following:

diff --git a/src/obex.c b/src/obex.c
index d8f4648..7b68814 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -985,6 +985,7 @@ static gboolean check_put(obex_t *obex, obex_object_t *obj)
        unsigned int hlen;
        uint8_t hi;
        int ret;
+       GError *err = NULL;

        os = OBEX_GetUserData(obex);

@@ -1010,7 +1011,12 @@ static gboolean check_put(obex_t *obex,
obex_object_t *obj)
                                continue;

                        os->name = g_convert((const char *) hd.bs, hlen,
-                                       "UTF8", "UTF16BE", NULL, NULL, NULL);
+                                       "UTF8", "UTF16BE", NULL, NULL, &err);
+                       if (err) {
+                               error("%s", err->message);
+                               g_error_free(err);
+                       }
+
                        DBG("OBEX_HDR_NAME: %s", os->name);
                        break;

-- 
Luiz Augusto von Dentz

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
  2011-09-16  8:07 ` Luiz Augusto von Dentz
@ 2011-09-21 12:13   ` Alex Mach
  2011-09-21 12:33     ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 14+ messages in thread
From: Alex Mach @ 2011-09-21 12:13 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

the string in the header seems ok (file name is 1087.mid):

> ACL data: handle 42 flags 0x02 dlen 70
    L2CAP(d): cid 0x0040 len 66 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 18 pf 1 ilen 61 fcs 0xd2 credits 1
        OBEX: Put cmd(c): len 61
        Name (0x01) = Unicode length 18
        0000: 00 31 00 30 00 38 00 37  00 2e 00 6d 00 69 00 64 
.1.0.8.7...m.i.d
        0010: 00 00 
..
        Length (0xc3) = 6718
        Type (0x42) = Sequence length 11
        0000: 61 75 64 69 6f 2f 6d 69  64 69 00 
audio/midi.
        Time (0x44) = Sequence length 15
        0000: 32 30 31 31 30 39 30 33  54 31 33 32 36 34 38 
20110903T132648

>> I have a problem with receiving files with obexd. After it receives 
>> header
>> it hangs up the connection with
>> obex_handle_input: poll event HUP ERR
>
>> bluez-4.95
>> kernel-2.6.38.7 armv5tejl GNU/Linux
>> libopenobex1-1.5
>> obexd-0.42
>>
>> /usr/sbin/obexd --auto-accept --root=/var/obex
>>
>> obexd[844]: src/obex.c:check_put() OBEX_HDR_NAME: (null)

> Problem seems to be here, apparently we could not convert the name
> received (Unicode length 18 according to hcidump), so the name is not
> set cause plugin/ftp.c:268 to fail. Could you please check what is the
> string in the header and if that is really a utf16 as the spec
> mandates.

> -- 
> Luiz Augusto von Dentz

Thanks,
Alex. 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
       [not found] <E1R47Z5-0000QH-00.alexvm12e-mail-ru@f167.mail.ru>
@ 2011-09-16  8:07 ` Luiz Augusto von Dentz
  2011-09-21 12:13   ` Alex Mach
  0 siblings, 1 reply; 14+ messages in thread
From: Luiz Augusto von Dentz @ 2011-09-16  8:07 UTC (permalink / raw)
  To: Alex Mach; +Cc: linux-bluetooth

Hi Alex,

On Thu, Sep 15, 2011 at 11:44 AM, Alex Mach <alexvm12e@mail.ru> wrote:
>
> Hello,
>
> I have a problem with receiving files with obexd. After it receives header
>  it hangs up the connection with
> obex_handle_input: poll event HUP ERR
>
> bluez-4.95
> kernel-2.6.38.7 armv5tejl GNU/Linux
> libopenobex1-1.5
> obexd-0.42
>
> /usr/sbin/obexd --auto-accept --root=/var/obex
>
> obexd[844]: obexd daemon 0.42
> obexd[844]: src/main.c:main() Entering main loop
> obexd[844]: src/manager.c:manager_init()
> obexd[844]: src/plugin.c:plugin_init() Loading builtin plugins
> obexd[844]: src/transport.c:obex_transport_driver_register() driver 0x37a00 transport bluetooth registered
> obexd[844]: src/plugin.c:add_plugin() Plugin bluetooth loaded
> obexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 0x37a94 mimetype x-obex/folder-listing registered
> obexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 0x37a58 mimetype x-obex/capability registered
> obexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 0x37ad0 mimetype x-obex/folder-listing registered
> obexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 0x37a1c mimetype (null) registered
> obexd[844]: src/plugin.c:add_plugin() Plugin filesystem loaded
> obexd[844]: src/service.c:obex_service_driver_register() driver 0x37b18 service Object Push server registered
> obexd[844]: src/plugin.c:add_plugin() Plugin opp loaded
> obexd[844]: src/service.c:obex_service_driver_register() driver 0x37b64 service File Transfer server registered
> obexd[844]: src/plugin.c:add_plugin() Plugin ftp loaded
> obexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 0x37bf0 mimetype x-bt/phonebook registered
> obexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 0x37c2c mimetype x-bt/vcard-listing registered
> obexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 0x37c68 mimetype x-bt/vcard registered
> obexd[844]: src/service.c:obex_service_driver_register() driver 0x37bb0 service Phonebook Access server registered
> obexd[844]: src/plugin.c:add_plugin() Plugin pbap loaded
> obexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 0x37cf0 mimetype (null) registered
> obexd[844]: src/service.c:obex_service_driver_register() driver 0x37cb0 service Message Access server registered
> obexd[844]: src/plugin.c:add_plugin() Plugin mas loaded
> obexd[844]: plugins/irmc.c:irmc_init()
> obexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 0x37d3c mimetype (null) registered
> obexd[844]: src/service.c:obex_service_driver_register() driver 0x37d78 service IRMC Sync server registered
> obexd[844]: src/plugin.c:add_plugin() Plugin irmc loaded
> obexd[844]: src/mimetype.c:obex_mime_type_driver_register() driver 0x37dc4 mimetype (null) registered
> obexd[844]: src/service.c:obex_service_driver_register() driver 0x37e00 service OBEX server for SyncML, using SyncEvolution registered
> obexd[844]: src/plugin.c:add_plugin() Plugin syncevolution loaded
> obexd[844]: src/plugin.c:plugin_init() Loading plugins /var/buildroot-2011.05/output/staging/usr/lib/obex/plugins
> obexd[844]: plugins/bluetooth.c:start() listening on channel 9
> obexd[844]: plugins/bluetooth.c:start() listening on channel 10
> obexd[844]: src/server.c:obex_server_init() No service driver registered
> obexd[844]: plugins/bluetooth.c:start() listening on channel 15
> obexd[844]: plugins/bluetooth.c:start() listening on channel 14
> obexd[844]: plugins/bluetooth.c:start() listening on channel 19
> obexd[844]: plugins/bluetooth.c:start() listening on channel 16
> obexd[844]: plugins/bluetooth.c:find_adapter() FindAdapter(any)
> obexd[844]: plugins/bluetooth.c:add_record_reply() Registered: Object Push server, handle: 0x10005
> obexd[844]: plugins/bluetooth.c:add_record_reply() Registered: File Transfer server, handle: 0x10006
> obexd[844]: plugins/bluetooth.c:add_record_reply() Registered: Phonebook Access server, handle: 0x10007
> obexd[844]: plugins/bluetooth.c:add_record_reply() Registered: IRMC Sync server, handle: 0x10008
> obexd[844]: plugins/bluetooth.c:add_record_reply() Registered: OBEX server for SyncML, using SyncEvolution, handle: 0x10009
> obexd[844]: plugins/bluetooth.c:add_record_reply() Registered: Message Access server, handle: 0x1000a
>
> obexd[844]: bluetooth: New connection from: 04:A8:2A:36:D5:0C, channel 9
> obexd[844]: REQHINT(0x1), CONNECT(0x0), (null)(0x0)
> obexd[844]: REQ(0x2), CONNECT(0x0), (null)(0x0)
> obexd[844]: src/obex.c:cmd_connect() Version: 0x10. Flags: 0x00  OBEX packet length: 32767
> obexd[844]: src/obex.c:cmd_connect() Resizing stream chunks to 32567
> obexd[844]: src/obex.c:cmd_connect() Selected driver: Object Push server
> obexd[844]: REQ(0x2), CONNECT(0x0), CONTINUE(0x10)
> obexd[844]: REQDONE(0x3), CONNECT(0x0), (null)(0x0)
> obexd[844]: REQHINT(0x1), PUT(0x2), (null)(0x0)
> obexd[844]: REQCHECK(0xb), PUT(0x2), (null)(0x0)
> obexd[844]: src/obex.c:check_put() OBEX_HDR_NAME: (null)

Problem seems to be here, apparently we could not convert the name
received (Unicode length 18 according to hcidump), so the name is not
set cause plugin/ftp.c:268 to fail. Could you please check what is the
string in the header and if that is really a utf16 as the spec
mandates.


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
  2010-06-22 16:16           ` Jiri Slaby
@ 2010-06-22 16:34             ` Bastien Nocera
  0 siblings, 0 replies; 14+ messages in thread
From: Bastien Nocera @ 2010-06-22 16:34 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-bluetooth

On Tue, 2010-06-22 at 18:16 +0200, Jiri Slaby wrote:
> On 06/22/2010 10:13 AM, Johan Hedberg wrote:
> > On Tue, Jun 22, 2010, Jiri Slaby wrote:
> >> Yeah, -a solved the problem. What does it mean to have an agent
> >> registered? What is agent?
> > 
> > If you don't want obexd to go blindly accepting files from random remote
> > devices you'll probably want some sort of user interaction on the server
> > side, right? One possibility would be to have a GUI process show a
> > "Accept file from ..." dialog every time there's an incoming request.
> > You might also want to choose exactly where on the filesystem obexd
> > stores the incoming file. Such choices would be made by an agent, i.e.
> > a process separate from obexd that has through D-Bus told obexd that it
> > can take care of incoming requests. There's an example command line
> > agent written in python available at test/simple-agent in the obexd
> > source tree. The actual D-Bus API of an agent is documented in
> > doc/agent-api.txt in the same source tree.
> 
> I have gnome-bluetooth-2.30, but I guess it was not converted to act
> also as obexd Agent yet.

gnome-bluetooth doesn't have any Obex server bits. You'd need to use
gnome-user-share to have Obex server capabilities, and it doesn't use
obexd right now, but obex-data-server.

Patches welcome :)

Cheers


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
  2010-06-22  8:13         ` Johan Hedberg
@ 2010-06-22 16:16           ` Jiri Slaby
  2010-06-22 16:34             ` Bastien Nocera
  0 siblings, 1 reply; 14+ messages in thread
From: Jiri Slaby @ 2010-06-22 16:16 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Bastien Nocera

On 06/22/2010 10:13 AM, Johan Hedberg wrote:
> On Tue, Jun 22, 2010, Jiri Slaby wrote:
>> Yeah, -a solved the problem. What does it mean to have an agent
>> registered? What is agent?
> 
> If you don't want obexd to go blindly accepting files from random remote
> devices you'll probably want some sort of user interaction on the server
> side, right? One possibility would be to have a GUI process show a
> "Accept file from ..." dialog every time there's an incoming request.
> You might also want to choose exactly where on the filesystem obexd
> stores the incoming file. Such choices would be made by an agent, i.e.
> a process separate from obexd that has through D-Bus told obexd that it
> can take care of incoming requests. There's an example command line
> agent written in python available at test/simple-agent in the obexd
> source tree. The actual D-Bus API of an agent is documented in
> doc/agent-api.txt in the same source tree.

I have gnome-bluetooth-2.30, but I guess it was not converted to act
also as obexd Agent yet.

thanks,
-- 
js

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
  2010-06-22  8:04       ` Jiri Slaby
@ 2010-06-22  8:13         ` Johan Hedberg
  2010-06-22 16:16           ` Jiri Slaby
  0 siblings, 1 reply; 14+ messages in thread
From: Johan Hedberg @ 2010-06-22  8:13 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-bluetooth

On Tue, Jun 22, 2010, Jiri Slaby wrote:
> Yeah, -a solved the problem. What does it mean to have an agent
> registered? What is agent?

If you don't want obexd to go blindly accepting files from random remote
devices you'll probably want some sort of user interaction on the server
side, right? One possibility would be to have a GUI process show a
"Accept file from ..." dialog every time there's an incoming request.
You might also want to choose exactly where on the filesystem obexd
stores the incoming file. Such choices would be made by an agent, i.e.
a process separate from obexd that has through D-Bus told obexd that it
can take care of incoming requests. There's an example command line
agent written in python available at test/simple-agent in the obexd
source tree. The actual D-Bus API of an agent is documented in
doc/agent-api.txt in the same source tree.

Johan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
  2010-06-22  7:58     ` Johan Hedberg
@ 2010-06-22  8:04       ` Jiri Slaby
  2010-06-22  8:13         ` Johan Hedberg
  0 siblings, 1 reply; 14+ messages in thread
From: Jiri Slaby @ 2010-06-22  8:04 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: johan.hedberg

On 06/22/2010 09:58 AM, Johan Hedberg wrote:
>> # hcidump -XV
> <snip>
>> < ACL data: handle 42 flags 0x02 dlen 11
>>     L2CAP(d): cid 0x0041 len 7 [psm 3]
>>       RFCOMM(d): UIH: cr 0 dlci 18 pf 0 ilen 3 fcs 0x14
>>         OBEX: Put rsp(f): status 403 len 3
> 
> So obexd is responding with "forbidden" to the client.
> Possible reasons:
> 
> * obexd doesn't have write access to the directory it's trying to
>   write to
> 
> * You don't have an agent registered for obexd that could accept
>   the request or you're not running obexd in the auto-accept mode
>   (the -a switch).

Yeah, -a solved the problem. What does it mean to have an agent
registered? What is agent?

Thanks.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
  2010-06-22  7:41   ` Jiri Slaby
@ 2010-06-22  7:58     ` Johan Hedberg
  2010-06-22  8:04       ` Jiri Slaby
  0 siblings, 1 reply; 14+ messages in thread
From: Johan Hedberg @ 2010-06-22  7:58 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-bluetooth

Hi,

On Tue, Jun 22, 2010, Jiri Slaby wrote:
> > libopenobex seems to be indicating REQDONE, so it doesn't look like
> > anything is necessarily wrong with obexd here. However, you'd need to
> > look at the HCI level trafic (output of "hcidump -XV") to determine
> > what's really going on (e.g. is it obexd or the client that's
> > disconnecting).
> 
> Attached:

Thanks.

> # hcidump -XV
<snip>
> < ACL data: handle 42 flags 0x02 dlen 11
>     L2CAP(d): cid 0x0041 len 7 [psm 3]
>       RFCOMM(d): UIH: cr 0 dlci 18 pf 0 ilen 3 fcs 0x14
>         OBEX: Put rsp(f): status 403 len 3

So obexd is responding with "forbidden" to the client.
Possible reasons:

* obexd doesn't have write access to the directory it's trying to
  write to

* You don't have an agent registered for obexd that could accept
  the request or you're not running obexd in the auto-accept mode
  (the -a switch).

Johan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
  2010-06-22  7:38 ` Johan Hedberg
@ 2010-06-22  7:41   ` Jiri Slaby
  2010-06-22  7:58     ` Johan Hedberg
  0 siblings, 1 reply; 14+ messages in thread
From: Jiri Slaby @ 2010-06-22  7:41 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: johan.hedberg

On 06/22/2010 09:38 AM, Johan Hedberg wrote:
> On Tue, Jun 22, 2010, Jiri Slaby wrote:
>> I have a problem with receiving files with obexd. After it receives
>> header (file name etc.) it hangs up the connection with
>> obex_handle_input: poll event HUP ERR
> 
> libopenobex seems to be indicating REQDONE, so it doesn't look like
> anything is necessarily wrong with obexd here. However, you'd need to
> look at the HCI level trafic (output of "hcidump -XV") to determine
> what's really going on (e.g. is it obexd or the client that's
> disconnecting).

Attached:
# hcidump -XV
HCI sniffer - Bluetooth packet analyzer ver 1.42
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
> HCI Event: Connect Request (0x04) plen 10
    bdaddr 00:24:7D:65:55:C5 class 0x5a020c type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:24:7D:65:55:C5 role 0x00
    Role: Master
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
    status 0x00 bdaddr 00:24:7D:65:55:C5 role 0x00
    Role: Master
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 42 bdaddr 00:24:7D:65:55:C5 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 42
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
    bdaddr 00:24:7D:65:55:C5 mode 0
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 42 slots 5
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 42
    Features: 0xbf 0xee 0x0f 0xce 0x98 0x39 0x00 0x00
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0040
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 0
      Connection pending - No futher information available
< ACL data: handle 42 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x0003
        Flow control mode
        Retransmission mode
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x0080
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 5120
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      MTU 5120
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      MTU 672
> ACL data: handle 42 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 1]
        SDP SS Req: tid 0x1 len 0x8
          pat uuid-16 0x1105 (OBEXObjPush)
          max 65535
          cont 00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:24:7D:65:55:C5 mode 2 clkoffset 0x0000
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 1]
        SDP SS Rsp: tid 0x1 len 0x9
          count 1
          handle 0x10000
          cont 00
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 21
    L2CAP(d): cid 0x0040 len 17 [psm 1]
        SDP SA Req: tid 0x2 len 0xc
          handle 0x10000
          max 1024
          aid(s) 0x0004 (ProtocolDescList)
          cont 00
< ACL data: handle 42 flags 0x02 dlen 36
    L2CAP(d): cid 0x0040 len 32 [psm 1]
        SDP SA Rsp: tid 0x2 len 0x1b
          count 24
          aid 0x0004 (ProtocolDescList)
             < < uuid-16 0x0100 (L2CAP) > <
             uuid-16 0x0003 (RFCOMM) uint 0x9 > <
             uuid-16 0x0008 (OBEX) > >
          cont 00
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 3 scid 0x0041
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
      Connection successful
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:24:7D:65:55:C5 name 'Nokia 5800 gep'
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 32772
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
      MTU 32772
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 1013
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
      MTU 1013
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 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 0x0041 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
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0041 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 1008 max_retrans 0 credits 3
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0041 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 1008 max_retrans 0 credits 7
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 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 0x0041 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 0x0041 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
    handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0041 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 0x0041 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 0x0041 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
< ACL data: handle 42 flags 0x02 dlen 9
    L2CAP(d): cid 0x0041 len 5 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 18 pf 1 ilen 0 fcs 0x8 credits 33
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(d): cid 0x0041 len 12 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 18 pf 1 ilen 7 fcs 0xd2 credits 4
        OBEX: Connect cmd(f): len 7 version 1.0 flags 0 mtu 65535
< ACL data: handle 42 flags 0x02 dlen 15
    L2CAP(d): cid 0x0041 len 11 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 18 pf 0 ilen 7 fcs 0x14
        OBEX: Connect rsp(f): status 200 len 7 version 1.0 flags 0 mtu 32767
        Status 200 = Success
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 89
    L2CAP(d): cid 0x0041 len 85 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 18 pf 1 ilen 80 fcs 0xd2 credits 1
        OBEX: Put cmd(c): len 80
        Name (0x01) = Unicode length 36
        0000: 00 33 00 32 00 33 00 6d  00 6d 00 3d 00 32 00 30
.3.2.3.m.m.=.2.0
        0010: 00 20 00 31 00 30 00 6b  00 67 00 2e 00 74 00 78  .
.1.0.k.g...t.x
        0020: 00 74 00 00                                       .t..
        Length (0xc3) = 28
        Type (0x42) = Sequence length 11
        0000: 74 65 78 74 2f 70 6c 61  69 6e 00                 text/plain.
        Time (0x44) = Sequence length 16
        0000: 32 30 31 30 30 36 32 32  54 30 35 33 38 33 30 5a
20100622T053830Z
< ACL data: handle 42 flags 0x02 dlen 11
    L2CAP(d): cid 0x0041 len 7 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 18 pf 0 ilen 3 fcs 0x14
        OBEX: Put rsp(f): status 403 len 3
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 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 0x0041 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
    handle 42 packets 1
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 len 4 [psm 3]
      RFCOMM(s): DISC: cr 0 dlci 0 pf 1 ilen 0 fcs 0x9c
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0041 len 4 [psm 3]
      RFCOMM(s): UA: cr 0 dlci 0 pf 1 ilen 0 fcs 0xb6
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0041 scid 0x0041
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0041
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: obexd: obex_handle_input: poll event HUP ERR
  2010-06-22  7:23 Jiri Slaby
@ 2010-06-22  7:38 ` Johan Hedberg
  2010-06-22  7:41   ` Jiri Slaby
  0 siblings, 1 reply; 14+ messages in thread
From: Johan Hedberg @ 2010-06-22  7:38 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-bluetooth

Hi,

On Tue, Jun 22, 2010, Jiri Slaby wrote:
> I have a problem with receiving files with obexd. After it receives
> header (file name etc.) it hangs up the connection with
> obex_handle_input: poll event HUP ERR

libopenobex seems to be indicating REQDONE, so it doesn't look like
anything is necessarily wrong with obexd here. However, you'd need to
look at the HCI level trafic (output of "hcidump -XV") to determine
what's really going on (e.g. is it obexd or the client that's
disconnecting).

Johan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* obexd: obex_handle_input: poll event HUP ERR
@ 2010-06-22  7:23 Jiri Slaby
  2010-06-22  7:38 ` Johan Hedberg
  0 siblings, 1 reply; 14+ messages in thread
From: Jiri Slaby @ 2010-06-22  7:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Marcel Holtmann

Hi,

I have a problem with receiving files with obexd. After it receives
header (file name etc.) it hangs up the connection with
obex_handle_input: poll event HUP ERR

With obex-data-server, everything works as expected.

$ rpm -q obexd libopenobex1 bluez kernel-desktop|sort
bluez-4.64-2.6.x86_64                   == should I try 4.66? ==
kernel-desktop-2.6.34-9.3.x86_64
libopenobex1-1.5-1.8.x86_64
obexd-0.27-6.2.x86_64

$ uname -a
Linux anemoi 2.6.34-9-desktop #1 SMP PREEMPT 2010-06-03 18:33:51 +0200
x86_64 x86_64 x86_64 GNU/Linux

$ strace -fo strace-obexd /usr/lib64/obex/obexd --nodaemon --opp --ftp
--root=Public --root-setup=/usr/lib64/obex/obexd-setup.sh -d
obexd[15862]: Enabling debug information
obexd[15862]: manager_init:
obexd[15862]: Loading builtin plugins
obexd[15862]: driver 0x61d800 transport bluetooth registered
obexd[15862]: Plugin bluetooth loaded
obexd[15862]: driver 0x61d840 mimetype x-obex/folder-listing registered
obexd[15862]: driver 0x61d8a0 mimetype x-obex/capability registered
obexd[15862]: driver 0x61d960 mimetype x-obex/folder-listing registered
obexd[15862]: driver 0x61d900 mimetype (null) registered
obexd[15862]: Plugin filesystem loaded
obexd[15862]: driver 0x61d9e0 service Object Push server registered
obexd[15862]: Plugin opp loaded
obexd[15862]: driver 0x61da80 service File Transfer server registered
obexd[15862]: driver 0x61db00 service Nokia OBEX PC Suite Services
registered
obexd[15862]: Plugin ftp loaded
obexd[15862]: driver 0x61dc20 mimetype x-bt/phonebook registered
obexd[15862]: driver 0x61dc80 mimetype x-bt/vcard-listing registered
obexd[15862]: driver 0x61dce0 mimetype x-bt/vcard registered
obexd[15862]: driver 0x61dba0 service Phonebook Access server registered
obexd[15862]: Plugin pbap loaded
obexd[15862]: driver 0x61dde0 mimetype (null) registered
obexd[15862]: driver 0x61dd60 service OBEX server for SyncML, using
SyncEvolution registered
obexd[15862]: Plugin syncevolution loaded
obexd[15862]: Loading plugins /usr/lib64/obex/plugins
obexd[15862]: bluetooth: listening on channel 9
obexd[15862]: bluetooth: listening on channel 10
obexd[15862]: bluetooth: FindAdapter(any)
obexd[15862]: bluetooth: Registered: Object Push server, handle: 0x10008
obexd[15862]: bluetooth: Registered: File Transfer server, handle: 0x10009
obexd[15862]: bluetooth: New connection from: 00:24:7D:65:55:C5, channel 9
obexd[15862]: REQHINT(0x1), CONNECT(0x0), (null)(0x0)
obexd[15862]: REQ(0x2), CONNECT(0x0), (null)(0x0)
obexd[15862]: Version: 0x10. Flags: 0x00  OBEX packet length: 65535
obexd[15862]: Resizing stream chunks to 65335
obexd[15862]: Selected driver: Object Push server
obexd[15862]: REQDONE(0x3), CONNECT(0x0), (null)(0x0)
obexd[15862]: REQHINT(0x1), PUT(0x2), (null)(0x0)
obexd[15862]: REQCHECK(0xb), PUT(0x2), (null)(0x0)
obexd[15862]: OBEX_HDR_NAME: 323mm=20 10kg.txt
obexd[15862]: OBEX_HDR_LENGTH: 28
obexd[15862]: OBEX_HDR_TYPE: text/plain
obexd[15862]: REQDONE(0x3), PUT(0x2), (null)(0x0)
obexd[15862]: obex_handle_input: poll event HUP ERR
^Cobexd[15862]: Terminating due to signal 2
obexd[15862]: Cleanup plugins
obexd[15862]: driver 0x61d800 transport bluetooth unregistered
obexd[15862]: driver 0x61d840 mimetype x-obex/folder-listing unregistered
obexd[15862]: driver 0x61d8a0 mimetype x-obex/capability unregistered
obexd[15862]: driver 0x61d900 mimetype (null) unregistered
obexd[15862]: driver 0x61d9e0 service Object Push server unregistered
obexd[15862]: driver 0x61da80 service File Transfer server unregistered
obexd[15862]: driver 0x61db00 service Nokia OBEX PC Suite Services
unregistered
obexd[15862]: driver 0x61dba0 service Phonebook Access server unregistered
obexd[15862]: driver 0x61dc20 mimetype x-bt/phonebook unregistered
obexd[15862]: driver 0x61dc80 mimetype x-bt/vcard-listing unregistered
obexd[15862]: driver 0x61dce0 mimetype x-bt/vcard unregistered
obexd[15862]: driver 0x61dd60 service OBEX server for SyncML, using
SyncEvolution unregistered
obexd[15862]: driver 0x61dde0 mimetype (null) unregistered
obexd[15862]: manager_cleanup:

strace of the process:
http://www.fi.muni.cz/~xslaby/sklad/obexd-strace

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-09-22  8:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-15  7:43 obexd: obex_handle_input: poll event HUP ERR Alex Mach
     [not found] <E1R47Z5-0000QH-00.alexvm12e-mail-ru@f167.mail.ru>
2011-09-16  8:07 ` Luiz Augusto von Dentz
2011-09-21 12:13   ` Alex Mach
2011-09-21 12:33     ` Luiz Augusto von Dentz
2011-09-22  7:40       ` alexvm12e
2011-09-22  8:07         ` Luiz Augusto von Dentz
  -- strict thread matches above, loose matches on Subject: below --
2010-06-22  7:23 Jiri Slaby
2010-06-22  7:38 ` Johan Hedberg
2010-06-22  7:41   ` Jiri Slaby
2010-06-22  7:58     ` Johan Hedberg
2010-06-22  8:04       ` Jiri Slaby
2010-06-22  8:13         ` Johan Hedberg
2010-06-22 16:16           ` Jiri Slaby
2010-06-22 16:34             ` Bastien Nocera

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.