Skip to content

Output Report Function Not Working Properly in Release 2.1.0 #804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Sab1e-GitHub opened this issue Dec 15, 2024 · 3 comments · Fixed by #805
Closed

Output Report Function Not Working Properly in Release 2.1.0 #804

Sab1e-GitHub opened this issue Dec 15, 2024 · 3 comments · Fixed by #805

Comments

@Sab1e-GitHub
Copy link

Hello @h2zero ,
I am a contributor to the ESP32-BLE-Gamepad repository. We use your repository as a dependency, and I must say that your project is excellent! However, when adapting to Release 2.1.0, all other features work fine, but the Output Report doesn't seem to work properly. Specifically, when the host computer sends data, the following issue occurs:

Output Report send failed
Error writing report. Code: 1168, Message: Element not found.

You can find the host application here: HIDOutputDemo_CSharp
On the other hand, with the NimBLE Arduino version 1.4.3, I can use all the features without issues. I believe I have carefully checked the code, and it seems the issue is not with our repository.

Additionally, I have tried printing to check if the OutputReportChr pointer is correctly obtained, and it looks fine:

    if (enableOutputReport) {
    BleGamepadInstance->outputGamepad = BleGamepadInstance->hid->getOutputReport(BleGamepadInstance->configuration.getHidReportId());
    BleGamepadInstance->outputReceiver = new BleOutputReceiver(outputReportLength);
    if (BleGamepadInstance->outputGamepad == nullptr) {
        Serial.println("Failed to create Output Report characteristic!");
        return;
    }
    BleGamepadInstance->outputGamepad->setCallbacks(BleGamepadInstance->outputReceiver);

    Serial.println("Enabled Output Report!");
    }

图片

Here is the code I've modified in our repository: ESP32-BLE-Gamepad/tree/master
And here is the old version of the repository code: ESP32-BLE-Gamepad/tree/NimBLE-v1.4.3

I am not very familiar with the Bluetooth low-level architecture, so I would greatly appreciate your help. Thank you very much!

@h2zero
Copy link
Owner

h2zero commented Dec 15, 2024

@Sab1e-GitHub, thank you for reporting this, I believe I have resolved this in #805, please test it and let me know.

@Sab1e-GitHub
Copy link
Author

Sab1e-GitHub commented Dec 15, 2024

@Sab1e-GitHub, thank you for reporting this, I believe I have resolved this in #805, please test it and let me know.

OK, thank you very much! I'll try it now.

@Sab1e-GitHub
Copy link
Author

Hi @h2zero ,
#805 successfully resolved my issue! The Output Report functionality is now working properly. Thank you so much for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants