Hello, I want to transfer images from my phone to my PC using bluetooth. But, I don't work with OBEX push protocol because I establish a master-slave connection using RFCOMM.

When I try to send 600KB image and read it per byte then directly send it to my PC via RFCOMM (from PyS60 to PyBluez) it takes almost 30 minutes until it done. So, I think I could simply change the code with more bytes to read and send so it must be like this:

phone side:
Code:
file = open('E:/Images/Image001.jpg','rb')
while True:
    data = file.read(1024)
    if data == '':
         break
    sock.send(data)
file.close()
PC side:
Code:
file = open('Images/testImage001.jpg','wb')

mod = filelen % 1024

if mod == 0:
    len = filelen/1024
else:
    len = filelen/1024 + 1

for i in range(len):
    data = csock.recv(1024)
    file.write(data)

file.close()
Although it works faster, but there's still a problem. My phone's done sending the image file, but my PC cannot receive all of image being sent. There are missing bytes during the transfer process.

I need your help soon. Thank's