From: Henry Gomersall <whg21@cam.ac.uk>
To: linux-bluetooth@vger.kernel.org
Subject: bluetooth SPP link to Nokia phone
Date: Tue, 21 Jul 2009 10:45:40 +0100 [thread overview]
Message-ID: <1248169540.7048.52.camel@whg21-laptop> (raw)
I've been attempting to do some hacking on the Bluez stack. The starting
point was to initiate an SPP link to my Nokia 6300 mobile phone. I can
establish the link, but when I attempt to send characters to it (through
several different methods), the phone will announce it is disconnecting.
The python I use is at the bottom of this email.
I have already set up a serial connection using a UART to bluetooth
module (a module based on the LMX9830) in conjunction with a
USB->serial->UART piece of hardware. In this configuration, I can
initiate a connection to the phone and write and receive bytes from it
no problem.
My questions are as follows:
1) Am I missing something important with how I am using the Bluez stack?
2) Is this a known issue or is it a previous known issue? I am still
using the version of Bluez that comes with shipped with Ubuntu 9.04
which is 4.39.
3) Are there any caveats with how devices implement the serial port
profile?
I'm keen to sort this problem out and would appreciate any assistance.
Many thanks,
Henry Gomersall
The code used:
import dbus
bus = dbus.SystemBus();
manager = dbus.Interface(bus.get_object('org.bluez', '/'),
'org.bluez.Manager')
obj = bus.get_object('org.bluez', manager.DefaultAdapter())
adapter = dbus.Interface(obj, 'org.bluez.Adapter')
phone = dbus.Interface(bus.get_object('org.bluez',
adapter.ListDevices()[0]), 'org.bluez.Device')
phone_serial = dbus.Interface(phone, 'org.bluez.Serial')
phone_serial.Connect('spp')
At this stage, I have the device /dev/rfcomm0, but I cannot write data
to it without breaking the link.
next reply other threads:[~2009-07-21 9:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 9:45 Henry Gomersall [this message]
2009-07-21 10:02 ` bluetooth SPP link to Nokia phone Johan Hedberg
2009-07-21 11:51 ` Henry Gomersall
2009-07-22 11:14 ` Henry Gomersall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1248169540.7048.52.camel@whg21-laptop \
--to=whg21@cam.ac.uk \
--cc=heng@cantab.net \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox