RE: [BLE] org.bluez.Device1.Connect() returns org.bluez.Error.NotAvailable

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

 



Hello Johan,

> -----Original Message-----
> From: Johan Hedberg [mailto:johan.hedberg@xxxxxxxxx]
> Sent: Wednesday, December 12, 2012 6:08 PM
> To: Ting Chou
> Cc: linux-bluetooth@xxxxxxxxxxxxxxx
> Subject: Re: [BLE] org.bluez.Device1.Connect() returns
> org.bluez.Error.NotAvailable
> 
> Hi Ting,
> 
> On Wed, Dec 12, 2012, Ting Chou wrote:
> > > That means that the profiles that are supposed to be supported with
> > > this device are not calling either device_set_auto_connect() or
> > > btd_device_add_attio_callback(). Both of those functions should
> > > cause bluetoothd to start doing passive scanning and try to connect
> > > to the device. Btw, which kernel version are you using. IIRC you'll
> > > need something like 3.5 or newer for LE passive scanning to work.
> > >
> >
> > I tried to let btd_device_add_attio_callback() get called by
> >
> >   Characterisitc.DiscoverCharacteristics()
> 
> I thought you said some internally supported profiles get detected? Why
> then do you need to use the ATT D-Bus interface? FWIW, since
> attrib/client.c implementation doesn't match what's documented and
> since there hasn't been anyone stepping up to update the code to use D-
> Bus properties we'll probably not have the entire Characteristic D-Bus
> interface in the 5.0 release. Instead, there's a plan to have a more
> comprehensive and generic GATT D-Bus API for both peripheral and
> central roles, which will probably land in 5.1 or one of the subsequent
> releases.
> 
> > But still the Device1.Connect() after Device1.Disconnect() does not
> > establish the connection. connect_profiles() returns
> > btd_error_not_available() since
> > !dev->pending:
> 
> It seems you've misunderstood this part. If the functions I mentioned
> are used correctly you will not need to use Device.Connect at all.
> Instead bluetoothd will start doing passive scanning and automatically
> establish a connection to any device doing connectable advertising.
> 

Do you mean once a LE device with internally supported profiles is discovered,
it will be connected automatically? Which means I cannot connect manually, at
the timing I prefer?

Since with my BT 4.0 dongle, Adpater.StartDiscovery discover also LE devices, I
thought I should use Device.Connect to connect to the device.

Thanks,
Ting

--
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