Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Openobex & LG 8110

Help
mitm
2007-02-25
2013-05-01
  • mitm
    mitm
    2007-02-25

    I'm trying to use openobex to communicate with my LG 8110 phone
    (connected to my linuxbox with the LG usb cable).
    I'm using Slackware 11.0(kernel 2.6.17.13) and Openobex from CVS.

    This is what i did(as root user)...

    bash-3.1# uname -a
    Linux slacky 2.6.17.13 #1 Sat Sep 9 01:11:49 CDT 2006 i686 pentium4 i386 GNU/Linux
    bash-3.1# cvs -z3 -d:pserver:anonymous@openobex.cvs.sourceforge.net:/cvsroot/openobex co -P openobex
    bash-3.1# cd openobex
    bash-3.1# ./bootstrap
    bash-3.1# CFLAGS="-DOBEX_DEBUG=4 -DOBEX_DUMP=2" ./configure --enable-apps
    bash-3.1# make;make install
    bash-3.1# obex_test -u
    Using USB transport, querying available interfaces
    OBEX_FindInterfaces():
    OBEX_FreeInterfaces():
    Interface 0: LG Electronics LGE U8110 LGE U8110 USB WMC OBEX interface
    Use 'obex_test -u interface_number' to run interactive OBEX test client
    OBEX_FreeInterfaces():

    bash-3.1# obex_test -u 0
    Using USB transport
    OBEX_FindInterfaces():
    OBEX_FreeInterfaces():
    OBEX Interactive test client/server.
    > c
    OBEX_InterfaceConnect():
    usbobex_connect_request():
    usbobex_connect_request(): Can't set configuration -16usbobex_connect_request(): transport mtu=65535
    obex_object_setrsp():
    obex_object_setcmd(): 00
    obex_insert_connectframe():
    obex_object_addheader():
    obex_object_addheader(): Fit one packet!
    obex_object_addheader(): BS  header size 6
    insert_byte_stream_header():
    OBEX_Request():
    obex_client():
    obex_client(): STATE_START
    obex_object_send():
    obex_object_send(): Adding 4 bytes of non-headerdata
    obex_object_send(): 4
    obex_object_send(): Adding non-body header
    obex_object_send(): Sending package with opcode 128
    obex_data_request(): len = 16 bytes
    obex_transport_write():
    obex_transport_write(): Endpoint 5
    OBEX_HandleInput():
    obex_data_indication():
    obex_transport_read(): Request to read max 3 bytes
    obex_transport_read(): Endpoint 133
    obex_data_indication(): Got 0 bytes
    OBEX_TransportDisconnect():
    usbobex_disconnect_request():
    Link broken!
    obex_object_delete():
    free_headerq():
    free_headerq():
    free_headerq():
    Timeout waiting for data. Aborting
    >
    ( it seems the usb_set_configuration call in lib/usbobex.c(337) returned an invalid value -16 )

    The phone agent is still saying "Connecting...", and on the phone side
    i have to press "Cancel" key twice to go back to the main menu,
    then the phone says "Disconnected", "Syncronisation is finished"

    what i'm doing wrong? any help is appreciated..

     
    • Alex Kanavin
      Alex Kanavin
      2007-02-25

      Everything seems alright, but the phone never answers to the connect request. You can try using it under Windows with a usb sniffer to see what is being sent exactly, or try obexftp with various connect options.

       
    • mitm
      mitm
      2007-02-25

      thank you for your reply,
      with obexftp (obexftp-0.22-pre4.tar.bz2 from http://triq.net/obexftp/\)

      bash-3.1# obexftp -u 0 -l -v
      Connecting...OBEX_FindInterfaces():
      OBEX_FreeInterfaces():
      OBEX_InterfaceConnect():
      usbobex_connect_request():
      usbobex_connect_request(): Can't set configuration -16usbobex_connect_request(): transport mtu=65535
      obex_object_setrsp():
      obex_object_setcmd(): 00
      obex_insert_connectframe():
      obex_object_addheader():
      obex_object_addheader(): Fit one packet!
      obex_object_addheader(): BS  header size 16
      insert_byte_stream_header():
      OBEX_Request():
      obex_client():
      obex_client(): STATE_START
      obex_object_send():
      obex_object_send(): Adding 4 bytes of non-headerdata
      obex_object_send(): 4
      obex_object_send(): Adding non-body header
      obex_object_send(): Sending package with opcode 128
      obex_data_request(): len = 26 bytes
      obex_transport_write():
      obex_transport_write(): Endpoint 5
      OBEX_HandleInput():
      obex_data_indication():
      obex_transport_read(): Request to read max 3 bytes
      obex_transport_read(): Endpoint 133
      obex_data_indication(): Got 0 bytes
      obex_object_delete():
      free_headerq():
      free_headerq():
      free_headerq():
      failed: FBS UUID
      Still trying to connect
      Connecting...OBEX_FindInterfaces():
      OBEX_FreeInterfaces():
      OBEX_InterfaceConnect():
      obex_object_setrsp():
      obex_object_setcmd(): 00
      obex_insert_connectframe():
      obex_object_addheader():
      obex_object_addheader(): Fit one packet!
      obex_object_addheader(): BS  header size 16
      insert_byte_stream_header():
      OBEX_Request():
      obex_client():
      obex_client(): STATE_START
      obex_object_send():
      obex_object_send(): Adding 4 bytes of non-headerdata
      obex_object_send(): 4
      obex_object_send(): Adding non-body header
      obex_object_send(): Sending package with opcode 128
      obex_data_request(): len = 26 bytes
      obex_transport_write():
      obex_transport_write(): Endpoint 5
      Segmentation fault
      bash-3.1#

      if i suppress FBS

      bash-3.1# obexftp -u 0 -U none -l -v
      Suppressing FBS.
      Connecting...OBEX_FindInterfaces():
      OBEX_FreeInterfaces():
      OBEX_InterfaceConnect():
      usbobex_connect_request():
      usbobex_connect_request(): Can't set configuration -16usbobex_connect_request(): transport mtu=65535
      obex_object_setrsp():
      obex_object_setcmd(): 00
      obex_insert_connectframe():
      OBEX_Request():
      obex_client():
      obex_client(): STATE_START
      obex_object_send():
      obex_object_send(): Adding 4 bytes of non-headerdata
      obex_object_send(): 4
      obex_object_send(): Sending package with opcode 128
      obex_data_request(): len = 7 bytes
      obex_transport_write():
      obex_transport_write(): Endpoint 5
      OBEX_HandleInput():
      obex_data_indication():
      obex_transport_read(): Request to read max 3 bytes
      obex_transport_read(): Endpoint 133
      obex_data_indication(): Got 0 bytes
      obex_object_delete():
      free_headerq():
      free_headerq():
      free_headerq():
      failed: FBS UUID
      Still trying to connect
      Connecting...OBEX_FindInterfaces():
      OBEX_FreeInterfaces():
      OBEX_InterfaceConnect():
      obex_object_setrsp():
      obex_object_setcmd(): 00
      obex_insert_connectframe():
      OBEX_Request():
      obex_client():
      obex_client(): STATE_START
      obex_object_send():
      obex_object_send(): Adding 4 bytes of non-headerdata
      obex_object_send(): 4
      obex_object_send(): Sending package with opcode 128
      obex_data_request(): len = 7 bytes
      obex_transport_write():
      obex_transport_write(): Endpoint 5
      Segmentation fault
      bash-3.1#

      if i connect to tty directly, using custom transport

      bash-3.1# obexftp -t /dev/ttyACM0 -U none -l -v
      Suppressing FBS.
      Connecting...OBEX_TransportConnect():
      obex_transport_connect_request(): Custom connect
      obex_transport_connect_request(): ret=1
      obex_object_setrsp():
      obex_object_setcmd(): 00
      obex_insert_connectframe():
      OBEX_Request():
      obex_client():
      obex_client(): STATE_START
      obex_object_send():
      obex_object_send(): Adding 4 bytes of non-headerdata
      obex_object_send(): 4
      obex_object_send(): Sending package with opcode 128
      obex_data_request(): len = 7 bytes
      obex_transport_write():
      obex_transport_write(): Custom write
      OBEX_HandleInput():
      OBEX_CustomDataFeed():
      obex_data_indication():
      obex_transport_read(): Request to read max 3 bytes
      obex_data_indication(): Got 3 bytes
      obex_transport_read(): Request to read max 4 bytes
      obex_data_indication(): Got 4 bytes msg len=7
      Rx: A0 00 07 10 00 04 00
      obex_client():
      obex_client(): STATE_REC
      obex_client(): We expect a connect-rsp
      obex_parse_connect_header():
      obex_parse_connect_header(): Len: 7
      obex_parse_connect_header(): version=10
      obex_parse_connect_header(): requested MTU=400, used MTU=400
      obex_object_receive():
      obex_object_receive(): Command has 4 bytes non-headerdata
      obex_client(): Done! Rsp=20!
      obex_object_getnextheader():
      obex_object_delete():
      free_headerq():
      free_headerq():
      free_headerq():
      done
      Receiving "(null)"... obex_object_setrsp():
      obex_object_setcmd(): 03
      obex_object_addheader():
      obex_object_addheader(): Fit one packet!
      obex_object_addheader(): BS  header size 22
      insert_byte_stream_header():
      OBEX_Request():
      obex_client():
      obex_client(): STATE_START
      obex_object_send():
      obex_object_send(): 4
      obex_object_send(): Adding non-body header
      obex_object_send(): Sending package with opcode 131
      obex_data_request(): len = 28 bytes
      obex_transport_write():
      obex_transport_write(): Custom write
      OBEX_HandleInput():
      failed: (null)
      Disconnecting...obex_object_setrsp():
      obex_object_setcmd(): 01
      failed: disconnect
      obex_transport_disconnect_request(): Custom disconnect
      obex_transport_disconnect_server(): Custom disconnect
      OBEX_FreeInterfaces():
      bash-3.1# obexftp -t /dev/ttyACM0  -l -v
      Connecting...OBEX_TransportConnect():
      obex_transport_connect_request(): Custom connect
      obex_transport_connect_request(): ret=1
      obex_object_setrsp():
      obex_object_setcmd(): 00
      obex_insert_connectframe():
      obex_object_addheader():
      obex_object_addheader(): Fit one packet!
      obex_object_addheader(): BS  header size 16
      insert_byte_stream_header():
      OBEX_Request():
      obex_client():
      obex_client(): STATE_START
      obex_object_send():
      obex_object_send(): Adding 4 bytes of non-headerdata
      obex_object_send(): 4
      obex_object_send(): Adding non-body header
      obex_object_send(): Sending package with opcode 128
      obex_data_request(): len = 26 bytes
      obex_transport_write():
      obex_transport_write(): Custom write
      OBEX_HandleInput():
      OBEX_CustomDataFeed():
      obex_data_indication():
      obex_transport_read(): Request to read max 3 bytes
      obex_data_indication(): Got 3 bytes
      obex_transport_read(): Request to read max 4 bytes
      obex_data_indication(): Got 4 bytes msg len=7
      Rx: A0 00 07 10 00 04 00
      obex_client():
      obex_client(): STATE_REC
      obex_client(): We expect a connect-rsp
      obex_parse_connect_header():
      obex_parse_connect_header(): Len: 7
      obex_parse_connect_header(): version=10
      obex_parse_connect_header(): requested MTU=400, used MTU=400
      obex_object_receive():
      obex_object_receive(): Command has 4 bytes non-headerdata
      obex_client(): Done! Rsp=20!
      obex_object_getnextheader():
      obex_object_delete():
      free_headerq():
      free_headerq():
      free_headerq():
      done
      Receiving "(null)"... obex_object_setrsp():
      obex_object_setcmd(): 03
      obex_object_addheader():
      obex_object_addheader(): Fit one packet!
      obex_object_addheader(): BS  header size 22
      insert_byte_stream_header():
      OBEX_Request():
      obex_client():
      obex_client(): STATE_START
      obex_object_send():
      obex_object_send(): 4
      obex_object_send(): Adding non-body header
      obex_object_send(): Sending package with opcode 131
      obex_data_request(): len = 28 bytes
      obex_transport_write():
      obex_transport_write(): Custom write
      OBEX_HandleInput():
      failed: (null)
      Disconnecting...obex_object_setrsp():
      obex_object_setcmd(): 01
      failed: disconnect
      obex_transport_disconnect_request(): Custom disconnect
      obex_transport_disconnect_server(): Custom disconnect
      OBEX_FreeInterfaces():
      bash-3.1#

      suppressing FBS...

      bash-3.1# obexftp -t /dev/ttyACM0 -U none -l -v
      Suppressing FBS.
      Connecting...OBEX_TransportConnect():
      obex_transport_connect_request(): Custom connect
      obex_transport_connect_request(): ret=1
      obex_object_setrsp():
      obex_object_setcmd(): 00
      obex_insert_connectframe():
      OBEX_Request():
      obex_client():
      obex_client(): STATE_START
      obex_object_send():
      obex_object_send(): Adding 4 bytes of non-headerdata
      obex_object_send(): 4
      obex_object_send(): Sending package with opcode 128
      obex_data_request(): len = 7 bytes
      obex_transport_write():
      obex_transport_write(): Custom write
      OBEX_HandleInput():
      OBEX_CustomDataFeed():
      obex_data_indication():
      obex_transport_read(): Request to read max 3 bytes
      obex_data_indication(): Got 3 bytes
      obex_transport_read(): Request to read max 4 bytes
      obex_data_indication(): Got 4 bytes msg len=7
      Rx: A0 00 07 10 00 04 00
      obex_client():
      obex_client(): STATE_REC
      obex_client(): We expect a connect-rsp
      obex_parse_connect_header():
      obex_parse_connect_header(): Len: 7
      obex_parse_connect_header(): version=10
      obex_parse_connect_header(): requested MTU=400, used MTU=400
      obex_object_receive():
      obex_object_receive(): Command has 4 bytes non-headerdata
      obex_client(): Done! Rsp=20!
      obex_object_getnextheader():
      obex_object_delete():
      free_headerq():
      free_headerq():
      free_headerq():
      done
      Receiving "(null)"... obex_object_setrsp():
      obex_object_setcmd(): 03
      obex_object_addheader():
      obex_object_addheader(): Fit one packet!
      obex_object_addheader(): BS  header size 22
      insert_byte_stream_header():
      OBEX_Request():
      obex_client():
      obex_client(): STATE_START
      obex_object_send():
      obex_object_send(): 4
      obex_object_send(): Adding non-body header
      obex_object_send(): Sending package with opcode 131
      obex_data_request(): len = 28 bytes
      obex_transport_write():
      obex_transport_write(): Custom write
      OBEX_HandleInput():
      failed: (null)
      Disconnecting...obex_object_setrsp():
      obex_object_setcmd(): 01
      failed: disconnect
      obex_transport_disconnect_request(): Custom disconnect
      obex_transport_disconnect_server(): Custom disconnect
      OBEX_FreeInterfaces():
      bash-3.1#

      i'll try with the usb sniffer under windows,
      thanks for the help,
      Riccardo