.NET Components for Mobility

"DeviceObexListener" sample not working

Last post 07-06-2009 12:34 AM by gagansinghal. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 03-17-2009 8:36 PM

    "DeviceObexListener" sample not working

    Hi,

    I was working with the Obex samples provided with your library. The sample worked great with the "ObexPushVB" and "DesktopObexListener".

    But when I tried "ObexPushVB" and "DeviceObexListener", it did not work.

    The "ObexPushVB" application hung waiting for a response.

    Nothing happened on the "DeviceObexListener" part.sdfs

    Can you please help me with this issue and tell me what I must do to fix this problem.

    Thanks.

    Srinath

  • 03-17-2009 8:47 PM In reply to

    Re: "DeviceObexListener" sample not working

    I swapped the devices on which these 2 applications were running.

    Then I got the response "Bad Request" in the "ObexPushVB" application.

    FYI, both the devices run Windows Mobile 6.

  • 03-17-2009 9:55 PM In reply to

    Re: "DeviceObexListener" sample not working

    I fixed the problem. It is a little strange though.

    All tests that failed were run in debugging mode, ie., through ActiveSync.

    I built the cab file and installed them on the 2 devices and it worked fine..

    Thanks

    -Srinath

  • 04-04-2009 7:43 AM In reply to

    • bazman234
    • Top 500 Contributor
    • Joined on 11-17-2008
    • United Kingdom
    • Posts 5

    Re: "DeviceObexListener" sample not working

    I am having a similar problem from the code taken from the "ObexPushVB" sample project.

    I am using it in a desktop application, rather than for a mobile device. I am also using the library in C#

    However, at the respective line of code:

    ObexWebResponse response = (ObexWebResponse)request.GetResponse();

    The application hangs, the device being sent a file just rejects the attempt also. Any suggestions as to why this is happening?

    My code:

     

    Uri uri = new Uri("obex-push://" + deviceAddr + "/" + file);

    ObexWebRequest request = new ObexWebRequest(uri);

    request.ReadFile(file);

    ObexWebResponse response = (ObexWebResponse)request.GetResponse();

    response.Close();


     

     

  • 04-04-2009 9:59 AM In reply to

    Re: "DeviceObexListener" sample not working

    Hi, I think the problem is in line "request.ReadFile(file);" In "Uri uri = new Uri("obex-push://" + deviceAddr + "/" + file);" you should give the filename.. In "request.ReadFile(file);" you should give the entire path of the file. I hope this helps. Do keep me posted. Thanks. Good luck! Srinath
  • 04-04-2009 10:20 AM In reply to

    • bazman234
    • Top 500 Contributor
    • Joined on 11-17-2008
    • United Kingdom
    • Posts 5

    Re: "DeviceObexListener" sample not working

     Thanks a lot, that solved my problem exactly.

  • 04-04-2009 10:31 AM In reply to

    Re: "DeviceObexListener" sample not working

    That's awesome! -Srinath
  • 07-01-2009 2:12 AM In reply to

    Re: "DeviceObexListener" sample not working

    Hi Srinath

    I installed DeviceObexListner sample on my HTC phone with Microsoft BT stack.

    Then I tried to send a word file from my hp IPAQ and also from Nokia N72.

    But  both of them showed an error message quoting "Unable to Connect". 

    Please help me solve this problem people as I could not move ahead till I get this thing working.

    Thanks and awaiting replies...

    Gagan Singhal

  • 07-05-2009 10:46 PM In reply to

    Re: "DeviceObexListener" sample not working

    Hi Gagan, Are you able to connect the devices otherwise? or is it failing only while running deviceobexlistener? Can you also check if "Receive incoming beams" is checked (In one of the settings screens)? Regards Srinath
  • 07-06-2009 12:34 AM In reply to

    Re: "DeviceObexListener" sample not working

     Hi Srinath

    Only DeviceObexListner is failing to work. It always shows the message quoting"unable to connect" or "connection attempt failed". DesktopObexListner is working correctly. Also I have unchecked the "Receive Incoming Beams" in the beam settings of the phone.

    And regaring connection to devices, ObexPushApplication is working OK on my phone, i.e. m able to connect to the devices in that application...

    Gagan

Page 1 of 1 (10 items)
Copyright © 2001-2010 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.