×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    2

    OBEX file transfer

    hi All,

    I want to connect two mobile phones via Bluetooth and get the file list of the remote phone (as the server) on the client device using JSR 82 Bluetooth and OBEX File Transfer Profile.

    I created a midlet for this (for the client devices) but it doesn't work properly.

    I mean when I connect my C510 Sony Ericsson phone (as the client) to a Nokia 6230 (as the server), it's working fine. I can see the folders and files and I can go into the subdirectorys, etc... so no problem in this case. I can display the whole folder structure of the server on the client device.

    However, if I use this midlet between 2 Sony Ericsson phones (C510 and W705), I get the folder list only for the first time (for the root directory). But when I want to go into a subfolder, I can't... If I call the same method again to get into a subfolder, I can't get the folder list from the server.


    I use this code for the connection:

    Code:
    String btURL = "btgoep://00XXXXXXXXXX:10;authenticate=false;encrypt=false;master=false";
    conn = (ClientSession) Connector.open(btURL);
     
    byte[] FBUiid = {(byte) 0xF9, (byte) 0xEC, (byte) 0x7B, (byte) 0xC4, (byte) 0x95, 
                     (byte) 0x3C, (byte) 0x11, (byte) 0xD2, (byte) 0x98, (byte) 0x4E, 
                     (byte) 0x52, (byte) 0x54, (byte) 0x00, (byte) 0xDC, (byte) 0x9E, 
                     (byte) 0x09};
    header = conn.createHeaderSet();
    header.setHeader(HeaderSet.TARGET, FBUiid);
    response = conn.connect(header);
    and I call this method to get the folder list (again and again):

    Code:
    header = conn.createHeaderSet();
    header.setHeader(HeaderSet.NAME, folder);
    result = conn.setPath(header, false, false);
     
    header = conn.createHeaderSet();
    header.setHeader(HeaderSet.TYPE, "x-obex/folder-listing");
    op = conn.get(header);
     
    InputStreamReader is = new InputStreamReader(op.openInputStream());
    KXmlParser parser = new KXmlParser();
    ...
    is.close();
    op.close();
    ... but I can get back anything from the GET method at the second time. It works well for the first time, but not for the second...
    (result.getResponseCode()=160 so it looks like OK)

    Anyone has any idea where the problem could be... I don't understand why it is working with an old Nokia phone and not with a new Sony Ericsson...


    Thanks in advance!

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: OBEX file transfer

    if I use this midlet between 2 Sony Ericsson phones (C510 and W705), I get the folder list only for the first time (for the root directory). But when I want to go into a subfolder, I can't... If I call the same method again to get into a subfolder, I can't get the folder list from the server.
    I don't understand why it is working with an old Nokia phone and not with a new Sony Ericsson...
    Just a standard question: have you check this issue on SonyEricsson's developer discussion forums?

    It could that there has been some change made on their current implementation, in which case they would be the best to provide more information on such change.

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    2

    Re: OBEX file transfer

    Just a standard question: have you check this issue on SonyEricsson's developer discussion forums?
    Yes and I posted this message on their Forum as well.

    I just thought that maybe there is someone here who is an expert of this field or had the same issue in the past.

    thanks anyway!

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    tepger, therefore please, let us continue there …

Similar Threads

  1. File Transfer using J2ME and OBEX
    By binary123 in forum Mobile Java General
    Replies: 3
    Last Post: 2010-09-02, 13:52
  2. [split] mbm build error
    By mando222 in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2009-03-29, 12:32
  3. Tranfering file by bluetooth
    By hassan83 in forum Symbian
    Replies: 5
    Last Post: 2008-04-18, 17:01
  4. Help with file transfer profile - j2se avetana
    By eitand in forum Bluetooth Technology
    Replies: 4
    Last Post: 2007-03-31, 23:15
  5. OBEX File Transfer
    By Axonn in forum Symbian
    Replies: 1
    Last Post: 2005-09-06, 09:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×