bluetooth SPP link to Nokia phone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux