How to create a app that acts as a keyboard and mouse for pc via Bluetooth.
is there any extensions that send the keyboard keys to pc using Bluetooth?
How to build an MIT App Inventor app that sends keyboard-like input via Bluetooth to another device without arduino/esp32 directly by using HID
Unfortunately you have not received much responses up to now...
I also do not have an answer, but I asked Gemini and ChatGPT for you. Below are the answers.
Taifun
Gemini
Based on the information I found, it is not possible to directly send keyboard-like input via Bluetooth HID from an MIT App Inventor app without an intermediate device like an Arduino or ESP32.
Here's a breakdown of the key findings:
-
Bluetooth HID is not a native feature of MIT App Inventor. App Inventor's built-in Bluetooth components are designed for serial communication, which is a different protocol than the Human Interface Device (HID) profile used for keyboards and mice. The Bluetooth components in App Inventor allow you to send and receive strings or numbers, but they don't have the functionality to make your phone appear as a keyboard to another device.
-
Extensions for this functionality are not available. A search of the official MIT App Inventor extensions and other community resources did not yield an extension that provides Bluetooth HID functionality. While there are extensions for Bluetooth Low Energy (BLE), they also focus on data transfer, not device emulation.
-
The common method involves an intermediate microcontroller. The tutorials and forum discussions on this topic consistently show the use of an Arduino or ESP32 as a bridge. The App Inventor app sends data (e.g., a character or a command) to the microcontroller via standard Bluetooth serial communication. The microcontroller, which has the necessary libraries to emulate a Bluetooth HID, then translates that data into a keyboard press and sends it to the target device (like a computer).
In summary, while you can create an app to send commands over Bluetooth, App Inventor itself lacks the capability to act as a Bluetooth HID device. You would need to use a separate piece of hardware to perform the HID emulation.
ChatGPT
To build an MIT App Inventor app that sends keyboard-like input via Bluetooth to another device using HID (Human Interface Device) profile without using Arduino or ESP32 directly, you'll need to consider a few key points:
-
Bluetooth Profile Support:
Most smartphones and tablets support the HID profile over Bluetooth, but this is typically limited to Bluetooth-enabled devices acting as HID hosts or peripherals. Your target device must support HID over Bluetooth (HID profile). -
Device Capabilities:
- Android Devices: Some Android devices can act as Bluetooth HID peripherals, but enabling this functionality might require custom ROMs, rooting, or specialized apps.
- Other Devices: Windows or Mac computers may recognize HID devices if the device presenting the HID profile can set itself up as a compatible Bluetooth HID device.
-
Using MIT App Inventor:
MIT App Inventor's standard Bluetooth components support SPP (Serial Port Profile) rather than HID. To send HID reports, you'd usually need lower-level access that isn't provided directly by App Inventor's Bluetooth components. -
Possible Approaches:
-
Use a Bluetooth HID Library or Module:
Instead of creating a HID profile entirely within the app, you might rely on existing apps or modules that can act as HID peripherals when paired with another device. This is complex and may require custom Android development or native code, which goes beyond what MIT App Inventor offers. -
Leverage a Custom HID Device:
You could develop or use a pre-made Bluetooth HID device (like certain keyboards or dongles). Then, the app merely sends input through a standard Bluetooth SPP connection, and the HID device converts that to keyboard input. -
Use a Bridge or Intermediary:
If direct HID profile implementation isn't feasible within App Inventor, consider a workaround:- Send command/data via Bluetooth SPP from the app.
- Use an intermediary device or service that receives SPP data and emulates HID input on the target device.
-
-
Practical Consideration:
Given the limitations of MIT App Inventor:- It does not natively support HID profile implementation.
- You may need to implement a native Android plugin or use a custom app with HID support.
Summary:
- Direct HID profile communication from MIT App Inventor is not feasible with default components.
- Consider using Bluetooth SPP for simple data transfer.
- Use a device or service that can convert Bluetooth data to HID input if HID is essential.
Next steps:
- If you're committed to HID, look into native Android development with HID APIs.
- For a no-code approach, explore existing Bluetooth HID peripherals or intermediary solutions.
Would you like guidance on implementing Bluetooth SPP communication with MIT App Inventor?