OK now that we have lists and IRC in place, it's time to start using them. Bryan (at least) has posted some patches for review but if Greybus is going to provide some greater long-term usefulness it will need to be adapted to be more easily used in contexts outside Project Ara.
There was some informal conversation about this at ELCE. I have a few of my own thoughts but mainly I just want to get some discussion started to see if we have some pieces we can agree on, and take things from there. Here's a short summary of what's below: - Retargeting Greybus for use in IoT seems reasonable - We will need to adjust the abstract model currently implemented for Greybus to match the new target - Certain core functionality should be useful as-is; but some other features will need to be re-thought and redefined. - We will need to evolve the Greybus kernel code to define what is truly "core" functionality, and what that core needs from its environment. - We will need to ensure the Greybus API is stable, and that our versioning design is sound.
One thing that came up multiple times in October was the notion that Greybus could serve as the basis for communication among entities in an Internet of Things system. I agree with this, at least in part. We have set up a system with some well-defined mechanisms for encapsulating messages, along with a model of remote procedure calls that provide a pretty robust way of getting things done across a network. The core code implements a lot of features (like timeouts and message cancellation) that are very useful, and which should really be done in a generic way. We've got code and conventions in the existing protocol drivers that provide good examples of how to use the core functionality. I think it's reasonable to pursue adapting Greybus to be usable in IoT environments.
In any case, one thing that occurred to me during that week and those discussions was that we really need to define a new *target* for Greybus. That is, we no longer have the Ara phone as the hardware target, and we need to somehow define another ultimate goal for the hardware or environment in which Greybus operates. This should be more abstract than a hardware definition; instead it ought to define properties of and services provided by the entities communicating in a Greybus system. In some ways we already have that (Interfaces and Modules are abstract, but the details of what they represent may no longer match what is required).
I think the things that Greybus defines now that can be pretty universally useful are the core concepts: - generic Greybus host device driver interface - connections with fixed protocols that define how messages carried over them are interpreted - the format of messages, and the generic message header - the overall messaging model, including sending, receiving cancelling messages - the operations RPC model, including completion semantics (asynchronous completion, unidirectional operations, first error result prevails, and the ability to have multiple outstanding operations)
From there we get into some things that are almost certainly
useful, but there may need to be some changes: - The grouping of connections into bundles, which attach to Linux device drivers. (I think we need this, but there remains some work to do, especially in relation to the next item.) - Manifests to describe module/interface functionality - Control connection and how it's used And we can keep going into other things that become more and more likely to be unnecessary or just plain wrong when we are targeting something different from an Ara phone: - SVC and the SVC protocol The above is not at all exhaustive; I just wanted to try to identify a few specific things we can maybe start to agree on.
Currently, the control protocol and SVC protocol are very much biased toward the Ara hardware. (Other protocols are too, like time sync and maybe firmware update.) Furthermore, pieces of these have necessarily made their way into core Greybus code. As we define a new non-Ara target, we need to figure out what parts really belong in the Greybus core, and which things need to be supplied either by external entities or by protocol drivers. One way to do that might be to implement the core code as a library, but to be honest I think the real work lies in teasing things apart so the core can be defined to supply certain well-known services, with hooks to allow other capabilities. For a (contrived) example of what I mean, we may need to provide hooks for setting up connection routing rather than implementing it in the core code. In any case, I think we need to look at what constitutes the true "core" of Greybus services and what that core needs from its environment in order to be used.
If Greybus is going to provide a more general service we need to ensure it provides a stable API. We have structured things this way since the beginning, but I fear we may have gotten sloppy because we basically always packaged everything together. As it is, all the versioning is in place but to my knowledge we've never really tested it to make sure it works.
I had another point which I've now forgotten... In any case, I really just hope to get some conversation going.
What do you think?
-Alex
On 29/11/16 15:36, Alex Elder wrote:
What do you think?
I agree with everything you said about SVC, control, TimeSync and to and as it currently is - firmware too.
I also agree we need a well defined long term target to shoot for. Implied in the target of becoming a self-describing IoT bus is that its no longer a UniPro centric bus.
I think the main question/concern (mostly question) I have is - are we going to try to maintain any type of UniPro support and if so
- To what level - On what hardware
Also I wonder what take Motorola has (if any) on the whole zapping UniPro thing. It would be nice to somehow support UniPro but, given we have no hardware to test it out on - it's not clear how productive or realistic that would really be - perhaps a complete waste of time.
So my question/statement is, is UniPro officially dead in Greybus-V2 ?
--- bod
Hello,
On Tuesday 29 Nov 2016 17:40:43 Bryan O'Donoghue wrote:
On 29/11/16 15:36, Alex Elder wrote:
What do you think?
I agree with everything you said about SVC, control, TimeSync and to and as it currently is - firmware too.
I also agree we need a well defined long term target to shoot for. Implied in the target of becoming a self-describing IoT bus is that its no longer a UniPro centric bus.
I think the main question/concern (mostly question) I have is - are we going to try to maintain any type of UniPro support and if so
- To what level
- On what hardware
Also I wonder what take Motorola has (if any) on the whole zapping UniPro thing. It would be nice to somehow support UniPro but, given we have no hardware to test it out on - it's not clear how productive or realistic that would really be - perhaps a complete waste of time.
So my question/statement is, is UniPro officially dead in Greybus-V2 ?
I'm also concerned about dropping UniPro support as it would just cut the branch that the Moto-Z is sitting on. We've rushed merging greybus upstream in order to avoid the forked version making it to mainline first. Moving in a direction that would prevent Motorola from ever using the mainline kernel wouldn't be nice.
On 30/11/16 08:53, Laurent Pinchart wrote:
Hello,
On Tuesday 29 Nov 2016 17:40:43 Bryan O'Donoghue wrote:
On 29/11/16 15:36, Alex Elder wrote:
What do you think?
I agree with everything you said about SVC, control, TimeSync and to and as it currently is - firmware too.
I also agree we need a well defined long term target to shoot for. Implied in the target of becoming a self-describing IoT bus is that its no longer a UniPro centric bus.
I think the main question/concern (mostly question) I have is - are we going to try to maintain any type of UniPro support and if so
- To what level
- On what hardware
Also I wonder what take Motorola has (if any) on the whole zapping UniPro thing. It would be nice to somehow support UniPro but, given we have no hardware to test it out on - it's not clear how productive or realistic that would really be - perhaps a complete waste of time.
So my question/statement is, is UniPro officially dead in Greybus-V2 ?
I'm also concerned about dropping UniPro support as it would just cut the branch that the Moto-Z is sitting on. We've rushed merging greybus upstream in order to avoid the forked version making it to mainline first. Moving in a direction that would prevent Motorola from ever using the mainline kernel wouldn't be nice.
+ Jim
Any comment on the above Jim from Motorola's perspective ?
--- bod
On Wed, Nov 30, 2016 at 02:17:49PM +0000, Bryan O'Donoghue wrote:
On 30/11/16 08:53, Laurent Pinchart wrote:
Hello,
On Tuesday 29 Nov 2016 17:40:43 Bryan O'Donoghue wrote:
On 29/11/16 15:36, Alex Elder wrote:
What do you think?
I agree with everything you said about SVC, control, TimeSync and to and as it currently is - firmware too.
I also agree we need a well defined long term target to shoot for. Implied in the target of becoming a self-describing IoT bus is that its no longer a UniPro centric bus.
I think the main question/concern (mostly question) I have is - are we going to try to maintain any type of UniPro support and if so
- To what level
- On what hardware
Also I wonder what take Motorola has (if any) on the whole zapping UniPro thing. It would be nice to somehow support UniPro but, given we have no hardware to test it out on - it's not clear how productive or realistic that would really be - perhaps a complete waste of time.
So my question/statement is, is UniPro officially dead in Greybus-V2 ?
I'm also concerned about dropping UniPro support as it would just cut the branch that the Moto-Z is sitting on. We've rushed merging greybus upstream in order to avoid the forked version making it to mainline first. Moving in a direction that would prevent Motorola from ever using the mainline kernel wouldn't be nice.
That's not an accurate description. We wanted to get this upstream and into 4.9 which was declared to be the next LTS kernel.
But I agree that dropping UniPro support from Greybus would be rather silly, especially given that there are now phones shipping that use a version of it.
Johan
On 30/11/16 15:30, Johan Hovold wrote:
On Wed, Nov 30, 2016 at 02:17:49PM +0000, Bryan O'Donoghue wrote:
On 30/11/16 08:53, Laurent Pinchart wrote:
Hello,
On Tuesday 29 Nov 2016 17:40:43 Bryan O'Donoghue wrote:
On 29/11/16 15:36, Alex Elder wrote:
What do you think?
I'm also concerned about dropping UniPro support as it would just cut the branch that the Moto-Z is sitting on. We've rushed merging greybus upstream in order to avoid the forked version making it to mainline first. Moving in a direction that would prevent Motorola from ever using the mainline kernel wouldn't be nice.
That's not an accurate description. We wanted to get this upstream and into 4.9 which was declared to be the next LTS kernel.
But I agree that dropping UniPro support from Greybus would be rather silly, especially given that there are now phones shipping that use a version of it.
So are we talking about a fork of greybus to do the IoT type stuff Pantelis and Alexandre mentioned @ ELCE ?
Greybus-UniPro Greybus-IoT (minus UniPro, SVC, TimeSync and with a modified control and firmware protocol)
We still need to know if the Motorola stuff will ever be merged with the stuff in upstream/staging and if so when/how....
--- bod
Hi Bryan,
On Wednesday 30 Nov 2016 16:17:38 Bryan O'Donoghue wrote:
On 30/11/16 15:30, Johan Hovold wrote:
On Wed, Nov 30, 2016 at 02:17:49PM +0000, Bryan O'Donoghue wrote:
On 30/11/16 08:53, Laurent Pinchart wrote:
On Tuesday 29 Nov 2016 17:40:43 Bryan O'Donoghue wrote:
On 29/11/16 15:36, Alex Elder wrote:
What do you think?
I'm also concerned about dropping UniPro support as it would just cut the branch that the Moto-Z is sitting on. We've rushed merging greybus upstream in order to avoid the forked version making it to mainline first. Moving in a direction that would prevent Motorola from ever using the mainline kernel wouldn't be nice.
That's not an accurate description. We wanted to get this upstream and into 4.9 which was declared to be the next LTS kernel.
But I agree that dropping UniPro support from Greybus would be rather silly, especially given that there are now phones shipping that use a version of it.
So are we talking about a fork of greybus to do the IoT type stuff Pantelis and Alexandre mentioned @ ELCE ?
No, not a fork, a modularization that would make it possible to target a new field without having to remove UniPro support completely.
Greybus-UniPro Greybus-IoT (minus UniPro, SVC, TimeSync and with a modified control and firmware protocol)
We still need to know if the Motorola stuff will ever be merged with the stuff in upstream/staging and if so when/how....
On 30/11/16 16:19, Laurent Pinchart wrote:
Hi Bryan,
On Wednesday 30 Nov 2016 16:17:38 Bryan O'Donoghue wrote:
On 30/11/16 15:30, Johan Hovold wrote:
On Wed, Nov 30, 2016 at 02:17:49PM +0000, Bryan O'Donoghue wrote:
On 30/11/16 08:53, Laurent Pinchart wrote:
On Tuesday 29 Nov 2016 17:40:43 Bryan O'Donoghue wrote:
On 29/11/16 15:36, Alex Elder wrote: > What do you think?
I'm also concerned about dropping UniPro support as it would just cut the branch that the Moto-Z is sitting on. We've rushed merging greybus upstream in order to avoid the forked version making it to mainline first. Moving in a direction that would prevent Motorola from ever using the mainline kernel wouldn't be nice.
That's not an accurate description. We wanted to get this upstream and into 4.9 which was declared to be the next LTS kernel.
But I agree that dropping UniPro support from Greybus would be rather silly, especially given that there are now phones shipping that use a version of it.
So are we talking about a fork of greybus to do the IoT type stuff Pantelis and Alexandre mentioned @ ELCE ?
No, not a fork, a modularization that would make it possible to target a new field without having to remove UniPro support completely.
Fair enough.
Any ideas/favourites re:
- An initial host board - A host device bus {SPI, I2C, etc} - A !unipro-greybus module(s)
Also - will we stick with Nuttx on the firmware side or move to something shiny and new like Zephyr...
We would need to make the spec allow for UniPro to co-exist or not matter too. Lots of rewording needed here.
--- bod
Hi Bryan,
On Wednesday 30 Nov 2016 16:50:04 Bryan O'Donoghue wrote:
On 30/11/16 16:19, Laurent Pinchart wrote:
On Wednesday 30 Nov 2016 16:17:38 Bryan O'Donoghue wrote:
On 30/11/16 15:30, Johan Hovold wrote:
On Wed, Nov 30, 2016 at 02:17:49PM +0000, Bryan O'Donoghue wrote:
On 30/11/16 08:53, Laurent Pinchart wrote:
On Tuesday 29 Nov 2016 17:40:43 Bryan O'Donoghue wrote: > On 29/11/16 15:36, Alex Elder wrote: >> What do you think?
I'm also concerned about dropping UniPro support as it would just cut the branch that the Moto-Z is sitting on. We've rushed merging greybus upstream in order to avoid the forked version making it to mainline first. Moving in a direction that would prevent Motorola from ever using the mainline kernel wouldn't be nice.
That's not an accurate description. We wanted to get this upstream and into 4.9 which was declared to be the next LTS kernel.
But I agree that dropping UniPro support from Greybus would be rather silly, especially given that there are now phones shipping that use a version of it.
So are we talking about a fork of greybus to do the IoT type stuff Pantelis and Alexandre mentioned @ ELCE ?
No, not a fork, a modularization that would make it possible to target a new field without having to remove UniPro support completely.
Fair enough.
Any ideas/favourites re:
- An initial host board
- A host device bus {SPI, I2C, etc}
- A !unipro-greybus module(s)
I first want to define what we mean by IoT, see my reply to Alex on that topic.
Also - will we stick with Nuttx on the firmware side or move to something shiny and new like Zephyr...
Upstream Zephyr uses Gerrit, so count me out :-)
We would need to make the spec allow for UniPro to co-exist or not matter too. Lots of rewording needed here.
On 11/30/2016 08:52 AM, Laurent Pinchart wrote:
Hi Bryan,
On Wednesday 30 Nov 2016 16:50:04 Bryan O'Donoghue wrote:
On 30/11/16 16:19, Laurent Pinchart wrote:
On Wednesday 30 Nov 2016 16:17:38 Bryan O'Donoghue wrote:
On 30/11/16 15:30, Johan Hovold wrote:
On Wed, Nov 30, 2016 at 02:17:49PM +0000, Bryan O'Donoghue wrote:
On 30/11/16 08:53, Laurent Pinchart wrote: > On Tuesday 29 Nov 2016 17:40:43 Bryan O'Donoghue wrote: >> On 29/11/16 15:36, Alex Elder wrote: >>> What do you think? > I'm also concerned about dropping UniPro support as it would just cut > the branch that the Moto-Z is sitting on. We've rushed merging greybus > upstream in order to avoid the forked version making it to mainline > first. Moving in a direction that would prevent Motorola from ever > using the mainline kernel wouldn't be nice.
That's not an accurate description. We wanted to get this upstream and into 4.9 which was declared to be the next LTS kernel.
But I agree that dropping UniPro support from Greybus would be rather silly, especially given that there are now phones shipping that use a version of it.
So are we talking about a fork of greybus to do the IoT type stuff Pantelis and Alexandre mentioned @ ELCE ?
No, not a fork, a modularization that would make it possible to target a new field without having to remove UniPro support completely.
Fair enough.
Any ideas/favourites re:
- An initial host board
- A host device bus {SPI, I2C, etc}
- A !unipro-greybus module(s)
I first want to define what we mean by IoT, see my reply to Alex on that topic.
Also - will we stick with Nuttx on the firmware side or move to something shiny and new like Zephyr...
Upstream Zephyr uses Gerrit, so count me out :-)
But .. but .. the build system actually works!
We would need to make the spec allow for UniPro to co-exist or not matter too. Lots of rewording needed here.
On 30/11/16 16:52, Laurent Pinchart wrote:
I first want to define what we mean by IoT
Heh.
IoT technically means (my understanding) a way of accessing edge devices over the internet or allowing edge devices access to the Internet.
The self-describing bits of greybus and the ability to create standard Linux devices without caring about the actual hardware bus is the interesting part. Unlike say USB - which is a self-describing network but, is tightly coupled to a wire-level bus, greybus (can be made to be) hardware agnostic.
I think self-describing, pluggable network is what makes it a candidate for people to rehash the abused and unloved IoT term.
If it helps I will never type the TLA IoT again in a greybus email... :)
Thanks for cc'ing me and letting me know about the mailing list. I have subscribed and am trying to catch up with understanding the goals, but it seems promising.
Jim
On Wed, Nov 30, 2016 at 11:29 AM, Bryan O'Donoghue < pure.logic@nexus-software.ie> wrote:
On 30/11/16 16:52, Laurent Pinchart wrote:
I first want to define what we mean by IoT
Heh.
IoT technically means (my understanding) a way of accessing edge devices over the internet or allowing edge devices access to the Internet.
The self-describing bits of greybus and the ability to create standard Linux devices without caring about the actual hardware bus is the interesting part. Unlike say USB - which is a self-describing network but, is tightly coupled to a wire-level bus, greybus (can be made to be) hardware agnostic.
I think self-describing, pluggable network is what makes it a candidate for people to rehash the abused and unloved IoT term.
If it helps I will never type the TLA IoT again in a greybus email... :)
On Wednesday 30 Nov 2016 17:29:32 Bryan O'Donoghue wrote:
On 30/11/16 16:52, Laurent Pinchart wrote:
I first want to define what we mean by IoT
Heh.
IoT technically means (my understanding) a way of accessing edge devices over the internet or allowing edge devices access to the Internet.
Greybus seems of little value in that context, given that it can't be transported over the internet (now if we want to change that I'm open for discussions, but it will be a very different concept).
Greybus can be useful to access sensors and other similar embedded devices (most of them being too tiny to run Linux, but that's not a requirement). While this can be used for "IoT", it's in no way limited to that, or even dependent on it.
I still don't know how we should position ourselves when compared to field buses for instance.
The self-describing bits of greybus and the ability to create standard Linux devices without caring about the actual hardware bus is the interesting part. Unlike say USB - which is a self-describing network but, is tightly coupled to a wire-level bus, greybus (can be made to be) hardware agnostic.
I think self-describing, pluggable network is what makes it a candidate for people to rehash the abused and unloved IoT term.
If it helps I will never type the TLA IoT again in a greybus email... :)
A couple of items about how Motorola used Greybus:
We were rebasing on the upstream code, with hopes of maintaining compatibility, but had to freeze before some significant changes upstream.
We added support to make greybus less dependent on unipro by adding a switching layer and SPI and I2C as transports. We also support unipro but ended up not using greybus over unipro because the idle current on the TSB was too high to leave up when not actively transmitting high speed data. So we don't use unipro for greybus.
We ended up using greybus primarily as a control channel for other speed buses (mydp, csi and dsi over unipro, usb), but also for a few low speed protocols like battery and lights.
We faked out the SVC to maintain compatibility and support multiple module support. May not be how you would want approach the problem. The only portion of SVC we really utilized was the CREATE/DESTROY messages in order to route traffic between the interface:cport pairs. Everything else is either stubbed out or faked/hard-coded (i.e. DME Attributes) to keep the core greybus initialization happy.
Protocol versioning required some changes to get to work as the greybus implementation at the time of our fork was hard-coding everything to 0.1. We had to add additional logic to support multiple major versions and implement a 'best match' algorithm. This can probably be done better as well as we were trying to minimize changes to core greybus at the time.
Before extending the supported devices, it might be wise to give security some thought. If the host is just sending generally available information like battery levels then it might not be big concern, but it would be easy to write something that hands over kernel access to an external chip.
Jim
On Thu, Dec 1, 2016 at 4:35 AM, Laurent Pinchart laurent.pinchart@ideasonboard.com wrote:
On Wednesday 30 Nov 2016 17:29:32 Bryan O'Donoghue wrote:
On 30/11/16 16:52, Laurent Pinchart wrote:
I first want to define what we mean by IoT
Heh.
IoT technically means (my understanding) a way of accessing edge devices over the internet or allowing edge devices access to the Internet.
Greybus seems of little value in that context, given that it can't be transported over the internet (now if we want to change that I'm open for discussions, but it will be a very different concept).
Greybus can be useful to access sensors and other similar embedded devices (most of them being too tiny to run Linux, but that's not a requirement). While this can be used for "IoT", it's in no way limited to that, or even dependent on it.
I still don't know how we should position ourselves when compared to field buses for instance.
The self-describing bits of greybus and the ability to create standard Linux devices without caring about the actual hardware bus is the interesting part. Unlike say USB - which is a self-describing network but, is tightly coupled to a wire-level bus, greybus (can be made to be) hardware agnostic.
I think self-describing, pluggable network is what makes it a candidate for people to rehash the abused and unloved IoT term.
If it helps I will never type the TLA IoT again in a greybus email... :)
-- Regards,
Laurent Pinchart
On 02/12/16 18:18, Jim Wylder wrote:
A couple of items about how Motorola used Greybus:
We were rebasing on the upstream code, with hopes of maintaining compatibility, but had to freeze before some significant changes upstream.
We added support to make greybus less dependent on unipro by adding a switching layer and SPI and I2C as transports.
Interesting, that sounds a lot like what we were discussing here i.e. adding a new transport but, keeping the UniPro specific bits.
Note: our greybus has some UniPro connection tear-down support that is probably worth keeping, though some of that is undoubtedly TSB specific quirkiness.
We also support unipro but ended up not using greybus over unipro because the idle current on the TSB was too high to leave up when not actively transmitting high speed data. So we don't use unipro for greybus.
We ended up using greybus primarily as a control channel for other speed buses (mydp, csi and dsi over unipro, usb), but also for a few low speed protocols like battery and lights.
Funny. On connection tear down I was always of the opinion UniPro could do with a simple side-band/control path - like i2c or whatever - you've done it the other way around :)
We faked out the SVC to maintain compatibility and support multiple module support. May not be how you would want approach the problem.
I think most of the SVC stuff is very much specific to our particular PCB setup TBH.
The only portion of SVC we really utilized was the CREATE/DESTROY messages in order to route traffic between the interface:cport pairs. Everything else is either stubbed out or faked/hard-coded (i.e. DME Attributes) to keep the core greybus initialization happy.
I thought the DME attributes were TSB specific extensions - not actually UniPro per se.
Do you have a functional version of gbsim ? If so maybe the most sensible way to try to integrate the two code bases is that way ?
Our gbsim is ~reasonably~ representative I think (I may get laughed at for saying that)...
If you had functioning gbsim for the Moto Z - we could integrate both simulators and the (just about) validate the integrated kernel code.
Protocol versioning required some changes to get to work as the greybus implementation at the time of our fork was hard-coding everything to 0.1. We had to add additional logic to support multiple major versions and implement a 'best match' algorithm. This can probably be done better as well as we were trying to minimize changes to core greybus at the time.
Understood. I wonder where we realistically begin trying to smoosh the two code-bases together - gbsim + parallel kernel work ?
--- bod
Unipro is quite capable of using i2c as a control path, but the ARM processor on the TSB doesn't have enough power gates. We have to completely power off the TSB to meet current drain targets for idle state.
We do not currently have a gbsim.
Jim
On Mon, Dec 5, 2016 at 9:06 AM, Bryan O'Donoghue pure.logic@nexus-software.ie wrote:
On 02/12/16 18:18, Jim Wylder wrote:
A couple of items about how Motorola used Greybus:
We were rebasing on the upstream code, with hopes of maintaining compatibility, but had to freeze before some significant changes upstream.
We added support to make greybus less dependent on unipro by adding a switching layer and SPI and I2C as transports.
Interesting, that sounds a lot like what we were discussing here i.e. adding a new transport but, keeping the UniPro specific bits.
Note: our greybus has some UniPro connection tear-down support that is probably worth keeping, though some of that is undoubtedly TSB specific quirkiness.
We also support unipro but ended up not using greybus over unipro because the idle current on the TSB was too high to leave up when not actively transmitting high speed data. So we don't use unipro for greybus.
We ended up using greybus primarily as a control channel for other speed buses (mydp, csi and dsi over unipro, usb), but also for a few low speed protocols like battery and lights.
Funny. On connection tear down I was always of the opinion UniPro could do with a simple side-band/control path - like i2c or whatever - you've done it the other way around :)
We faked out the SVC to maintain compatibility and support multiple module support. May not be how you would want approach the problem.
I think most of the SVC stuff is very much specific to our particular PCB setup TBH.
The only portion of SVC we really utilized was the CREATE/DESTROY messages in order to route traffic between the interface:cport pairs. Everything else is either stubbed out or faked/hard-coded (i.e. DME Attributes) to keep the core greybus initialization happy.
I thought the DME attributes were TSB specific extensions - not actually UniPro per se.
Do you have a functional version of gbsim ? If so maybe the most sensible way to try to integrate the two code bases is that way ?
Our gbsim is ~reasonably~ representative I think (I may get laughed at for saying that)...
If you had functioning gbsim for the Moto Z - we could integrate both simulators and the (just about) validate the integrated kernel code.
Protocol versioning required some changes to get to work as the greybus implementation at the time of our fork was hard-coding everything to 0.1. We had to add additional logic to support multiple major versions and implement a 'best match' algorithm. This can probably be done better as well as we were trying to minimize changes to core greybus at the time.
Understood. I wonder where we realistically begin trying to smoosh the two code-bases together - gbsim + parallel kernel work ?
bod
On 05/12/16 15:20, Jim Wylder wrote:
Unipro is quite capable of using i2c as a control path, but the ARM processor on the TSB doesn't have enough power gates. We have to completely power off the TSB to meet current drain targets for idle state.
We do not currently have a gbsim.
Jim
I guess another approach to take is to start to cherry-pick the Moto Z patches and
1. Ensure they don't break what we have upstream 2. Try to add parallel support to gbsim to validate them 3. The spec would definitely need some hand-holding (alot of) hand holding
If we try to take the Moto Z sources in - the Greybus spec should reflect the integrated set ... after all a formal spec is a good thing.
--- bod
On Mon, Dec 05, 2016 at 03:29:43PM +0000, Bryan O'Donoghue wrote:
On 05/12/16 15:20, Jim Wylder wrote:
Unipro is quite capable of using i2c as a control path, but the ARM processor on the TSB doesn't have enough power gates. We have to completely power off the TSB to meet current drain targets for idle state.
We do not currently have a gbsim.
Jim
I guess another approach to take is to start to cherry-pick the Moto Z patches and
- Ensure they don't break what we have upstream
- Try to add parallel support to gbsim to validate them
- The spec would definitely need some hand-holding (alot of) hand holding
If we try to take the Moto Z sources in - the Greybus spec should reflect the integrated set ... after all a formal spec is a good thing.
I agree.
I want to bump the spec version number soon to make it a "released" spec, but I worry about this merge. Should I just cut what we have today in the spec as a 1.0, and then we work to make the merge "2.0" to allow everyone to work together better?
Oh, and for those that might have missed it, we now have a proper license for the spec and implementing the spec, so everyone should be happy: https://github.com/projectara/greybus-spec/commit/7c76600bcbc372e35d1f654c12...
thanks,
greg k-h
On 05/12/16 15:41, Greg KH wrote:
On Mon, Dec 05, 2016 at 03:29:43PM +0000, Bryan O'Donoghue wrote:
On 05/12/16 15:20, Jim Wylder wrote:
Unipro is quite capable of using i2c as a control path, but the ARM processor on the TSB doesn't have enough power gates. We have to completely power off the TSB to meet current drain targets for idle state.
We do not currently have a gbsim.
Jim
I guess another approach to take is to start to cherry-pick the Moto Z patches and
- Ensure they don't break what we have upstream
- Try to add parallel support to gbsim to validate them
- The spec would definitely need some hand-holding (alot of) hand holding
If we try to take the Moto Z sources in - the Greybus spec should reflect the integrated set ... after all a formal spec is a good thing.
I agree.
I want to bump the spec version number soon to make it a "released" spec, but I worry about this merge. Should I just cut what we have today in the spec as a 1.0, and then we work to make the merge "2.0" to allow everyone to work together better?
Seems like the right way to do it from my POV anyway. It makes sense to baseline on a V1 and then go a munge together a V2.
I'm not sure how everybody else feels about taking in the Moto Z stuff but, it seems to me as if its the best fit for adding different transport layers while continuing to support UniPro anyway...
Oh, and for those that might have missed it, we now have a proper license for the spec and implementing the spec, so everyone should be happy: https://github.com/projectara/greybus-spec/commit/7c76600bcbc372e35d1f654c12...
can't have been easy getting all that legalese done officially
--- bod
On Mon, Dec 05, 2016 at 03:53:58PM +0000, Bryan O'Donoghue wrote:
On 05/12/16 15:41, Greg KH wrote:
On Mon, Dec 05, 2016 at 03:29:43PM +0000, Bryan O'Donoghue wrote:
On 05/12/16 15:20, Jim Wylder wrote:
Unipro is quite capable of using i2c as a control path, but the ARM processor on the TSB doesn't have enough power gates. We have to completely power off the TSB to meet current drain targets for idle state.
We do not currently have a gbsim.
Jim
I guess another approach to take is to start to cherry-pick the Moto Z patches and
- Ensure they don't break what we have upstream
- Try to add parallel support to gbsim to validate them
- The spec would definitely need some hand-holding (alot of) hand holding
If we try to take the Moto Z sources in - the Greybus spec should reflect the integrated set ... after all a formal spec is a good thing.
I agree.
I want to bump the spec version number soon to make it a "released" spec, but I worry about this merge. Should I just cut what we have today in the spec as a 1.0, and then we work to make the merge "2.0" to allow everyone to work together better?
Seems like the right way to do it from my POV anyway. It makes sense to baseline on a V1 and then go a munge together a V2.
I'm not sure how everybody else feels about taking in the Moto Z stuff but, it seems to me as if its the best fit for adding different transport layers while continuing to support UniPro anyway...
I want to get the two codebases, and specs, in sync as the Moto Z is important, being the first shipping implementation of this stuff. Having a fork that goes off on its own doesn't help anyone here, and will only cause confusion and duplicated effort over time.
Oh, and for those that might have missed it, we now have a proper license for the spec and implementing the spec, so everyone should be happy: https://github.com/projectara/greybus-spec/commit/7c76600bcbc372e35d1f654c12...
can't have been easy getting all that legalese done officially
You have no idea... :)
thanks,
greg k-h
On 12/05/2016 09:41 AM, Greg KH wrote:
On Mon, Dec 05, 2016 at 03:29:43PM +0000, Bryan O'Donoghue wrote:
On 05/12/16 15:20, Jim Wylder wrote:
Unipro is quite capable of using i2c as a control path, but the ARM processor on the TSB doesn't have enough power gates. We have to completely power off the TSB to meet current drain targets for idle state.
We do not currently have a gbsim.
Jim
I guess another approach to take is to start to cherry-pick the Moto Z patches and
- Ensure they don't break what we have upstream
- Try to add parallel support to gbsim to validate them
- The spec would definitely need some hand-holding (alot of) hand holding
If we try to take the Moto Z sources in - the Greybus spec should reflect the integrated set ... after all a formal spec is a good thing.
I agree.
I want to bump the spec version number soon to make it a "released" spec, but I worry about this merge. Should I just cut what we have today in the spec as a 1.0, and then we work to make the merge "2.0" to allow everyone to work together better?
I think this is as good an idea as any. Now that it's licensed, maybe that can mark the turning point that makes us stamp version 1.0 of the spec. It's not going to perfectly match the code, but at this point there's no value in making that happen.
So unless someone else objects, I think we ought to do this. Just say "1.0 is done; onward."
-Alex
Oh, and for those that might have missed it, we now have a proper license for the spec and implementing the spec, so everyone should be happy: https://github.com/projectara/greybus-spec/commit/7c76600bcbc372e35d1f654c12...
thanks,
greg k-h _______________________________________________ greybus-dev mailing list greybus-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/greybus-dev
On Sat, Dec 10, 2016 at 06:45:14PM -0600, Alex Elder wrote:
On 12/05/2016 09:41 AM, Greg KH wrote:
On Mon, Dec 05, 2016 at 03:29:43PM +0000, Bryan O'Donoghue wrote:
On 05/12/16 15:20, Jim Wylder wrote:
Unipro is quite capable of using i2c as a control path, but the ARM processor on the TSB doesn't have enough power gates. We have to completely power off the TSB to meet current drain targets for idle state.
We do not currently have a gbsim.
Jim
I guess another approach to take is to start to cherry-pick the Moto Z patches and
- Ensure they don't break what we have upstream
- Try to add parallel support to gbsim to validate them
- The spec would definitely need some hand-holding (alot of) hand holding
If we try to take the Moto Z sources in - the Greybus spec should reflect the integrated set ... after all a formal spec is a good thing.
I agree.
I want to bump the spec version number soon to make it a "released" spec, but I worry about this merge. Should I just cut what we have today in the spec as a 1.0, and then we work to make the merge "2.0" to allow everyone to work together better?
I think this is as good an idea as any. Now that it's licensed, maybe that can mark the turning point that makes us stamp version 1.0 of the spec. It's not going to perfectly match the code, but at this point there's no value in making that happen.
So unless someone else objects, I think we ought to do this. Just say "1.0 is done; onward."
I agree, I'll go mark the spec like that today and push it out...
thanks,
greg k-h
On Fri, Dec 16, 2016 at 08:46:41AM -0800, Greg KH wrote:
On Sat, Dec 10, 2016 at 06:45:14PM -0600, Alex Elder wrote:
On 12/05/2016 09:41 AM, Greg KH wrote:
On Mon, Dec 05, 2016 at 03:29:43PM +0000, Bryan O'Donoghue wrote:
On 05/12/16 15:20, Jim Wylder wrote:
Unipro is quite capable of using i2c as a control path, but the ARM processor on the TSB doesn't have enough power gates. We have to completely power off the TSB to meet current drain targets for idle state.
We do not currently have a gbsim.
Jim
I guess another approach to take is to start to cherry-pick the Moto Z patches and
- Ensure they don't break what we have upstream
- Try to add parallel support to gbsim to validate them
- The spec would definitely need some hand-holding (alot of) hand holding
If we try to take the Moto Z sources in - the Greybus spec should reflect the integrated set ... after all a formal spec is a good thing.
I agree.
I want to bump the spec version number soon to make it a "released" spec, but I worry about this merge. Should I just cut what we have today in the spec as a 1.0, and then we work to make the merge "2.0" to allow everyone to work together better?
I think this is as good an idea as any. Now that it's licensed, maybe that can mark the turning point that makes us stamp version 1.0 of the spec. It's not going to perfectly match the code, but at this point there's no value in making that happen.
So unless someone else objects, I think we ought to do this. Just say "1.0 is done; onward."
I agree, I'll go mark the spec like that today and push it out...
This is now done, we have a 1.0 specification, attached below is the .pdf file for it.
thanks,
greg k-h
On 12/05/2016 09:06 AM, Bryan O'Donoghue wrote:
I thought the DME attributes were TSB specific extensions - not actually UniPro per se.
DME attributes are a fundamental part of UniPro.
Certain DME attributes are vendor-specific. Some attributes that Toshiba defined were not in the right numerical "name space..." And some things, like the DME attributes that trigger an interrupt on the receiver, are very useful but completely non-standard.
-Alex
On 11/12/16 00:42, Alex Elder wrote:
On 12/05/2016 09:06 AM, Bryan O'Donoghue wrote:
I thought the DME attributes were TSB specific extensions - not actually UniPro per se.
DME attributes are a fundamental part of UniPro.
Certain DME attributes are vendor-specific. Some attributes that Toshiba defined were not in the right numerical "name space..." And some things, like the DME attributes that trigger an interrupt on the receiver, are very useful but completely non-standard.
Yes.
I'm wondering how many (if any) dependencies we have in the high-level code on TSB specific DME attributes.
Lots of the control/SVC and ARPC stuff is not specifically UniPro but rather geared towards working with the semantics of the TSB chipset. We'll probably have to comb through the sources for DME attributes (or code that depends on them)...
I haven't done that audit so there may be no dependencies after all.
--- bod
On 12/01/2016 04:35 AM, Laurent Pinchart wrote:
Greybus seems of little value in that context, given that it can't be transported over the internet (now if we want to change that I'm open for discussions, but it will be a very different concept).
Can you clarify what you mean by this? Right now, certainly not. But one could envision Greybus protocols going over TCP/IP or something.
Anyway, I'm not saying it's a good idea, but I didn't understand your statement.
-Alex
Hi Alex,
On Saturday 10 Dec 2016 18:40:27 Alex Elder wrote:
On 12/01/2016 04:35 AM, Laurent Pinchart wrote:
(Adding back a bit more context)
IoT technically means (my understanding) a way of accessing edge devices over the internet or allowing edge devices access to the Internet.
Greybus seems of little value in that context, given that it can't be transported over the internet (now if we want to change that I'm open for discussions, but it will be a very different concept).
Can you clarify what you mean by this? Right now, certainly not. But one could envision Greybus protocols going over TCP/IP or something.
Anyway, I'm not saying it's a good idea, but I didn't understand your statement.
If we can't transport Greybus over the internet (and thus over IP) then the above definition of IoT doesn't really apply to Greybus. Greybus can certainly help implementing the use case by handling the last hop between sensors and gateways, but we then need to define our position when compared to existing field bus protocols.
On 11/30/2016 10:19 AM, Laurent Pinchart wrote:
So are we talking about a fork of greybus to do the IoT type stuff Pantelis and Alexandre mentioned @ ELCE ?
No, not a fork, a modularization that would make it possible to target a new field without having to remove UniPro support completely.
I kind of implied this in my summary, but I totally agree with this.
Nothing should be a fork at this point, it's all evolution of the upstream code to incorporate new or revised functionality.
And the right approach is to abstract the UniPro transport so it UniPro isn't strictly required. But I really think there will be more to it than that. I feel like the last year of so we had to really drive SVC protocol to be dependent on the Ara hardware, whereas we've always tried to avoid that. I think we may need to re-think some of that stuff and try to decide what sort of meta-operations (like connection setup and teardown) are really needed to support Greybus's core behavior.
And in the process, we *do* need to look at things like (as Jim pointed out) security. Greybus operations rely on a reliable transport, which UniPro could provide. Furthermore, Greybus assumed an enclosed system--a trusted UniPro fabric. There was some partial work on encrypted UniPro connections but that never got done. But once you go beyond that nice constrained system there are lots of secrecy and integrity concerns that Greybus does not address at all.
-Alex
On Tue, Nov 29, 2016 at 9:40 AM, Bryan O'Donoghue < pure.logic@nexus-software.ie> wrote:
On 29/11/16 15:36, Alex Elder wrote:
What do you think?
I agree with everything you said about SVC, control, TimeSync and to and as it currently is - firmware too.
I also agree we need a well defined long term target to shoot for. Implied in the target of becoming a self-describing IoT bus is that its no longer a UniPro centric bus.
I think the main question/concern (mostly question) I have is - are we going to try to maintain any type of UniPro support and if so
- To what level
- On what hardware
Also I wonder what take Motorola has (if any) on the whole zapping UniPro thing. It would be nice to somehow support UniPro but, given we have no hardware to test it out on - it's not clear how productive or realistic that would really be - perhaps a complete waste of time.
FWIW, I still have the hardware to test on :). So, I can help if testing is the concern. Obviously, that doesn't scale though.
- ssp
On 07/12/16 17:03, Sandeep Patil wrote:
On Tue, Nov 29, 2016 at 9:40 AM, Bryan O'Donoghue <pure.logic@nexus-software.ie mailto:pure.logic@nexus-software.ie> wrote:
On 29/11/16 15:36, Alex Elder wrote: > What do you think? I agree with everything you said about SVC, control, TimeSync and to and as it currently is - firmware too. I also agree we need a well defined long term target to shoot for. Implied in the target of becoming a self-describing IoT bus is that its no longer a UniPro centric bus. I think the main question/concern (mostly question) I have is - are we going to try to maintain any type of UniPro support and if so - To what level - On what hardware Also I wonder what take Motorola has (if any) on the whole zapping UniPro thing. It would be nice to somehow support UniPro but, given we have no hardware to test it out on - it's not clear how productive or realistic that would really be - perhaps a complete waste of time.
FWIW, I still have the hardware to test on :). So, I can help if testing is the concern. Obviously, that doesn't scale though.
- ssp
Me too. Most of us still do. There's been talk of DHL/UPS or use of a hammer[1] (not a joke) but so far all is still present. Of course we'd need to be booting a TOT kernel on the hardware to really validate things (an interesting project in itself) :) - this may be the way to go if DHL/hammer/dynamite/nukes are not going to be required long-term
[1] Johan will be doing this : https://youtu.be/5ku0rI0o6rg [2] Alex will be doing this : https://youtu.be/wcW_Ygs6hm0
Cause you know... if a hammer[1] is good enough for a Presidential candidate... it should be good enough for us. Just saying...
[1]http://dailycaller.com/2016/09/02/fbi-docs-aide-destroyed-hillarys-old-phone...
On 12/8/2016 4:26 AM, Bryan O'Donoghue wrote:
On 07/12/16 17:03, Sandeep Patil wrote:
On Tue, Nov 29, 2016 at 9:40 AM, Bryan O'Donoghue <pure.logic@nexus-software.ie mailto:pure.logic@nexus-software.ie> wrote:
On 29/11/16 15:36, Alex Elder wrote: > What do you think? I agree with everything you said about SVC, control, TimeSync and to and as it currently is - firmware too. I also agree we need a well defined long term target to shoot for. Implied in the target of becoming a self-describing IoT bus is that its no longer a UniPro centric bus. I think the main question/concern (mostly question) I have is - are we going to try to maintain any type of UniPro support and if so - To what level - On what hardware Also I wonder what take Motorola has (if any) on the whole zapping UniPro thing. It would be nice to somehow support UniPro but, given we have no hardware to test it out on - it's not clear how productive or realistic that would really be - perhaps a complete waste of time.
FWIW, I still have the hardware to test on :). So, I can help if testing is the concern. Obviously, that doesn't scale though.
- ssp
Me too. Most of us still do. There's been talk of DHL/UPS or use of a hammer[1] (not a joke) but so far all is still present. Of course we'd need to be booting a TOT kernel on the hardware to really validate things (an interesting project in itself) :) - this may be the way to go if DHL/hammer/dynamite/nukes are not going to be required long-term
[1] Johan will be doing this : https://youtu.be/5ku0rI0o6rg [2] Alex will be doing this : https://youtu.be/wcW_Ygs6hm0 _______________________________________________ greybus-dev mailing list greybus-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/greybus-dev
Hi Alex,
On Tuesday 29 Nov 2016 09:36:11 Alex Elder wrote:
OK now that we have lists and IRC in place, it's time to start using them. Bryan (at least) has posted some patches for review but if Greybus is going to provide some greater long-term usefulness it will need to be adapted to be more easily used in contexts outside Project Ara.
There was some informal conversation about this at ELCE. I have a few of my own thoughts but mainly I just want to get some discussion started to see if we have some pieces we can agree on, and take things from there. Here's a short summary of what's below:
- Retargeting Greybus for use in IoT seems reasonable
IoT is nothing but a buzzword. We need to define what kind of systems we're targetting, and what value we're trying to bring to them. Communication with remove sensors is nothing new, we're competing here with protocols that have existed for decades on field buses (Modbus, Profibus and CAN immediately come to my mind, but there's dozens of other competitors). I don't want greybus to be yet another field bus, if we decide to target that market we need to do better than existing solutions, at least on a given set of criteria that we target.
- We will need to adjust the abstract model currently implemented for Greybus to match the new target
- Certain core functionality should be useful as-is; but some other features will need to be re-thought and redefined.
- We will need to evolve the Greybus kernel code to define what is truly "core" functionality, and what that core needs from its environment.
- We will need to ensure the Greybus API is stable, and that our versioning design is sound.
One thing that came up multiple times in October was the notion that Greybus could serve as the basis for communication among entities in an Internet of Things system. I agree with this, at least in part. We have set up a system with some well-defined mechanisms for encapsulating messages, along with a model of remote procedure calls that provide a pretty robust way of getting things done across a network. The core code implements a lot of features (like timeouts and message cancellation) that are very useful, and which should really be done in a generic way. We've got code and conventions in the existing protocol drivers that provide good examples of how to use the core functionality. I think it's reasonable to pursue adapting Greybus to be usable in IoT environments.
In any case, one thing that occurred to me during that week and those discussions was that we really need to define a new *target* for Greybus. That is, we no longer have the Ara phone as the hardware target, and we need to somehow define another ultimate goal for the hardware or environment in which Greybus operates. This should be more abstract than a hardware definition; instead it ought to define properties of and services provided by the entities communicating in a Greybus system. In some ways we already have that (Interfaces and Modules are abstract, but the details of what they represent may no longer match what is required).
I think the things that Greybus defines now that can be pretty universally useful are the core concepts:
- generic Greybus host device driver interface
- connections with fixed protocols that define how messages carried over them are interpreted
- the format of messages, and the generic message header
- the overall messaging model, including sending, receiving cancelling messages
- the operations RPC model, including completion semantics (asynchronous completion, unidirectional operations, first error result prevails, and the ability to have multiple outstanding operations)
From there we get into some things that are almost certainly useful, but there may need to be some changes:
- The grouping of connections into bundles, which attach to Linux device drivers. (I think we need this, but there remains some work to do, especially in relation to the next item.)
- Manifests to describe module/interface functionality
- Control connection and how it's used
And we can keep going into other things that become more and more likely to be unnecessary or just plain wrong when we are targeting something different from an Ara phone:
- SVC and the SVC protocol
The above is not at all exhaustive; I just wanted to try to identify a few specific things we can maybe start to agree on.
Currently, the control protocol and SVC protocol are very much biased toward the Ara hardware. (Other protocols are too, like time sync and maybe firmware update.) Furthermore, pieces of these have necessarily made their way into core Greybus code. As we define a new non-Ara target, we need to figure out what parts really belong in the Greybus core, and which things need to be supplied either by external entities or by protocol drivers. One way to do that might be to implement the core code as a library, but to be honest I think the real work lies in teasing things apart so the core can be defined to supply certain well-known services, with hooks to allow other capabilities. For a (contrived) example of what I mean, we may need to provide hooks for setting up connection routing rather than implementing it in the core code. In any case, I think we need to look at what constitutes the true "core" of Greybus services and what that core needs from its environment in order to be used.
If Greybus is going to provide a more general service we need to ensure it provides a stable API. We have structured things this way since the beginning, but I fear we may have gotten sloppy because we basically always packaged everything together. As it is, all the versioning is in place but to my knowledge we've never really tested it to make sure it works.
I had another point which I've now forgotten... In any case, I really just hope to get some conversation going.
What do you think?
On 11/29/2016 09:36 AM, Alex Elder wrote:
OK now that we have lists and IRC in place, it's time to start using them. Bryan (at least) has posted some patches for review but if Greybus is going to provide some greater long-term usefulness it will need to be adapted to be more easily used in contexts outside Project Ara.
OK I've been out of the country (I still am) for a week and was pretty preoccupied before I left; sorry I didn't weigh in on things earlier.
I'm going to summarize a bit.
A summary of the summary bullets that follow: - Defining a new target for Greybus seems cool. "IoT" is not an adequately defined target. - It should be reworked for other applications, but should not abandon the existing UniPro support - Compatibility with the Motorola Z code is desired - Motorola used Greybus mainly for control protocols (primarily because of excessive power consumption--which is not really a Greybus issue, per se) - It's going to take some effort to incorporate the Motorola code, independent of any re-targeting of Greybus - We should continue to keep the spec as a definitive statement of the design.
And now more detail: - Agreement that the SVC, control, etc. protocols are fairly specific to the Ara hardware platform, and that will need to change - Laurent pointed out that "IoT" is a current buzzword; we need to be more clear about the details and requirements of our target. And there's no point if we aren't demonstrably better than existing solutions. - Bryan questioned whether we were dropping UniPro support, and I concur with Laurent that there's no reason to do that--we'd want to just modularize things so UniPro was *one* possible transport. - Laurent expressed concern that we should be careful to ensure Motorola's needs can be met by whatever Greybus becomes - Bryan asked about continued use of NuttX. - I don't know the status of the NuttX code; Greg might. - I personally wish we could try to make the module side be a portable core set of code with hooks to link into an OS (like NuttX or Zephyr). I can't comment on how suitable the current NuttX code is for that sort of thing. - Laurent seized on the opportunity to ding Gerrit, which I endorse. Michael sheepishly and in vain tried to come to Gerrit's defense. - Bryan asked about what hardware we might select for host, transport, and modules. - Sandeep said he still has Ara hardware, as does Viresh. - My comment: This will be good for validation, but really we need to also be evolving toward something else. - Bryan offered a definition of "IoT", based on the notion of small edge devices having Internet connectivity. He thinks Greybus being self-describing, hot-pluggable, and transport agnostic is what makes it interesting for such an application. - Laurent asserted that Greybus can't be transported over the Internet. (I don't completely understand that statement.) - Laurent feels Greybus could be useful for use by sensors and other tiny embedded devices--which might include IoT but which probably goes beyond whatever IoT really represents. There are other field buses though, and it's not clear what advantage Greybus offers. - Jim Wylder jumped in and gave a nice overview of how Motorola actually used Greybus. - There has been a desire to stay connected with the upstream code, but they simply had to diverge. (It seems there is still a wish to preserve some sense of compatibility.) - They added a switching layer to abstract the UniPro transport, allowing others (I2C and SPI) to be used instead. - Practically speaking Greybus over UniPro consumed too much power, so they didn't use that (though it's supported). - Greybus used for control traffic for high-speed links, as well as for simple/low bandwidth protocols - There remains an SVC abstraction, but it is mostly stubbed out. Connection setup/teardown for routing are the main uses of the SVC protocol. - Protocol versioning needed some rework to be useful. - Jim pointed out that there are some broader concerns that should be addressed (security in particular).
- We ought to work on a plan for integrating the Motorola fork and the upstream Greybus kernel code. - Bryan pointed out that "gbsim" provides a model of system behavior that is relatively current. He suggested that we could use that as a tool for bringing together the Motorola and upstream code. Jim said Motorola did not do anything with "gbsim." - Bryan also suggested a process of cherry-picking Motorola code into the Greybus upstream. - We have generally been disciplined about keeping the spec up-to-date as we developed the code. Now should be no different, and we need to use the spec as a tool for defining and showing agreement on design. - Greg pointed out that the spec has Creative Commons BY-SA 4.0 license. Yip skip!
I have more to say--some actual feedback--but I'm about to board a plane. I may get something out now but if I don't finish, I hope to do so within a day or so.
-Alex
There was some informal conversation about this at ELCE. I have a few of my own thoughts but mainly I just want to get some discussion started to see if we have some pieces we can agree on, and take things from there. Here's a short summary of what's below:
- Retargeting Greybus for use in IoT seems reasonable
- We will need to adjust the abstract model currently implemented for Greybus to match the new target
- Certain core functionality should be useful as-is; but some other features will need to be re-thought and redefined.
- We will need to evolve the Greybus kernel code to define what is truly "core" functionality, and what that core needs from its environment.
- We will need to ensure the Greybus API is stable, and that our versioning design is sound.
One thing that came up multiple times in October was the notion that Greybus could serve as the basis for communication among entities in an Internet of Things system. I agree with this, at least in part. We have set up a system with some well-defined mechanisms for encapsulating messages, along with a model of remote procedure calls that provide a pretty robust way of getting things done across a network. The core code implements a lot of features (like timeouts and message cancellation) that are very useful, and which should really be done in a generic way. We've got code and conventions in the existing protocol drivers that provide good examples of how to use the core functionality. I think it's reasonable to pursue adapting Greybus to be usable in IoT environments.
In any case, one thing that occurred to me during that week and those discussions was that we really need to define a new *target* for Greybus. That is, we no longer have the Ara phone as the hardware target, and we need to somehow define another ultimate goal for the hardware or environment in which Greybus operates. This should be more abstract than a hardware definition; instead it ought to define properties of and services provided by the entities communicating in a Greybus system. In some ways we already have that (Interfaces and Modules are abstract, but the details of what they represent may no longer match what is required).
I think the things that Greybus defines now that can be pretty universally useful are the core concepts:
- generic Greybus host device driver interface
- connections with fixed protocols that define how messages carried over them are interpreted
- the format of messages, and the generic message header
- the overall messaging model, including sending, receiving cancelling messages
- the operations RPC model, including completion semantics (asynchronous completion, unidirectional operations, first error result prevails, and the ability to have multiple outstanding operations)
From there we get into some things that are almost certainly useful, but there may need to be some changes:
- The grouping of connections into bundles, which attach to Linux device drivers. (I think we need this, but there remains some work to do, especially in relation to the next item.)
- Manifests to describe module/interface functionality
- Control connection and how it's used
And we can keep going into other things that become more and more likely to be unnecessary or just plain wrong when we are targeting something different from an Ara phone:
- SVC and the SVC protocol
The above is not at all exhaustive; I just wanted to try to identify a few specific things we can maybe start to agree on.
Currently, the control protocol and SVC protocol are very much biased toward the Ara hardware. (Other protocols are too, like time sync and maybe firmware update.) Furthermore, pieces of these have necessarily made their way into core Greybus code. As we define a new non-Ara target, we need to figure out what parts really belong in the Greybus core, and which things need to be supplied either by external entities or by protocol drivers. One way to do that might be to implement the core code as a library, but to be honest I think the real work lies in teasing things apart so the core can be defined to supply certain well-known services, with hooks to allow other capabilities. For a (contrived) example of what I mean, we may need to provide hooks for setting up connection routing rather than implementing it in the core code. In any case, I think we need to look at what constitutes the true "core" of Greybus services and what that core needs from its environment in order to be used.
If Greybus is going to provide a more general service we need to ensure it provides a stable API. We have structured things this way since the beginning, but I fear we may have gotten sloppy because we basically always packaged everything together. As it is, all the versioning is in place but to my knowledge we've never really tested it to make sure it works.
I had another point which I've now forgotten... In any case, I really just hope to get some conversation going.
What do you think?
-Alex
greybus-dev mailing list greybus-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/greybus-dev
On Sat, Dec 10, 2016 at 06:21:42PM -0600, Alex Elder wrote:
- Bryan asked about continued use of NuttX.
- I don't know the status of the NuttX code; Greg might.
I don't know this either, but will try to figure it out this week as I'll be able to bug the people responsible for this in person :)
thanks,
greg k-h
On 12/11/2016 01:21 AM, Alex Elder wrote:
- Bryan asked about continued use of NuttX.
- I don't know the status of the NuttX code; Greg might.
- I personally wish we could try to make the module side be a portable core set of code with hooks to link into an OS (like NuttX or Zephyr). I can't comment on how suitable the current NuttX code is for that sort of thing.
I'm currently writing a Greybus stack for Zephyr. As I'm working on it during my spare time, it doesn't progress as munch I would like but I'm planning to upstream the greybus core (control protocol and manifest support) and the loopback protocol during the Christmas holiday. About Nuttx, we are far from mainline so it will requires some work but I'm still considering to do it because it supports more platform than Zephyr.
Thanks, Alexandre