Why OPUSH always block?

Tiger.Yin
2007-06-26
2013-05-01
  • Tiger.Yin
    Tiger.Yin
    2007-06-26

    Hi, i got transport issue on bluetooth:
    I use BlueZ stack(2.25) + openobex(1.3), when i used obex_test running as a server, i can transfer files from my mobile to obex_test, but sometimes the transfering process would block at some point. The file size i transfered larger than 2MB and small than 7MB.
    I thought maybe it's a problem on MTU setting, so i modified MTU from 1024 to 640(obex_const.h), then recompile and test, the issue disappeared but transfering speed got very slow. Who can tell me why? Thanks!

    some trace information:

    OBEX_HandleInput():
    obex_transport_handle_input():
    obex_transport_handle_input(): Data available on client socket
    obex_data_indication():
    obex_transport_read(): Request to read max 1436 bytes
    obex_data_indication(): Got 665 bytes msg len=3325
    obex_data_indication(): Need more data, size=4096, len=3325!
    OBEX_HandleInput():
    obex_transport_handle_input():
    obex_transport_handle_input(): Data available on client socket
    obex_data_indication():
    obex_transport_read(): Request to read max 771 bytes
    obex_data_indication(): Got 665 bytes msg len=3990
    obex_data_indication(): Need more data, size=4096, len=3990!
    OBEX_HandleInput():
    obex_transport_handle_input():

    HOLDING NOW!!!!!!!
    UNTIL CANCEL TRANSFERING FROM PEER, OUTPUT:

    obex_transport_handle_input(): Data available on client socket
    obex_data_indication():
    obex_transport_read(): Request to read max 106 bytes
    obex_data_indication(): Got 106 bytes msg len=4096
    obex_server():
    obex_server(): STATE_REC
    obex_object_receive():
    obex_object_receive(): Header: 48
    obex_object_receive_body(): This is a body-header. Len=4090
    obex_object_receive_body(): Normal body fragment...
    obex_object_receive(): Pulling 4093 bytes
    obex_object_send():
    obex_object_send(): 4
    obex_object_send(): Sending package with opcode 144
    obex_data_request(): len = 3 bytes
    obex_transport_write():
    do_write(): sending 3 bytes
    obex_object_send(): Send error
    OBEX_TransportDisconnect():
    btobex_disconnect_request():
    obex_delete_socket():
    delect fd return 0
    Link broken!
    obex_object_delete():
    free_headerq():
    free_headerq():
    free_headerq():
    Error while doing OBEX_HandleInput()
    btobex_disconnect_request():
    obex_delete_socket():
    delect fd return -1
    btobex_disconnect_server():
    obex_delete_socket():
    delete serverfd return 0
    OBEX_FreeInterfaces():