All of lore.kernel.org
 help / color / mirror / Atom feed
* Could example-gatt-server and example-advertisement be folded into one?
@ 2016-01-16  1:10 Travis Griggs
  2016-01-17 12:54 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Travis Griggs @ 2016-01-16  1:10 UTC (permalink / raw)
  To: linux-bluetooth

Subject mostly asks it all. I’m not asking whether the bluez distributed examples could be folded into one.

I have been able able to build a working BLE interface to my Linux SBC using python to operate as a peripheral. I worked from these two files. Is there any reason I couldn’t weld the two files together into one? Or do they need to be run as two separate processes with two separate mainloops?

I’m really hoping to get any answer, my last few questions went unanswered (which happens), but I’ve begun to wonder if my emails are getting through.

I’ll try to publish my example somewhere soon, for the benefit of all.

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

* Re: Could example-gatt-server and example-advertisement be folded into one?
  2016-01-16  1:10 Could example-gatt-server and example-advertisement be folded into one? Travis Griggs
@ 2016-01-17 12:54 ` Luiz Augusto von Dentz
  2016-01-18 18:32   ` Travis Griggs
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2016-01-17 12:54 UTC (permalink / raw)
  To: Travis Griggs; +Cc: linux-bluetooth

Hi Travis,

On Sat, Jan 16, 2016 at 3:10 AM, Travis Griggs <travisgriggs@gmail.com> wrote:
> Subject mostly asks it all. I’m not asking whether the bluez distributed examples could be folded into one.
>
> I have been able able to build a working BLE interface to my Linux SBC using python to operate as a peripheral. I worked from these two files. Is there any reason I couldn’t weld the two files together into one? Or do they need to be run as two separate processes with two separate mainloops?
>
> I’m really hoping to get any answer, my last few questions went unanswered (which happens), but I’ve begun to wonder if my emails are getting through.

I guess they were done separately just exercise their interfaces, note
that you may not want to advertise in the beginning or actually stop
advertise if something else happen, e.g. sensor is no longer active,
that is why the interfaces are separated. Also note these are just
examples, we don't expect anyone using this code in production.

-- 
Luiz Augusto von Dentz

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

* Re: Could example-gatt-server and example-advertisement be folded into one?
  2016-01-17 12:54 ` Luiz Augusto von Dentz
@ 2016-01-18 18:32   ` Travis Griggs
  0 siblings, 0 replies; 3+ messages in thread
From: Travis Griggs @ 2016-01-18 18:32 UTC (permalink / raw)
  To: linux-bluetooth


> On Jan 17, 2016, at 4:54 AM, Luiz Augusto von Dentz <luiz.dentz@gmail.com> wrote:
> 
> Hi Travis,
> 
> On Sat, Jan 16, 2016 at 3:10 AM, Travis Griggs <travisgriggs@gmail.com> wrote:
>> Subject mostly asks it all. I’m not asking whether the bluez distributed examples could be folded into one.
>> 
>> I have been able able to build a working BLE interface to my Linux SBC using python to operate as a peripheral. I worked from these two files. Is there any reason I couldn’t weld the two files together into one? Or do they need to be run as two separate processes with two separate mainloops?
>> 
>> I’m really hoping to get any answer, my last few questions went unanswered (which happens), but I’ve begun to wonder if my emails are getting through.
> 
> I guess they were done separately just exercise their interfaces, note
> that you may not want to advertise in the beginning or actually stop
> advertise if something else happen, e.g. sensor is no longer active,
> that is why the interfaces are separated. Also note these are just
> examples, we don't expect anyone using this code in production.

Thanks for the reply Luiz. I’ll experiment with refactoring them/merging them some.

Can you help me understand your comment about “don’t expect anyone using this code in production.”?

I’m trying to build a device based on an ARM SBC running Debian Linux, that acts as a control point for a guy with a BLE enabled phone. So as long as it’s powered, I want someone to be able to walk up to it and fire up my BLE app on their device and control the things the device does. Based on response from an earlier email, I took the example-gatt-server and example-advertise, made copies, and started modifying/refactoring etc, based on the idea that this was a good starting point to learn how the encouraged method was to write such an app. In some small way, my hope is to use my code in some sort of limited production in the future. In your opinion, am I on the right track? Or does your comment mean I should be doing something different? My own application code on the device is written in python3.

Thanks!

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

end of thread, other threads:[~2016-01-18 18:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-16  1:10 Could example-gatt-server and example-advertisement be folded into one? Travis Griggs
2016-01-17 12:54 ` Luiz Augusto von Dentz
2016-01-18 18:32   ` Travis Griggs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.