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

Server mode #60

Merged
merged 27 commits into from
Dec 9, 2024
Merged

Server mode #60

merged 27 commits into from
Dec 9, 2024

Conversation

Jakeler
Copy link
Owner

@Jakeler Jakeler commented Jun 12, 2022

closes #47

TODO:

@Jakeler Jakeler marked this pull request as draft June 12, 2022 16:18
@Jakeler
Copy link
Owner Author

Jakeler commented Jul 2, 2022

Strange packet reordering issue, when receiving writes AND offering reads/notify:
grafik
grafik
Needs more investigation before release.

@zalexua
Copy link
Contributor

zalexua commented Aug 12, 2023

Just FYI. I leave some comments in #47 about tests of this pool request.
I continue to provide updates there.

Jakeler added a commit that referenced this pull request Nov 25, 2024
for debugging #60 packet reordering
@Jakeler
Copy link
Owner Author

Jakeler commented Nov 25, 2024

Retested with bless 0.2.6 and blueZ 5.79 and Py 3.12: packet reordering is not an issue anymore!
Ran >1MB through it at full speed client -> server with 255 mtu, received data is perfect.
Data is ok server -> client too, but it crashes silently after a while and then nothing is forwarded in either direction. On shutdown the async exception handler shows resource temporarily unavailable...

@Jakeler Jakeler marked this pull request as ready for review December 6, 2024 17:47
ble_serial/bluetooth/ble_client.py Outdated Show resolved Hide resolved
ble_serial/bluetooth/ble_client.py Outdated Show resolved Hide resolved
ble_serial/bluetooth/ble_client.py Outdated Show resolved Hide resolved
ble_serial/bluetooth/ble_server.py Outdated Show resolved Hide resolved
ble_serial/main.py Outdated Show resolved Hide resolved
tests/test.py Outdated Show resolved Hide resolved
ble_serial/main.py Outdated Show resolved Hide resolved
value is not available at this time:
'_bleak_winrt_Windows_Devices_Bluetooth_GenericAttr' object has no attribute 'attribute_handle'
@Jakeler
Copy link
Owner Author

Jakeler commented Dec 7, 2024

Works fine on Windows too (without load testing):
grafik
grafik

Important for readme, needs manual install of this module which is not on pypi

pip install https://github.com/gwangyi/pysetupdi/archive/refs/heads/master.zip

@Jakeler
Copy link
Owner Author

Jakeler commented Dec 9, 2024

Server is stable under normal conditions, also with repeated connect/disconnects now. No issues with 36k baud sustained. Sending from server works even with 80-100k baud, but not forever - here the mentioned silent crashes (11: resource temporarily unavailible) happen. Should be fine though for most apps and the release.

grafik
Also pytest is awesome, very happy with the new testing structure!

Copy link
Owner Author

@Jakeler Jakeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jakeler Jakeler merged commit ff8908e into main Dec 9, 2024
@Jakeler Jakeler deleted the server-mode branch December 9, 2024 17:23
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

Successfully merging this pull request may close these issues.

Can't connect to Client - is server mode possible?
2 participants