jahnf / Projecteur

Linux Desktop Application for the Logitech Spotlight device (and similar devices) - Digital Laser Pointer
MIT License
374 stars 33 forks source link

What signal does the Logitech Spotlight presenter send? #179

Closed GregorBiswanger closed 2 years ago

GregorBiswanger commented 2 years ago

Hello community,

I have the Logitech spotlight presenter. But would like to use the spotlight with the mouse in a remote session without a presenter. I would like to activate the whole thing with my stream deck. Unfortunately, I can't find out which signal the Spotlight uses to communicate with the software. I work on Windows. Unfortunately, I couldn't make sense of the C++ code. Which event do I have to trigger in the system so that the spotlight is activated without a presenter.

Many thanks!

jahnf commented 2 years ago

Hi @GregorBiswanger, assuming the system where you run Projecteur is Linux (Windows is not supported), you can. When I had my work notebook with Linux (unfortunately this is not the case anymore sigh) I just had some Keyboard shortcuts set up (with GNOME in my case) that bind to run the command: projecteur -c spot=toggle. With this I used it for online screen sharing.

You can find this information also in the README: (me saying RTFM 😉 nicely) https://github.com/jahnf/Projecteur#using-projecteur-without-a-device

GregorBiswanger commented 2 years ago

Thank you! I would like to send the signal to the native driver under Windows to activate the spotlight.. you also have to receive the signal for your Linux solution.. so I would be interested to know which signal is sent by the presenter.. so i can write my own little solution for this scenario under windows...

jahnf commented 2 years ago

The Logitech Spotlight in itself works on Linux out of the box because it is detected by the OS as a generic HID device (one keyboard and one mouse device). Everything else besides that is done via HID++ (a Logitech-proprietary protocol) - e.g. the vibration support.

This is how Projecteur also worked in the early versions - just opened the mouse input device for reading and if there were mouse movement events -> show the spotlight)

I am not familiar how you talk to generic HID devices on Windows via USB or if there is is something similar to the Linux hidraw device that is used within Projecteur. But a good start would be to look into how to communicate with HID devices on Windows in the first place - be it USB (with the dongle) or Bluetooth.

If you got that working, then you can go into the details on how to detect mouse move events or details on HID++ (you can find stuff for this online and also fellow contributor Mayank Suman collected some Spotlight HID++ specific information here: https://github.com/jahnf/Projecteur/blob/develop/doc/LogitechSpotlightHID%2B%2B.md)

Edit: In essence: There is no "spot on" signal from the device, just listen to the mouse movement events of the device.