markusfisch / BinaryEye

Yet another barcode scanner for Android
https://play.google.com/store/apps/details?id=de.markusfisch.android.binaryeye
MIT License
1.38k stars 114 forks source link

Documentation on how to use Bluetooth functionality #413

Open simoneruffini opened 9 months ago

simoneruffini commented 9 months ago

Hi I don't understand how the bluetooth functionality works, is there some documentation? Does it emulate a virtual keyboard?
I see from dmesg that when my android device connects to my host linux PC, it creates a virtual input in /dev/input/eventxx but I can't use it.
I tried using libinput debug-events /dev/input/eventxx but it returns nothing when I scan a qr code.
Is it possible that it doesn't work because I'm running wayland?

markusfisch commented 9 months ago

Unfortunately there is no documentation at the moment, and this is a feature I don't use myself 😬

Bluetooth functionality was added with https://github.com/markusfisch/BinaryEye/pull/363 by @KamaleiZestri, who may be able to shed some light on this?

But I really doubt that Wayland is a factor here 🤔

KamaleiZestri commented 9 months ago

Bluetooth functionality was added with the RFCOMM protocol with UUID 8a8478c9-2ca8-404b-a0de-101f34ab71ae, so the device it is connected to will have to run a server of some kind to properly connect and send the scans.

My initial use case only involved Windows, so I ended up writing something quick that only works on Windows. Trying to get time soon to rewrite it for both Windows and Linux.

sean666888 commented 4 months ago

If anybody is interested I've written a basic tool which seems to work In Rust https://github.com/sean666888/bin_eye_bt_receiver It only works on Linux, as far as I know, and only works with Xorg for the keyboard output stuff, but it seems to work when I tested it. For the time being you will have to compile it yourself if you want it and you will need to install these libraries "sudo apt install libdbus-1-dev pkg-config libxdo-dev" A lot of the code is copy, paste from examples on the various libraries I used I'm currently trying to clean it up.It's good practice for doing stuff in rust.

janus717 commented 3 months ago

Hi. Is there any option to work BinaryEye from Realme X3 Superzoom device with Windows 11 laptop via Bluetooth? I need to scan codes with phone and send to host which is laptop. I have already configured "Forward scans with Bluetooth" and set my laptop as a host but after scanning code app shows "Could not connect to a Bluetooth device".

Generally, i want BinaryEye to open automatically via Bluetooth on my laptop web browser order in BaseLinker after scanning generated order code.