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?
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?
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?
Mobile phones - Nokia N91 and Sony Ericsson w300i
OBEX - avetanaObex.jar
Using - outputStream - to write.
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.
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.
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?
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
Maruthi, which UUID are you searching for?Nokia offers paid technical support for everyone …
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?
Please, for your own sake, first read the book which I recommended.Yes, however, that URL contains a RFComm channel number and that number can change at any time. Then your MIDlet does not work anymore.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, likeAnyway, in your case, you simply use 0x1105L.Code:UUID[] uuidSet = { new UUID(0x0100L) }; // L2CAP
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
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.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.How do you know?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 …