Git Product home page Git Product logo

Comments (10)

ricardoquesada avatar ricardoquesada commented on May 30, 2024 1

@apoll2000 good finding. It seems to be an async functions, so I need listen to the RSSI event, and then update the value internally, so that Arduino can read it.

Not a trivial change, but I'll think what's the best way to integrrate it into BP32

from bluepad32.

ricardoquesada avatar ricardoquesada commented on May 30, 2024

could you be more specific ? which platform ? use case ? etc ( https://tinyurl.com/bluepad32-help )

from bluepad32.

potaka001 avatar potaka001 commented on May 30, 2024

I'm using an ESP32 Dev kit and an Android TV Game controller.
BTstack can get the RSSI value, but how do I get the RSSI value when using Bluepad32?
I would like to check the Bluetooth signal quality by checking the Received Signal Strength Indicator.

from bluepad32.

ricardoquesada avatar ricardoquesada commented on May 30, 2024

I guess are you using Arduino, correct ?

I guess I can put that info in uni_bt_conn... and you should be able to get that info.

But I'd like to understand the use case a bit more.... what do you plan to do with the RSSI ? close the connection if not strong enough ? inform the user ?... the more details you add, easier for me to implement a feature that would be useful for you

from bluepad32.

potaka001 avatar potaka001 commented on May 30, 2024

I would like to record the rssi when input lag is measured.

from bluepad32.

apoll2000 avatar apoll2000 commented on May 30, 2024

Hi, this feature would also be really helpful for me. I am using a PS5 controller as a remote controller with an ESP32 running the bluepad32 arduino library, and reading out the RSSI would be useful as a safety feature so that a drop in signal strength can be detected.
Is it possible to access the RSSI somehow? Thank you very much in advance!

from bluepad32.

ricardoquesada avatar ricardoquesada commented on May 30, 2024

@apoll2000 as a safety measure you can do something similar to what I described here:
#45 (comment)

Regarding RSSI, the entire BTstack API is avaiable for Arduino users... you can call any API.
Wondering what is the API that returns the RSSI... I know the RSSI appears for BR/EDR connections when they advertise...

Not sure how to get it runtime... but if BTstack has that API, then you should be able to call it.
You might need the connection handle, which is not available to the Arduino API, but I can expose it so you can use.... if you can tell me which BTstack API you need to call, I can provide the needed arguments for that API

from bluepad32.

apoll2000 avatar apoll2000 commented on May 30, 2024

Thank you very much for your quick response, I had to read into everything a bit to understand.

The RSSI readout is implemented in the BTStack GAP API, with the function int gap_read_rssi(hci_con_handle_t con_handle), and it indeed requires the connection handle (function listed here in the documentation).

It would be great if you could help me access that from within Arduino.

Also just wanted to say thank you for this great library, it's already helping me a lot!

from bluepad32.

ricardoquesada avatar ricardoquesada commented on May 30, 2024

I've just added some changes so that this issue can be mitigated:

  • BP32.update() returns whether data has been received in any of the controllers.
  • Controller.hasData() returns whether data has been received since BP32.update() was called.

Sketch updated:
https://github.com/ricardoquesada/esp-idf-arduino-bluepad32-template/blob/develop/main/sketch.cpp#L274

and here:
https://github.com/ricardoquesada/esp-idf-arduino-bluepad32-template/blob/develop/main/sketch.cpp#L229

from bluepad32.

apoll2000 avatar apoll2000 commented on May 30, 2024

Thank you for this, the update() method seems to solve exactly the issue I was having when data did not come through.

from bluepad32.

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.