Re: [PATCH BlueZ 2/4] shared/gatt-client: Take fd in bt_gatt_client_new

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

 



Hi Luiz,

> Right, it might make the code more modular but also allow mistakes
> such as creating 2 different instances of bt_att for handling client
> and server separately.
>

Yeah. I think overall libshared is going to be mostly a set of tools
that are flexible enough to be put together in different ways based on
platform needs. You can imagine an embedded peripheral platform that
doesn't even run bluetoothd but instead simply uses btmgmt and
bt_gatt_server. So, I like to think of the shared/ directory as a
flexible library collection of sorts, though it may be just me.


> Actually we should probably notify a error response otherwise it may
> call destroy which gives no hint what happened with the call itself,
> but now I figure you actually have a timeout callback which can be
> used but it is not per operation and I can only register one at time
> so I cannot register one in gatt-client.c otherwise it may get
> overwritten, perhaps we should add a timeout callback to bt_att_send
> or just remove since disconnect callback should be called anyway and
> that can be registered by gatt-client.c.
>

Yeah, actually in my first patches for bt_att, the
bt_att_response_func_t had a "bool timeout" parameter. I later added a
bt_att_register_timeout in the bt_att_register_disconnect fashion,
though Marcel suggested to have a single handler for now. I don't
really know what the right thing to do is here but since there isn't
really a good way to recover from a timeout other than a disconnect,
maybe just invoking disconnect_callback would be sufficient.


> Btw, I resend the patches skipping this one, please check if they are
> no breaking anything for you.
>

Just tried your patches and bt_gatt_client seems to work fine for me.

Cheers,
Arman
--
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