Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection Reset by Peer for Apple Devices #8

Open
wangjiangb opened this issue Sep 1, 2022 · 6 comments
Open

Connection Reset by Peer for Apple Devices #8

wangjiangb opened this issue Sep 1, 2022 · 6 comments

Comments

@wangjiangb
Copy link

wangjiangb commented Sep 1, 2022

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.
@Alkaid-Benetnash
Copy link
Owner

This looks like the other side of the bluetooth connection (i.e. the side that trying to pair with this emulated bluetooth device) somehow closed the connection.
Do you have additional device to test? I am not sure which side to blame given the current information.

@b0o
Copy link

b0o commented Sep 9, 2022

Same issue here. In my case, the target device is an iPad.

@Alkaid-Benetnash
Copy link
Owner

@b0o Can you isolate the problem? Like does your setup work with an android? I have not tested this program with any apple devices and from old days I have the impression that apple devices have always had compatibility issues with third-party bluetooth devices.

@kfatehi
Copy link

kfatehi commented Jul 14, 2023

Cool project! I get the same error (using an iPhone). It works well on an Android. I am not sure how to debug the iPhone situation however, unfortunately.

python main.py
Registered
waiting for connection
Control channel connected to ...
Interrupt channel connected to ...
Exposed : 1
Exit
Traceback (most recent call last):
  File "/root/EmuBTHID/main.py", line 233, in <module>
    Window(d).loop(bthid_srv.send)
  File "/root/EmuBTHID/main.py", line 187, in loop
    send_call_back(bytes(mouse_state))
  File "/root/EmuBTHID/BluetoothHID.py", line 85, in send
    self.cinter.send(bytes_buf)
ConnectionResetError: [Errno 104] Connection reset by peer

@jal-frezie
Copy link

jal-frezie commented May 15, 2024

I now have the same issue, but with line numbers 232, 140 and 85 (presumably changing due to code version).
My intended client is a Mac Mini M1.

[off-topic: there's no need to replace the X terminal with Tkinter as the current version will work fine with Wayland due to backward compatibility provided by Xwayland]

@justaCasualCoder
Copy link

justaCasualCoder commented May 25, 2024

Got this when trying to connect to a IPhone....

@Alkaid-Benetnash Alkaid-Benetnash changed the title Connection Reset by Peer Connection Reset by Peer for Apple Devices Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants