Hi there,

I am trying to transfer a large file (around 150kb) via bluetooth from my pc to my phone (nokia 2630).

I have tested the server and confirmed that it is writing all the data to the stream.

here is the code for the mobile app (Java ME Platform SDK 3.0)

Code:
                                    String fpath = System.getProperty("fileconn.dir.photos");
                                    String url = fpath + LocalFileName;

                                    FileConnection fconn = (FileConnection)Connector.open(url, Connector.READ_WRITE);
                                    if (!fconn.exists()) {
                                        fconn.create();
                                    }
                                    OutputStream ops = fconn.openOutputStream();
                                    while(is.available() > 0)
                                    {
                                        len = is.available();
                                        if (len > 0)
                                        {
                                            bytecount+=len;
                                            buf = new byte[len];
                                            is.read(buf, 0, len);
                                            ops.write(buf);
                                        }
                                    } 
                                    ops.close();
                                    fconn.close();
it is very unpredictable, every so often it'll get all the data and work perfectly, then the next time it'll only transfer, say 8-12kb.

Im confused, please advise?