Jump to content

Recommended Posts

Posted
Just now, ruppie said:

The possible mistake was the size of your array is 16 bytes

     byte 

No. The exception is present also without send any message.

The difference it's made only by the presence (or not) of the NOTIFY property.

Posted

Do you have cross checked the peaviour of the "simulated hub" how notifications behaves if using nrf connect insted of lego for test.

I have read a while ago, that therea are some issues about what is correct way to work with notifications within ESP BLE framework.especially with Arduino

Havent had the tim to follow,or check  i worked with nrf52840 before.

Possibly plain espressif framework must be used or even another plattform... we will see;-)

 

But thats the intererting details, i still think that the basic concept will work ;-)

1 hour ago, GianCann said:

This is my code to try the emulation of a PUP Hub

https://github.com/GianCann/ATS/tree/master/ESP32_LEGO

With this code I get that the LEGO App connecting to my ESP32 and send some initial requests to the Hub...

But there is a problem: The LEGO App crash with the NOTIFY property set to the characteristic.

In you remove BLECharacteristic::PROPERTY_NOTIFY from the characteristic's constructor (line 93) the LEGO App works but it's not able to receive notification from the Hub (so, isn't useful).

  

Posted
On 7/17/2020 at 7:25 PM, Mr Hobbles said:

My comments about the remote are more because while I'm aware it does advertise the same BLE services and characteristics as other hubs, even using the same LWP protocol for advertising its buttons as internally attached devices, it doesn't appear to work the same way when connecting to other hubs. There appears to be a bonding process used to pair the two together

@Mr Hobbles have you seen the H/W Network command?
I discovered that the Remote Control can act only as RC or Role Peripheral...
So, is the Hub that act as Central Role when connected to the Remote Control.
In other words, is the Hub that subscribe the Port Value notification from the remote control to obtain the status of the buttons.

Posted
10 hours ago, GianCann said:

But there is a problem: The LEGO App crash with the NOTIFY property set to the characteristic.

I reply to myself :laugh:

I found the problem: The Characteristic was missing the default value 0x2902.
Now everything works perfectly: the LEGO App connects to my ESP32, receive the notify of the presence of the (fake) motors on ports A and B, and the ESP32 receive the action commands sent from the App (i.e.: start/stop the motor, change hub light...)

Posted (edited)
16 hours ago, GianCann said:

I reply to myself :laugh:

I think you are talking about the missing "descriptor" not characteristics as shown here; Arduino notify example"  pCharacteristic->addDescriptor(new BLE2902());"                                                                                                                                      Besides that i now have implemented an notification callbacks that is  to implement basic connection profiles, control+ expected for specific modell , like technic Hub does.

 

Note:

I had problem with unspcific connection loses when ativating "Nitifications in NRF Connect. Very suprisingly i had no errors as long as i keep compiler settings like:

build_flags = -DCORE_DEBUG_LEVEL=5

 What is equel to "Core debug level >Verbose< in Arduino.          

  Reason unknown ut solution as follows: 

   Do it like;

.....
   BLECharacteristic LEGOCharacteristic(CHARACTERISTIC_UUID, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE | 
                                                                 BLECharacteristic::PROPERTY_WRITE_NR | BLECharacteristic::PROPERTY_NOTIFY);
      
 pService->addCharacteristic(&LEGOCharacteristic);
      .......
            //and later on
            LEGOCharacteristic.setValue(CharValue,15);
            LEGOCharacteristic.notify();

    instead as  shown in the  ESP_ARDUINO  example

 // Create a BLE Characteristic
  pCharacteristic = pService->createCharacteristic(
                      CHARACTERISTIC_UUID,
                      BLECharacteristic::PROPERTY_READ   |
                      BLECharacteristic::PROPERTY_WRITE  |
                      BLECharacteristic::PROPERTY_NOTIFY |
                      BLECharacteristic::PROPERTY_INDICATE
                    );
  //and later on
    pCharacteristic->setValue((.....);
    pCharacteristic->notify();
        

I don't now why, but by using a explicit Characteristics object , Problem no longer exits. Sometimes its all about the details 

Edited by ruppie
Posted
2 minutes ago, ruppie said:

I think you are talking about the missing "descriptor"

Yes. Default 'descriptor' for characteristics.

3 minutes ago, ruppie said:

control+ expected for specific modell , like technic Hub does.

I change my code to emulate a City Hub (aka Train Hub) for my comodity, but is so simple to impersonate the Technic Hub.

You need only to send more info to the App for the 4 ports and various internal sensors.

Now I want to investigate about "Hardware Family" (support, at this moment, only on City Hub).

6 minutes ago, ruppie said:

Do you have an idea what may cause this ?

No. Sorry...

Posted (edited)

@GianCann: Nice to see, many thanks for your contribution and your efforts made by testing my idea during this weekend, even you are n vacaton. .  I meanwhile have  made a sucessfull similiar crossheck with some control+ modell profiles. A Workbase has been build, will be interesting to  see if we are able to sucessfully spread this idea to others,

 

 

Edited by ruppie
  • 2 months later...
Posted

I think I'll lurk here for a while to see what you come up with...

Based on Philo's work, I've been trying to figure out how to make my own hub. But the protocol LEGO is using is... Weird, to be honest. Like Philo I'm getting a lot of framing errors and there don't seem to be any standard package size. 

Posted
On 10/4/2020 at 9:27 PM, f2k said:

I think I'll lurk here for a while to see what you come up with...
 

1. Simply ask @GianCann about his ESP32 color sensor example for refrence, it will help you a lot ;-)

2. I have moved to a slightly different direction, where i actually do not use PU Motors and Sensors and finished this project a while ago: As you can see here:

 

I came back using PU Sensors later, on.

I have noticed, that timing during UART communication setup sequence is the key, for that reason i power up the 3.3V supply to the PU sensors at a later stage, when i am shure that the int sequence of my "Host" controller has been finished. Again: Feel free to ask @GianCann for help in the meantime

 

  • 2 weeks later...
Posted

Hey guys. It seems like we've all been working towards the same end. I developed a hub that works with control+, Spike prime, WeDo 2.0, and powered-up motors and sensors. It's programmed with the Arduino IDE. It's live on Kickstarter right now, as of a couple of days ago. Unless you're set on making your own hub, you should check it out and see if it meets your needs. It's all open source and it's got Bluetooth and WiFi. Here's the link: https://www.kickstarter.com/projects/spacecadet/evlono-one

  • 2 weeks later...
Posted (edited)
On 10/21/2020 at 2:20 AM, TheSpaceCadet said:

check it out and see if it meets your needs. 

Short answer to the question: No, it does not meet at least one of my requirements. For that reason i decided to build my own solutions.

Long answer: Beside the fact , that is does not fit any of my needs, it makes our world more colorful having people like you and produtcs like yours. I think diversity is the key ;-)

It looks like a evolution of this basic concept:

https://www.crowdsupply.com/keith-packard/snekboard

Edited by ruppie
Posted
19 hours ago, ruppie said:

Short answer to the question: No, it does not meet at least one of my requirements. For that reason i decided to build my own solutions.

Yes that's actually the same line of connectors I used in my device, just the 4-pin versions! It looks like I may have missed the mark overall, though - it's not doing very well on kickstarter. I think maybe my demos and page isn't too great. What are the things you're looking for that it doesn't do for you? I'm not trying to sell to you, but this is great feedback so I'd be interested to know. 

Posted

Simple answer, Produkt presentation Is one year to late.

Meanwhile I maturised myself In softwaredevelopment as  well  as in Electronic to solve  all requifements I am facing by myself.

Abort KIckstarter: I think you stept into  Same trap  as Keybrick one and other.

Neither such portal,nor an BrIckfan Forum are  a good  place for  Produkt presentation. You should  find  a venture  capItal Investor instead 

Posted
17 hours ago, ruppie said:

You should  find  a venture  capItal Investor instead 

That is true - however - >after< serious, as comprehensive as possible, market analysis. That is >one< of the things that are ultimately required, when going the business route. Call it Kickstarter (which implies a little playin' - and which it is not, not at all), call it founding a small business.

Get your act together: What is out there? What is out there? What is out there? Who is competing? What are the odds? What is out there? 

 

And then - after all that - you may want to seek an investor. What I have seen: These folks are tough. And they don't mess around. They want their money+++ back.

Best
Thorsten

 

Posted
9 hours ago, Toastie said:

"Call it Kickstarter"

Best
Thorsten

You may have noticed, "Keybrick one" is a good example for that, that platforms like kickstarter are not the best locations for product presentation and in many places the wrong place if you are interested reaching a wider range of possible cutomers.

On the other : Interesting to see that, Kick starter campaigns about classic board games easily   reach their (often high) targets, and "technic nerd products" often fail  

The main problem in  own opinion: It eems that many people open a kickstarter campaign, because it seems that they do not have a real idea / use case / concept about their products. As a result they often fall into the trap to  become to dependent on meanings and ideas of others nstead following their plan .

As a result: These ideas are "disscussed until they are dead".  

Posted
11 hours ago, ruppie said:

The main problem in  own opinion: It eems that many people open a kickstarter campaign, because it seems that they do not have a real idea / use case / concept about their products. As a result they often fall into the trap to  become to dependent on meanings and ideas of others nstead following their plan .

That was what I meant. And again: Plus, people often do not >seriously< pursue "Step_1" when wanting to go on the market: What is already out there, check IP IP IP, go back, what is already out there, and who is directly competing?

Oh well, what do I know: SOE. I am just guessing.

Best
Thorsten
 

Posted

Wow this is always very insightful. I guess it's true that I was relying on other folks' imaginations for use cases, since that's what individual brick elements are really all about. The whole idea of LEGO is interchangable parts, so while it's probably impossible to assign a single use case to a piece, the creator of the individual part should do more to show use cases. And yeah, I looked at Keybrick One and thought it was a great gap filler to LEGO Powered Up hub, but then it failed. It's sad, since there are plenty people who can benefit from such a thing. If not Kickstarter, I'm not sure where to do. I think I needed to start much smaller, probably in the DIY electronics space with a development board type of thing instead of a fully certified, fully featured thing. Venture capital seems out of the question, since I'm not trying to make a ton of money - I want to bridge the gap between Lego Mindstorms and the relatively small group of people who can both program (text syntax style, not Lego block style) and love Lego. I don't think a venture capital type of person would see big money there - I sure don't. And yeah LEGO has some IP around their new connector, so it's going to be hard to really get in the game with any group of people who aren't willing to hack their way through something. 

Posted

@TheSpaceCadet: Solution for you is quite simple, from my point of view, and my experience i made during the last year.

1. Yes of course, look around, and follow discussion, be inspired by the work of others.

2. Conentrate and stay focused on your requirements nly, do not waste your time on kickstater, do not waste your time in endless discussions what others may think about your plans.

3. Simply do your products by yourself and just impress us with your result (if your like).

4. The only person that has to be satisfied  by your project is you ;-)

 

Posted
2 hours ago, TheSpaceCadet said:

And yeah, I looked at Keybrick One and thought it was a great gap filler to LEGO Powered Up hub, but then it failed. It's sad, since there are plenty people who can benefit from such a thing. 

From my point of view it is always the same, during the last year, me and other tried o attract others to come together to fill the number of gaps. In the end, with only litle feedback from inside the "neerds community" and absolutely none feedback from the big group from potential users / customers.Same with keybrick: During the period "others" are asked for serious support, nearly no reaction. Once is it gone : Same people wondering and asking ?!.

 

  • 2 weeks later...
Posted
On 10/10/2020 at 7:15 PM, ruppie said:

1. Simply ask @GianCann about his ESP32 color sensor example for refrence, it will help you a lot ;-)

2. I have moved to a slightly different direction, where i actually do not use PU Motors and Sensors and finished this project a while ago: As you can see here:

 

I came back using PU Sensors later, on.

I have noticed, that timing during UART communication setup sequence is the key, for that reason i power up the 3.3V supply to the PU sensors at a later stage, when i am shure that the int sequence of my "Host" controller has been finished. Again: Feel free to ask @GianCann for help in the meantime

Sorry about the late reply. I got sidetracked by another project...

I must admit that the idea of not powering peripherals before the Arduino was ready hadn't crossed my mind. I'm not too sure though... As I understand what Philo has written about the protocol, it's the hub that's supposed to initiate communications. But I might have gotten that wrong...?

Your new projects sound interesting. I was looking into using an old 16 channel transmitter myself at one point. But eventually I decided I wanted to go in a direction that would facilitate autonomous operations. A remote controlled robots is pretty much the same as my remote controlled cars, so I don't find that route particularly interesting.

Posted

Hello,

1. Most important: @GianCann had passed away , this week.

2. I am also attracted by other projects "during a longer period".

I think, you hould have a look to the Pybrick project documentation.

Posted
1 hour ago, ruppie said:

Hello,

1. Most important: @GianCann had passed away , this week.

2. I am also attracted by other projects "during a longer period".

I think, you hould have a look to the Pybrick project documentation.

Yeah, just saw the news. Feeling a bit sad now...

Sigh,,, 2020 can't end fast enough if you ask me.

I guess no one else has had a look at his code? 

I'll have a look at Pybrick. Thanks for the suggestion. Though I'm not sure how comparable the Spike architecture is to an Arduino...?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...