Code Monkey home page Code Monkey logo

Comments (4)

jellybins avatar jellybins commented on August 25, 2024

the bleMouse.end() is an empty func; i have same problem and resolved it by soft restart the dev board ;detail in #37

from esp32-ble-mouse.

pjenks-accudyne avatar pjenks-accudyne commented on August 25, 2024

I noticed that too and updated the bleMouse.end() function to kill the task created by bleMouse.begin(), but that didn't fix the problem either. I'd like to avoid a soft restart if possible.

From BleMouse.cpp:

void BleMouse::begin(void)
{
  xTaskCreate(this->taskServer, "server", 20000, (void *)this, 5, &this->taskHandle);
}

void BleMouse::end(void)
{
  vTaskDelete(this->taskHandle);
}

From BleMouse.h:

class BleMouse {
private:
  // some declarations
public:
  // some declarations
  TaskHandle_t taskHandle;
protected:
  // some declarations
};

from esp32-ble-mouse.

Apofus2018 avatar Apofus2018 commented on August 25, 2024

I used the solution from above and added the following
if(bleMouse.isConnected()) { //blah //blah } else { bleMouse.end(); delay(1000); bleMouse.begin(); }
Mouse connected fine .....

from esp32-ble-mouse.

SmuleFlash avatar SmuleFlash commented on August 25, 2024

I tired the solution above, but it nonstop doing bleMouse.begin() after I cycle the iPhone Bluetooth on/off. Therefore I add isConnect() while loop to wait for connection after bleMouse.begin() but it never get out of the isConnected loop. Although Bluetooth connection indicate connected on iPhone after switch off, this solution still unable to reconnect properly. Anyone can help?

from esp32-ble-mouse.

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.