Giter VIP home page Giter VIP logo

emubthid's Issues

Question about how this is done

How did you figure out all the mapping and the keyboard and mouse state bytearrays? im asking this as im trying to do something similar with an xbox360 controller

Connection Reset by Peer for Apple Devices

I followed the instruction, and I can see the window with "grab" message, but as soon as I press a key, it will have the following error message. Do you have any clue?

Registered
waiting for connection
Control channel connected to 00:8A:76:80:4A:F1
Interrupt channel connected to 00:8A:76:80:4A:F1
Exposed : 1
Exit
Traceback (most recent call last):
  File "/home/jiang/code/EmuBTHID/main.py", line 233, in <module>
    Window(d).loop(bthid_srv.send)
  File "/home/jiang/code/EmuBTHID/main.py", line 141, in loop
    send_call_back(bytes(kbd_state))
  File "/home/jiang/code/EmuBTHID/BluetoothHID.py", line 85, in send
    self.cinter.send(bytes_buf)

Connection Reset by Peer.

How do I do this?

Hey buddy, thanks for the project. I'm trying to run this on Arch Linux, and pair to it from another Arch Linux computer, or an Android phone, but it doesn't show up as discoverable. Are there special steps besides running main.py as root?

Mouse only seems to grab while button pressed.

This is great! Thank you for making this. It is so close to what I need. However...

  1. I connect from my Android phone.
  2. I initiate the grab.
  3. The keyboard works.
  4. Touchpad movement does not seem to pass to the phone.
  5. I depress a touchpad button and then touchpad movement is passed to the phone.

Is there something I need to do to get mouse data to pass to the phone continuously?

'bluetoothd -P input' not working on Ubuntu 22.04

I am using Ubuntu 22.04. BlueZ is native installed. When I run 'sudo bluetoothd -P input', it shows ''D-Bus setup failed: Name already in use'. And then running 'sudo python3 main.py' resulted in 'Address already in use'.

How should I resolve this failure?

Thanks.

Awesome project. Can we extend it?

I think this is an awesome bit of code. It's saved me from purchasing another keyboard for my windows Desktop machine, meaning I don't have to get used to 2 different keyboard layouts.

I've tested this on both a Windows desktop machine and my Samsung Galaxy phone, both work flawlessly.

I would like to contribute to the repo. I think the goal would be to minify the setup to a single python file / bash script that can be used to pair and connect and emulate the keyboard. Do you know how to get started with this / limitations?

It's a fantastic project and we need an open source keyboard emulator for linux, I can't find any other decent free software to do this.

README: "input" plugin of bluetoothd should be disabled, not enabled

  1. make sure bluetoothd has plugin input enabled ("-P input")

" -P, --noplugin=NAME,... Specify plugins not to load"

If the plugin is enabled (as is by default), I get "Address already in use" (it would be helpful if the program caught this error and reminded about input plugin).

Errors running main.py

Hi!
I'm trying to use your software to emulate a BT HID, but I'm getting this error:
File "main.py", line 223, in <module> d = display.Display() File "/usr/lib/python3/dist-packages/Xlib/display.py", line 80, in __init__ self.display = _BaseDisplay(display) File "/usr/lib/python3/dist-packages/Xlib/display.py", line 62, in __init__ display.Display.__init__(*(self, ) + args, **keys) File "/usr/lib/python3/dist-packages/Xlib/protocol/display.py", line 53, in __init__ name, host, displayno, screenno = connect.get_display(display) File "/usr/lib/python3/dist-packages/Xlib/support/connect.py", line 64, in get_display return getattr(mod, modname).get_display(display) File "/usr/lib/python3/dist-packages/Xlib/support/unix_connect.py", line 58, in get_display raise error.DisplayNameError(display) Xlib.error.DisplayNameError: Bad display name ""

Do you know I can I solve it?
Thanks!

How to move cursor to exact coordinates

Hi, thanks for great source code.
as i know we can move cursor to new location by changing X and Y when e.type == X.MotionNotify

mouse_state = bytearray([
            0xA1,
            0x02,  # Report ID
            0x00,  # mouse button, in this byte XXXXX(button2)(button1)(button0)
            0x00,  # X displacement
            0x00,  # Y displacement
        ])

where x_coord = old_x_coord + X and y_coord = old_y_coord + Y on client device.

How to move cursor to exact coordinates when server doesn't know current cursor coordinates?

Enable bluetooth - making sure that bluetoothd has the plugin...

input disabled (i.e. "-P input")

https://github.com/Alkaid-Benetnash/EmuBTHID#enable-bluetooth

I want to add the commands...

  • sudo systemctl edit bluetooth

  • ### Editing /etc/systemd/system/bluetooth.service.d/override.conf
    ### Anything between here and the comment below will become the contents >
    
    [Service]
    ExecStart=
    ExecStart=/usr/lib/bluetooth/bluetoothd -P input
    
    

    (- https://wiki.archlinux.org/title/Systemd#Examples)

  • sudo systemctl restart bluetooth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.