public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* bluetooth SPP link to Nokia phone
@ 2009-07-21  9:45 Henry Gomersall
  2009-07-21 10:02 ` Johan Hedberg
  0 siblings, 1 reply; 4+ messages in thread
From: Henry Gomersall @ 2009-07-21  9:45 UTC (permalink / raw)
  To: linux-bluetooth

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-22 11:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21  9:45 bluetooth SPP link to Nokia phone Henry Gomersall
2009-07-21 10:02 ` Johan Hedberg
2009-07-21 11:51   ` Henry Gomersall
2009-07-22 11:14     ` Henry Gomersall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox