Python Forum

Full Version: Bluetooth problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am a new with bluetooth in Python. I wanted to use the following program that sends a file.
I wanted to send a file from laptop to a cell phone.

from bluetooth import *
from PyOBEX.client import BrowserClient

# bluetooth device address
address = '70:3A:51:7C:E1:17'

# find OBEX port using SDP
svc = find_service(address=address, uuid=OBEX_FILETRANS_CLASS)
channel = svc[0]['port']

# send file
print 'sending file to %s...'%address
client = BrowserClient(address, channel)
client.connect()
client.put('test.txt', 'HelloWorld!')
client.disconnect()
but
find_service(address=address, uuid=OBEX_FILETRANS_CLASS)
is empty , that is [] .
The mobile is connected with my laptop from which I started the program.
Do you have any clue, where is the problem?
Thank you for your reply