×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    5

    Unhappy Problem in file exchange over Bluetooth in OBEX frame work

    Hi,

    i am using J2ME + Bluetooth, in OBEX framework to exchange files.
    File size less than 1MB only transfering now, file size more than 1MB is not transfering.

    Any solution for this?

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Yes, tell us your mobile phone model (series, feature pack) and whether you use the Nokia javax.obex packages (do not!) or RFCOMM and custom OBEX implementation (perhaps) or even do custom OBEX/RFCOMM on top of L2CAP (well done). Furthermore, in RFCOMM which write()/read() methods do you use?

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    5

    Re: Problem in file exchange over Bluetooth in OBEX frame work

    Mobile phones - Nokia N91 and Sony Ericsson w300i
    OBEX - avetanaObex.jar
    Using - outputStream - to write.

  4. #4
    Registered User
    Join Date
    Feb 2008
    Posts
    2

    Re: Problem in file exchange over Bluetooth in OBEX frame work

    hi,
    i am also developing an application for file transfer in j2me using obex connection.Client is able to connect with sever but my sever is not able to send file to client.if anybody have code please send me.i require urgently.
    waiting for positive reply.

  5. #5
    Registered User
    Join Date
    Jan 2008
    Posts
    37

    Re: Problem in file exchange over Bluetooth in OBEX frame work

    Hello....

    You cannot transfer the file which is greater than the RAM,
    if it is like that than you need to send the file in pieces.

    For this purpose the SyncML protocol has developed by Open Mobiile Alliance.



    Regards,
    Huzefa.

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    A correct (and good) OBEX implementation writes all the bytes directly to flash (internal or memory card). 2048 MBytes should be no problem for OBEX. Only the current packet size (+ other Java classes) end up in the heap. I have my own OBEX stack and I can send very large files.

    Huzefa, why do you think SyncML is designed for this?

  7. #7
    Registered User
    Join Date
    Oct 2007
    Posts
    4

    Unhappy Re: Problem in file exchange over Bluetooth in OBEX frame work

    Hi There,
    Sorry replying on an old post. Can anyone share an approach or sample code for sending files over bluetooth in J2ME? I want to be able to send a file to any regular bluetooth phone that accepts files. No J2ME app on the other side.
    I have tried some code from what I learnt about JSR82. BT device discovery goes thru well, but service discovery always returns - NO RECORDS FOUND.

    I have this software from Medival software that sends bluetooth files and it works on my devices (From Nokia 3110 to E65). But I wonder how they have done it.

    I am clueless, pls help.
    -Maruthi

  8. #8
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Maruthi, which UUID are you searching for?
    Quote Originally Posted by maruthir View Post
    pls help.
    Nokia offers paid technical support for everyone …

  9. #9
    Registered User
    Join Date
    Oct 2007
    Posts
    4

    Re: Problem in file exchange over Bluetooth in OBEX frame work

    I included all the UUID given below but I get back NO_RECORDS_FOUND

    SDP 0x0001
    RFCOMM 0x0003
    OBEX 0x0008
    HTTP 0x000C
    L2CAP 0x0100
    BNEP 0x000F
    Serial Port 0x1101
    ServiceDiscoveryServerServiceClassID 0x1000
    BrowseGroupDescriptorServiceClassID 0x1001
    PublicBrowseGroup 0x1002
    OBEX Object Push Profile 0x1105
    OBEX File Transfer Profile 0x1106

    Is there anyway of directly getting hold of the OBEX url for file transfer without doing a service search?

  10. #10
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Please, for your own sake, first read the book which I recommended.
    Quote Originally Posted by maruthir View Post
    Is there anyway of directly getting hold of the OBEX url for file transfer without doing a service search?
    Yes, however, that URL contains a RFComm channel number and that number can change at any time. Then your MIDlet does not work anymore.
    Quote Originally Posted by maruthir View Post
    I included all the UUID given below but I get back NO_RECORDS_FOUND.
    I guess, you mean the uuidSet parameter in DiscoveryAgent.searchServices. If you include two UUIDs, both have to be within your service. If you include three, all three have to be in that service record. uuidSet is a AND set and not a OR set. To find (near to all) services of a single device, you have to use one UUID which is common over all UUIDs, like
    Code:
    UUID[] uuidSet = { new UUID(0x0100L) }; // L2CAP
    Anyway, in your case, you simply use 0x1105L.

  11. #11
    Registered User
    Join Date
    Oct 2007
    Posts
    4

    Re: Problem in file exchange over Bluetooth in OBEX frame work

    THat book looks interesting. Will get one.

    Meanwhile Thanks traud, it helped and I got beyond the service search. I was thinking that the UUIDset is an OR set. When it did not work with a few, I added more to it hoping to catch it in that big super set of all UUIDs.

    Now the issue I see is that the Nokia 3110 I am testing does not seem to have obex classes. It said classnotfound for javax.obex.Operation. I included the jsr82 jar that came with WTK in my build and I got past this error. But when I try to use the connection I cant cast it to javax.obex.ClientSession in this code:

    connection = Connector.open(btConnectionURL);
    ClientSession cs = (ClientSession) connection;

    The connection is an instance of a class called ProtocolConnection - a nokia internal implementation class. What am I missing and what is the approach to go ahead?

    Moreover I see that the service search and connection attempt succeeds with some handsets and dont on some handsets. However all handsets allow bluetooth filesending to each other normally.
    Thanks again.
    -Maruthi

  12. #12
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Quote Originally Posted by maruthir View Post
    I included the jsr82 jar that came with WTK
    What is the license of that JAR? Remember that license agreement you accepted? If you do any commercial stuff over there, please consult lawyer if you have understanding problems.
    Quote Originally Posted by maruthir View Post
    What am I missing and what is the approach to go ahead?
    That JAR of Sun is linked directly to other (private) classes in the WTK. You have to implement OBEX yourself or use a third party library designed for distribution with your MIDlet.
    Quote Originally Posted by maruthir View Post
    I see that the service search and connection attempt succeeds with some handsets and dont on some handsets
    How do you know?
    Quote Originally Posted by maruthir View Post
    Thanks again.
    Why not buying that MIDlet you mentioned or pay its authors for creating something like that for you. If they do not like, Nokia offers paid technical support for everyone …

Similar Threads

  1. OBEX - File sending problem.
    By vinsofts in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2008-02-10, 08:18
  2. Help needed with a 3gp file...
    By joedoe_1981 in forum Streaming and Video
    Replies: 0
    Last Post: 2007-07-18, 18:58
  3. OBEX File Push???
    By juzQ in forum Symbian
    Replies: 2
    Last Post: 2006-04-11, 11:22
  4. 6230 global problems with Bluetooth
    By asterixmlm in forum General Development Questions
    Replies: 1
    Last Post: 2004-12-10, 17:12

Posting Permissions

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