Modern Ubuntu and connectivity issues with scratch#46
Open
fpuga wants to merge 3 commits intokawasaki:masterfrom
Open
Modern Ubuntu and connectivity issues with scratch#46fpuga wants to merge 3 commits intokawasaki:masterfrom
fpuga wants to merge 3 commits intokawasaki:masterfrom
Conversation
Remove pybluez as it is no longer supported and causes installation errors on modern Python versions.
Update ws_handler to use websocket.request.path (websockets 14+ change) with a fallback for older versions. Refactor main to use asyncio.run() and async with websockets.serve() to fix 'RuntimeError: no running event loop'.
…PU usage - Add asyncio.sleep(0.01) to prevent 100% CPU usage. - Remove sys.exit() and catch exceptions in Session.handle to prevent server crashes. - Fix _get_dev_uuids to collect all advertised UUIDs (fixes LPF2 Hub discovery). - Allow empty filters in discovery to match all devices. - Improve discover logic to reset scan state on failure/empty results, enabling retries. - Use withResponse=True for BLE writes to improve reliability with LPF2/WeDo hubs. - Robustify error handling in connect and _cache_characteristics.
|
I downloaded and tested this version on Ubuntu 24.04.3 LTS with a WEDO 2.0. It seems that it works as expected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, thanks for building this project, i found it very useful.
I'm using scratch web app with a chinese clone of Lego Wedo 2.0, and found two issues trying to use pyscrlink.
With the help of a LLM agent i was able to get it working for me. I don't have enough experience with Bluetooth to evaluate if all the changes are need or the best options, but i reviewed the changes and seems good to me.
If you don't have the time to maintain the project, don't hesitate and just leave a short comment and i will publish my own fork.
Again, thanks for this project.