treczoks

Documenting the LEGO PoweredUp! System

Recommended Posts

6 hours ago, TrainDragon said:

Well, when I began this, there was no information on the method used for communication.  As far as I can tell, nobody else has ever published any information about the wired signals, only the BTLE.  So hooking up the probes of a logic analyzer was the best choice to quickly figure that out. :)  The protocol decoder grew out of that.  You absolutely could replicate this with an Arduino or similar, sure.

Of course. From that start point I would have used an oscilloscope, too, just to get an idea what is happening. The logic analyzer is still stuck in the budget pipe...

6 hours ago, TrainDragon said:

Absolutely.  I think the Wiki suggestion is the best for documentation.

And we can easily get everything under one hood, hardware tear downs, wired communication, wireless communication, even frameworks and libraries and their documentation. I know one can start a wiki-based project on sites like wikia, but I have not yet investigated how this all works. What I'm not going to do is host a server and run my own wiki engine there - I've had a wiki in my home network for test purposes, and it was a pain to keep up with the target system, well, at least back then. So I'll have to look for a turnkey solution, somehow. I'm not sure about the costs involved, either.

10 hours ago, Bartosz said:

So, to have it git/svn friendly, you can store it as fodt: https://wiki.documentfoundation.org/Libreoffice_and_subversion

No, that is not my intention. I use SVN at work for the software and documentation I write, but my documentation project uses the odt file only as a temporary measure. It is basically my digital lab book.

With all the different sources, and different areas of interest and expertise, we'll probably need a wiki. I'll add this to a list of questions I'll have to deal with for t his project.

At the moment (as in until and including next Tuesday) I'm busy workwise. But I hope I then get a bit of breathing room until January so I can deal with the color sensor, maybe even the Batmobile motors, document all this, and maybe, just maybe, even building something again...

Share this post


Link to post
Share on other sites
On 12/14/2018 at 2:12 AM, treczoks said:

Of course. From that start point I would have used an oscilloscope, too, just to get an idea what is happening. The logic analyzer is still stuck in the budget pipe...

You can get a basic model for very cheap.  I'm using a clone of the "Saleae Logic 8" that i got on eBay for under $10.  Only 8 channels, but that has been more than enough to help me debug simple issues with my projects, be it I2C, UART, or SPI.

 

On 12/14/2018 at 2:12 AM, treczoks said:

I know one can start a wiki-based project on sites like wikia, but I have not yet investigated how this all works. What I'm not going to do is host a server and run my own wiki engine there - I've had a wiki in my home network for test purposes, and it was a pain to keep up with the target system, well, at least back then. So I'll have to look for a turnkey solution, somehow. I'm not sure about the costs involved, either.

I agree, self-hosting a wiki is more expense and work than I'd want to undertake, too.  I looked around for free wiki hosting sites.  I have never used it before, but ourproject.org seems like it might work for this.  It's free, and has been around for a number of years (and so I'm less worried that they will suddenly shut down one day, disappearing the info we build.)  What do you think?

Share this post


Link to post
Share on other sites
8 hours ago, TrainDragon said:

You can get a basic model for very cheap.  I'm using a clone of the "Saleae Logic 8" that i got on eBay for under $10.  Only 8 channels, but that has been more than enough to help me debug simple issues with my projects, be it I2C, UART, or SPI.

I know that, I was talking about a logic analyzer for work, not for home. Maybe I'll get one of the smaller Saleae for home one day, though.

8 hours ago, TrainDragon said:

I have never used it before, but ourproject.org seems like it might work for this.

I'm not sure if they will take us in. They seem to do open source things, but it looks like they are more aimed at sociological/political work. But thanks for the link, I'll investigate further.

The other way would be to get a professionally hosted wiki, and my web hoster seem to offer such things for ~€5-10 per month, which I would be willing to invest. Bt if I get a good free solution, why not.

One of the key issues, though, would be what wikia version and which add-ons they offer.

Share this post


Link to post
Share on other sites

You will like to know that LEGO made the specs of the LWP (LEGO Wireless Protocol) publicly available at github:

https://github.com/LEGO/lego-ble-wireless-protocol-docs

It's a very good sign that LEGO is using github (not because of github itself but because of open source as a whole - MIT license was adopted for this docs).

And thanks for naming me, I really like that "I could only see that far because I'm standing on the shoulders of giants" quote since I read it once on a Carl Sagan book, lots of people before us made this possible.

Share this post


Link to post
Share on other sites
3 hours ago, AVCampos said:

Thanks for posting this! So far, I only found this and Jetros LAN post, but no kind of official announcement. So where did you find this information?

I just glanced over the docs, some is useful, some is not, some corrects my findings (and I will fix my document accordingly), and quite a lot points into new directions.

I will revise and expand my document accordingly, soon, but not before Christmas. Reproducing and verifying this information will take time.

And I will revise my list of questions, too...

Share this post


Link to post
Share on other sites
25 minutes ago, treczoks said:

So far, I only found this and Jetros LAN post, but no kind of official announcement. So where did you find this information?

I also found it from Jetro on the LAN. :snicker:

Share this post


Link to post
Share on other sites

As we say in Portugal, a little bird told me, this morning ;)
I think it's a sign of good will and also an experiment - LEGO is probably keepin attention to reactions and if people use it (and people will use it ;) then will probably add more details, maybe even a sort of SDK.

By the way, LEGO App for BOOST now has an integration with LEGO LIFE App and it is now possible to share projects with other friends (almost) all over the world. And Powered Up items on LEGO Shop are expected soon (or already?) so things are "gaining momentum".

Edited by MajorAlvega

Share this post


Link to post
Share on other sites
Just now, MajorAlvega said:

And Powered Up items on LEGO Shop are expected soon (or already?)

Yes, most are already available. But you'd better off buying the PUp hub (the one on the trains and the Batmobile) on BrickLink: its price at S@H is absurd.

Share this post


Link to post
Share on other sites

Hey folks, the documentation is a xmas gift to the community :sweet: And it tells us a lot about the potential of the new system. LEGO itself had not enough time (and perhaps not enough resources) to offer the final solution in one step, since LEGO is at first a toy manufacturer and not an IT company. But I'm absolutely confident there will come more .. Programming the PU hub in the new app is a promising step in the right direction.

And please, let's stop discussing about the component prices at the LEGO shop, They disapperared very short after beeing published (by mistake?). It seems, there is a lot of internal discussion at LEGO. I decided for myself to be a little patient ...

Merry christmas to all!

Share this post


Link to post
Share on other sites

Now THIS is something I’m very happy to see! A lot of useful information in here!

I’d suspected there was a bit more to peripheral subscription modes, but wasn’t quite sure how to find out. I also didn’t realize that you can set individual motor acceleration curves. I’m eager to try all this when I get back to my PUP components in the new year.

I also now wonder of this is implemented on each hub (The PUP hub and Move Hub don’t seem to implement everything the same for example)

I’d also like to see some documentation for the individual peripheral commands rather than just the BLE wire protocol.

Either way, I’m very happy that this is out there, and especially on GitHub. :) Such a great sharing platform.

Edited by Mr Hobbles

Share this post


Link to post
Share on other sites

Yse, that's really good news.

And as hoped and desired it's not called "PuP" or "boost", but includes the whole family, WeDo and DUPLO  as well.

Very Good!

 

 

Share this post


Link to post
Share on other sites
51 minutes ago, Lok24 said:

Yse, that's really good news.

And as hoped and desired it's not called "PuP" or "boost", but includes the whole family, WeDo and DUPLO  as well.

Very Good!

 

 

Yeah, in fact there seem to be several references to the hardware being LPF2 (Lego Power Functions 2), as also referred to on the replacement pieces website.

Interesting that the BLE protocol is called Lego Wireless Protocol 3.0 - I wonder what 1.0 and 2.0 were?!

Share this post


Link to post
Share on other sites
9 minutes ago, Mr Hobbles said:

Interesting that the BLE protocol is called Lego Wireless Protocol 3.0 - I wonder what 1.0 and 2.0 were?!

Maybe 1.0 is the NXT and 2.0 the EV3? Those are the only other LEGO products (that reached the market, at least) that use Bluetooth.

Share this post


Link to post
Share on other sites
34 minutes ago, AVCampos said:

Maybe 1.0 is the NXT and 2.0 the EV3? Those are the only other LEGO products (that reached the market, at least) that use Bluetooth.

I doubt this would be the correct justification.
While NXT and EV3 have a BT interface, it is not BLE, and also there is not an associated wireless protocol like it is implemented in firmware for PuP, Boost & family...

I believe this is the first public release of the protocol, preceded by two other major internal releases. 

Share this post


Link to post
Share on other sites

Initially I would agree with Conchas, the simplest explanation would be that this is the 3rd major release of the documentation.
but... the first sentence of the document says:

"The LEGO Bluetooth 3.X Hub Profile consists of a single Bluetooth LE GATT service."

And WeDo 2.0 Profile has more than one BLE GATT service. There was a big revision from WeDo 2.0 to BOOT/Powered Up, consolidating every functions in just one service (characteristic) and implementing OTA (over the air) firmware upgrades, some networking (mesh) functions and multi-mode (master and slave at same time). So WeDO 2.0 is probably LWP 1.x or maybe 2.0.

Edited by MajorAlvega

Share this post


Link to post
Share on other sites
53 minutes ago, Conchas said:

But your observation is consistent with the explanation I advanced!  :wink:

almost :)
WeDo 2.0 would have been also a public release.

Share this post


Link to post
Share on other sites

Hi,

I checked the released documentation but I found it kind of preliminary. Eg. the virtual port setup is not working (it is mentioned in the doc though) and also I'm using subcommand 0x60 to operate the motors, but it's not even mentioned. This subcommand was reverse engineered by someone else.
So it seems that the doc is still in progress and and also the PUP hub (and most probably the Boost hub) will need firmware update to take advantage of what is written.
BTW I have a working application that utilizes the PUP hub (Boost support is coming): https://github.com/imurvai/brickcontroller2
If I have some free time I'll try to sniff the BT communication and see what the official app is doing...

Share this post


Link to post
Share on other sites
22 hours ago, imurvai said:

I checked the released documentation but I found it kind of preliminary.

I second this. I also found things documented that don't work in reality. As soon as possible I'll release my first findings - I'm currently adding pages after pages to my notes, while juggling Christmas and my mother-in-law who went to hospital yesterday...

Share this post


Link to post
Share on other sites

One advantage of LEGO released this in github is that we can open issues (people already did since it was announced).
So guys please open suggestions and/or point incorrections there.

Share this post


Link to post
Share on other sites
On 12/24/2018 at 3:38 PM, MajorAlvega said:

One advantage of LEGO released this in github is that we can open issues (people already did since it was announced).
So guys please open suggestions and/or point incorrections there.

Looks like I have to join another website, then. Somehow I knew this was opening a can of worms.

Share this post


Link to post
Share on other sites

Hi @treczoks,

quick question: Do you still continue your very nice PuP software re-engineering and (proper) documentation?

To be honest, to me your documentation is the most valuable. The information is not scattered or written in "insider-type" language. For example I have a hard time in figuring out what the LEGO documentation wants to tell me, but that is entirely me of course. In contrast, I do understand almost everything you were assembling.

Just asking.

All he best,

Thorsten    

Share this post


Link to post
Share on other sites
2 hours ago, Toastie said:

quick question: Do you still continue your very nice PuP software re-engineering and (proper) documentation?

Yes, but I'm a bit busy at the moment - an impeding death of a close family member has take a lot of time and Christmas spirit this season...

 

2 hours ago, Toastie said:

To be honest, to me your documentation is the most valuable. The information is not scattered or written in "insider-type" language. For example I have a hard time in figuring out what the LEGO documentation wants to tell me, but that is entirely me of course. In contrast, I do understand almost everything you were assembling.

Thank you. That was my goal. On top of this, I want to turn my writings into a wiki as the linear document style is getting awfully long and difficult to read (I extended the documentation whenever I could clear my mind and my timetable), but those plans are on the back burner at the moment, too.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.