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

Exception Handling - USB device disconnects. #204

Open
pymenow opened this issue Jun 22, 2023 · 2 comments
Open

Exception Handling - USB device disconnects. #204

pymenow opened this issue Jun 22, 2023 · 2 comments
Assignees

Comments

@pymenow
Copy link

pymenow commented Jun 22, 2023

Whats the best way to catch exceptions like these from the custom script.

!!! transfer not completed: status=4
!!! transfer not completed: status=4
!!! transfer not completed: status=5
!!! transfer not completed: status=5
CAUGHT
Exception ignored on calling ctypes callback function: <bound method USBTransfer.__callbackWrapper of <class 'usb1.USBTransfer'>>
Traceback (most recent call last):
  File "C:\Users\thisi\AppData\Roaming\Python\Python39\site-packages\usb1\__init__.py", line 327, in __callbackWrapper
    callback(self)
  File "D:\Anaconda3\lib\site-packages\bumble\transport\usb.py", line 284, in on_packet_received
    exit()
  File "D:\Anaconda3\lib\_sitebuiltins.py", line 26, in __call__
    raise SystemExit(code)
SystemExit: None
!!! transfer not completed: status=5
CAUGHT
Exception ignored on calling ctypes callback function: <bound method USBTransfer.__callbackWrapper of <class 'usb1.USBTransfer'>>
Traceback (most recent call last):
  File "C:\Users\thisi\AppData\Roaming\Python\Python39\site-packages\usb1\__init__.py", line 327, in __callbackWrapper
    callback(self)
  File "D:\Anaconda3\lib\site-packages\bumble\transport\usb.py", line 284, in on_packet_received
    exit()
  File "D:\Anaconda3\lib\_sitebuiltins.py", line 26, in __call__
    raise SystemExit(code)
SystemExit: None
@barbibulle
Copy link
Collaborator

Hi. Can you tell me a bit more about the specific scenario here. Is this a trace for when you unplug the USB device? Or some other error condition?

@pymenow
Copy link
Author

pymenow commented Jun 22, 2023

While running an app just unplug the bluetooth USB.
This actualy simulated power management related senarios that eventually cause the BT USb device to disconnect

@barbibulle barbibulle self-assigned this Jul 24, 2023
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

2 participants