Code Monkey home page Code Monkey logo

Comments (5)

h2zero avatar h2zero commented on May 26, 2024

Is the device you are connecting to advertising when you attempt to connect? If not, then it will fail since it will not be listening for connections.

from nimble-arduino.

flynny75 avatar flynny75 commented on May 26, 2024

Yes, the server is advertising. The entirety of the server code for this scenario is

        NimBLEDevice::init("NimBLE_light_sleep");
        auto bleServer = NimBLEDevice::createServer();
        auto advertising = NimBLEDevice::getAdvertising();
        auto service = bleServer->createService("1111");
        auto c = service->createCharacteristic("2222");
        c->setValue("3333");

        service->start();
        advertising->start();

There is no change in server behaviour between the delay loops and the light sleep loops

from nimble-arduino.

flynny75 avatar flynny75 commented on May 26, 2024

I am sure this used to work, so I went back through every version of the espressif32 platform. The most recent version that works is 5.1.1, 5.2.0 and onwards do not work, it never reconnects after light sleep. 5.1.1 reconnects with much more reliability (although not 100%, I assume the failed connections are an impact of default connection parameters) after light sleep.

I have uploaded a better sample that uses the neopixel to show if the connection works
NimBLE_light_sleep.zip

from nimble-arduino.

flynny75 avatar flynny75 commented on May 26, 2024

Should I also open an issue in the espressif platform repo https://github.com/platformio/platform-espressif32 ?

from nimble-arduino.

h2zero avatar h2zero commented on May 26, 2024

Yes, I would assume that if the platform change is what affected the operation in this situation that is a bug there and not here.

from nimble-arduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.