.NET Components for Mobility

OBEX Push Server returns forbidden

Last post 11-25-2008 9:47 AM by alanjmcf. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 11-20-2008 1:43 PM

    OBEX Push Server returns forbidden

    Hello,

    I am working on programmatically transferring a file from a desktop PC (Vista) to a Windows Mobile 6.1 phone (Epix) via the PBEX libraries.

    For some reason, the code on the phone returns 'forbidden' to the client. However, if I do not run the server code and re-enable ibeam on the phone the transfers complete.  I've tried library versions v2.2 and v2.3.  I also get the same results trying to push from a XP system to the phone (forbiddden with code, accepted with indigenous ibeam server is used). 

    I was wondering if anyone has any insights as to what I may be missing. 

    Thank you.

    Filed under:
  • 11-21-2008 9:27 AM In reply to

    Re: OBEX Push Server returns forbidden

    PBEX?  ObexListener, or Brecham.Obex?

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
  • 11-21-2008 9:56 AM In reply to

    Re: OBEX Push Server returns forbidden

    Alan,

    Thank you for the reply.  Sorry about the typo.  It is ObexListener.  Below are the code pieces from the Winforms App:

    public Form1()

    {

    InitializeComponent();

    InTheHand.Net.Bluetooth.BluetoothRadio.PrimaryRadio.Mode = InTheHand.Net.Bluetooth.RadioMode.Discoverable;

    listener = new ObexListener(ObexTransport.Bluetooth);

    }

    ...

    static void Main()

    {

    Application.Run(new Form1());

    }

    private void Form1_Load(object sender, EventArgs e)

    {

    listener.Start();

    System.Threading.
    Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(DealWithRequest));

    t.Start();

    }

    public void DealWithRequest()

    {

    while (listener.IsListening)

    {

    try

    {

    ObexListenerContext olc = listener.GetContext(); [Code doesn't return from here given, I assume, the 'forbidden' requests it receives and I assume stays listening awaiting a valid request to return.]

    ObexListenerRequest olr = olc.Request;

    string filename = Uri.UnescapeDataString(olr.RawUrl.TrimStart(new char[ { '/' }));

    olr.WriteFile(filename);

     ...

     

    Thanks in advance, Patrick

    Filed under:
  • 11-24-2008 5:22 PM In reply to

    Re: OBEX Push Server returns forbidden

    Hmm curious.  I've had a look through the ObexListener code files and can't see it sending a Forbidden response.  I wonder if the built-in server is still running, at least partly and picking up, but then discarding, the incoming connection.

    Can you run the SdpBrowser app (either on one of the PCs on one the phone and do a "all services over l2cap" lookup for the phone.  Do it the built-in server enabled, disabled without your server running, and with your server running.  Check that the ObexOjectPush service disappears in the second case.

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
  • 11-24-2008 6:34 PM In reply to

    Re: OBEX Push Server returns forbidden

    Alan, Ironically I tried this yesterday and tried it just now to re-confirmed that : Yes indeed, the built-in server is still running even though disable through IBeam. ObexObjectPush remains listed even though disabled and my server not running. Given this I am pursuing another route unless you have any ideas regarding abilities to truly disable the built-in server. Thank you very much for your help! Take care, patrick
  • 11-25-2008 9:47 AM In reply to

    Re: OBEX Push Server returns forbidden

    What is IBeam?  Some Samsung app?  Have you seen the discussion of disabling the built-in server in the user's guide doc?  Or do Samsung have their own OBEX server service?

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
Page 1 of 1 (6 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.