feat(libSceBluetoothHid): add Bluetooth HID with no devices attached #1354

Merged
gjonn merged 1 commit from upstream-pr/1354 into main 2026-10-08 04:30:03 +00:00
gjonn commented 2026-10-08 00:06:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-08T00:06:26Z.


What

A title links libSceBluetoothHid.prx, which did not exist, so the title could not load. This adds the module with the eight exports the title imports, for a host where no Bluetooth HID device connects:

  • sceBluetoothHidInit() succeeds.
  • sceBluetoothHidRegisterCallback(callback, flags, param) and sceBluetoothHidUnregisterCallback() succeed; a null callback throws. The callback is never called because no device connects.
  • sceBluetoothHidRegisterDevice(vendorId, productId) and sceBluetoothHidUnregisterDevice(vendorId, productId) succeed.
  • sceBluetoothHidGetDeviceName, sceBluetoothHidGetInputReport and sceBluetoothHidSetOutputReport need a connected device and throw NotImplemented.

The signatures come from a title that loads sysmodule 0xfb, calls sceBluetoothHidInit() and gives up on Bluetooth wheels if it fails, then registers its callback with a 16-byte param and registers vendor/product pairs such as (0x44f, 0x1000). This is recorded under unknown function info, and the module is listed under silent stubs. The module gets a CMakeLists so the test can be registered.

Tested

  • Windows 11, MinGW-w64 GCC 15.2.0: new guest_bluetooth_hid test passes.
  • A title that links the module: its Thrustmaster Bluetooth thread starts and start-up continues into the job, render and flip threads.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4779975714 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1354). Originally posted by [gjonn](https://github.com/gjonn) on 2026-10-08T00:06:26Z. --- ### What A title links `libSceBluetoothHid.prx`, which did not exist, so the title could not load. This adds the module with the eight exports the title imports, for a host where no Bluetooth HID device connects: - `sceBluetoothHidInit()` succeeds. - `sceBluetoothHidRegisterCallback(callback, flags, param)` and `sceBluetoothHidUnregisterCallback()` succeed; a null callback throws. The callback is never called because no device connects. - `sceBluetoothHidRegisterDevice(vendorId, productId)` and `sceBluetoothHidUnregisterDevice(vendorId, productId)` succeed. - `sceBluetoothHidGetDeviceName`, `sceBluetoothHidGetInputReport` and `sceBluetoothHidSetOutputReport` need a connected device and throw `NotImplemented`. The signatures come from a title that loads sysmodule 0xfb, calls `sceBluetoothHidInit()` and gives up on Bluetooth wheels if it fails, then registers its callback with a 16-byte param and registers vendor/product pairs such as `(0x44f, 0x1000)`. This is recorded under unknown function info, and the module is listed under silent stubs. The module gets a CMakeLists so the test can be registered. ### Tested - Windows 11, MinGW-w64 GCC 15.2.0: new `guest_bluetooth_hid` test passes. - A title that links the module: its Thrustmaster Bluetooth thread starts and start-up continues into the job, render and flip threads. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-08 00:06:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T00:06:51Z.


Progress report (9619edf → cb00552)

📉 System libraries: 85.51% (-0.06%, +5 implemented, +3 declared functions)

✅ 5 implemented
Library Name
libSceBluetoothHid sceBluetoothHidInit
libSceBluetoothHid sceBluetoothHidRegisterCallback
libSceBluetoothHid sceBluetoothHidRegisterDevice
libSceBluetoothHid sceBluetoothHidUnregisterCallback
libSceBluetoothHid sceBluetoothHidUnregisterDevice
🆕 3 declared as stubs
Library Name
libSceBluetoothHid sceBluetoothHidGetDeviceName
libSceBluetoothHid sceBluetoothHidGetInputReport
libSceBluetoothHid sceBluetoothHidSetOutputReport
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6049365333 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1354#issuecomment-6049365333). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T00:06:51Z. --- <!-- progress-report --> ### Progress report (9619edf → cb00552) 📉 **System libraries**: 85.51% (-0.06%, +5 implemented, +3 declared functions) <details> <summary>✅ 5 implemented</summary> | Library | Name | | - | - | | libSceBluetoothHid | `sceBluetoothHidInit` | | libSceBluetoothHid | `sceBluetoothHidRegisterCallback` | | libSceBluetoothHid | `sceBluetoothHidRegisterDevice` | | libSceBluetoothHid | `sceBluetoothHidUnregisterCallback` | | libSceBluetoothHid | `sceBluetoothHidUnregisterDevice` | </details> <details> <summary>🆕 3 declared as stubs</summary> | Library | Name | | - | - | | libSceBluetoothHid | `sceBluetoothHidGetDeviceName` | | libSceBluetoothHid | `sceBluetoothHidGetInputReport` | | libSceBluetoothHid | `sceBluetoothHidSetOutputReport` | </details>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!1354
No description provided.