[BangPypers] reqiured help for final year project - urgent

Prajakta Chaudhari pc_3110 at yahoo.co.in
Wed Apr 23 08:56:52 CEST 2008


We were suggested your name by a friend of ours in Thadomal Sahani Engineering College. We are students of K. J. Somaiya College of Engineering. We are doing our final year project in Python and need some help.
Our project is : we wanted to transfer all types of files(.txt, .jpg, .mp3, .mpeg and so on) automatically from the phone to our computer using Bluetooth. Whenever our phone comes in the range of the computer Bluetooth dongle, it must update any file, which has been recently updated on the phone, onto the computer. Until now, we have just been able to transfer .txt files over Bluetooth. We are facing problems in transferring other files. 

Our codes are:

Phone code:

import sys, socket
host = “11:11:11:11:11:11”
port = 10
file = “E:\\Data\\2.txt”
s = socket.socket(socket.AF_BT, socket.SOCK_STREAM)
s.connect((host, port))
f = open(file, “r”)
data = f.read()

Here, for transferring other types of files, we tried using opening the files with read binary; “rb”, format. But that approach has not worked.

Computer code:

from Bluetooth import *
port =10
backlog = 1
file = “C:\Documents and Settings\sanjay\Desktop\Transfer\File.txt”
host = “11:11:11:11:11:11”
soc = BluetoothSocket(RFCOMM)
soc.bind((host, port))
csoc, cinfo  = soc.accept()

Kindly help us out with this problem of ours. Looking forward to your reply.

Thanking you,

Yours sincerely,

Prajakta Chaudhari
Priya Mathur
(K. J. Somaiya College Of Engineering – Electronics and Telecommunication Engineering)

      Meet people who discuss and share your passions. Go to http://in.promos.yahoo.com/groups/bestofyahoo/

More information about the BangPypers mailing list