I have successfully established a connection already between two mobile phones. This way I am able to send text.
For the server, the code looks like that:
To read text, I simply use fd.readline() and to send text print >> fd, msgCode:server = socket.socket(socket.AF_BT, socket.SOCK_STREAM) channel = socket.bt_rfcomm_get_available_server_channel(server) server.bind(("", channel)) server.listen(1) socket.bt_advertise_service(unicode(SERVICE_NAME), server, True, socket.RFCOMM) socket.set_security(server, socket.AUTH | socket.AUTHOR) conn, client_addr = server.accept() fd = conn.makefile("rw", 0)
What I'd like to do is send an image.
I don't want to use bt_obex_send_file because it requires the user to accept the file first although he already accepted the connection request earlier.
1- Is there some way to send the image via the already set up connection?
2- If not, is it possible to use bt_obex_send_file silently, without bothering the user? If yes, how do I do that and where are the received files stored?
Note: The mobile phones are not necessarily paired devices.
Any thoughts?

Reply With Quote


