VirtCode / SmartMouse

use your smartphone as a normal computer mouse
GNU General Public License v3.0
97 stars 6 forks source link

Network only mode #10

Open WIPocket opened 6 months ago

WIPocket commented 6 months ago

Is it possible to use the sensor without an active bluetooth connection? I tried using the debug server, but didnt get any data.

VirtCode commented 6 months ago

Do you mean for getting data through the server for debugging and data collection? If so, yes, the data is only captured, processed and transmitted to the debug server when the app is being used in the "mouse view", which is indeed only accessible when the app is connected over Bluetooth to some target device.

We could implement some sort of bypass when debugging is enabled so no active device connection is required. Let me know if this would be useful in this case.

WIPocket commented 6 months ago

My usecase was not debugging, I wanted to be able to control a computer over the network instead of bluetooth. That would allow me to use this with a computer that does not support bluetooth/has bluetooth disabled, and maybe even use it inside a desktop enviorment running in Termux on the same phone.

VirtCode commented 6 months ago

Okay I see. This is currently not possible and would require a different implementation of the server and the protocol to be actually usable. The implementation of the debug server and protocol introduces too much overhead (at least in my testing) which would result in a lot of latency.

Implementing a server on the other side also opens up many other questions like operating system support etc. as well as connecting to a server on the local network not being as straight forward as the current solution. That's why it currently only supports the Bluetooth HID Profile.

For now, I try to focus on the position estimation, which is why I probably won't get back to this in the near future. But thanks anyway for the suggestion!