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

Close

file transfer using open obex..

Help
2009-08-26
2013-05-01
  • Ansar Iqbal
    Ansar Iqbal
    2009-08-26

    I want write a server & client application to transfer the simple file from Windows machine to linux mobile and vice versa... using obex library.Anyone please tell me how to start the coding.It will be great full if any one send me the sample server and client code.......its urgent...please... :)

     
    • Ansar Iqbal
      Ansar Iqbal
      2009-08-27

      Hey Zany,

      Thanks for the useful link...I downloaded that client code and trying to compile by using the command         gcc -Wall $(pkg-config --libs obexftp) -o Client Client.c

      But its giving the following error :
      Package obexftp was not found in the pkg-config search path.
      Perhaps you should add the directory containing `obexftp.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'obexftp' found
      Client.c:12:28: error: openobex/obex.h: No such file or directory
      Client.c:13:36: error: obexftp/client.h: No such file or directory
      Client.c: In function ‘main’:
      Client.c:20: error: ‘obexftp_client_t’ undeclared (first use in this function)
      Client.c:20: error: (Each undeclared identifier is reported only once
      Client.c:20: error: for each function it appears in.)
      Client.c:20: error: ‘cli’ undeclared (first use in this function)
      Client.c:35: error: ‘OBEX_TRANS_USB’ undeclared (first use in this function)

      Please help me out this....

       
    • Ansar Iqbal
      Ansar Iqbal
      2009-08-27

      I installed obexftp also....

       
    • Ansar Iqbal
      Ansar Iqbal
      2009-08-27

      hey its working fine...:)

      Actually I compiled both openobex and obexftp source code to make it work..

       
    • Ansar Iqbal
      Ansar Iqbal
      2009-08-27

      Can any one please tell me what's the second and third parameter to pass for the c_example.c .
      Please tell me sample command to run.

      .....

       
      • You can hard-code the parameters or get them from anywhere. The program example just reads a bt address, the channel and a file to put from the command arguments.
        The channel here depends on the obex protocol in question. It's most likely the OPUSH or OBESFTP channel from the SDP listing.