-
Notifications
You must be signed in to change notification settings - Fork 2
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
ERROR_SEM_TIMEOUT when running sample code #308
Comments
Note: I changed the following in the example code: Which is the location of my device. |
Oh interesting! I haven't tried this in Windows myself, but I have helped others get it working with WSL! Let's see if we can narrow down the issue. I don't have a Windows 11 machine, but I could see if it's reproducible with Windows 10. I see It also looks like you're calling |
Here's where the error you're seeing is defined: Here's where the error from rubyserial is being raised: I did a little research, and found that |
I'm seeing what I can find, and also filed a bug upstream: This appears to be a bug with rubyserial somehow. The timex_datalink_client lib uses serial in a super basic manner:
|
After some testing, I found that swapping the rubyserial gem with serialport works great in Windows (while also working great in Linux): I'll get a PR up to change upstream gems and fix this issue 👍 |
I believe this problem has been fixed with this PR! To make it publicly available, I also just shipped timex_datalink_client v0.12.2!
To update timex_datalink_client on your installation, do:
This should produce output similar to:
I'd also flash the Pico uf2 file for timex-datalink-arduino to your Pico one more time to ensure that you're using a known good Notebook Adapter emulator: Then, unplug and reinsert your Notebook Adapter to clear Windows of any lingering semaphore issues from rubyserial, and give it another shot! Since I could reproduce it verbatim and fix the issue, I felt confident enough to simply ship a new patch version of this gem. I think it'll work great 🙂 I'll leave this issue open for a few days just to make sure it works for you 👍 |
@synthead My "notebook adapter" is known working in emulated systems like Windows 98 SE, and I can confirm with the you the fix you implemented works for me in Windows 11. No updates besides updating to the newest version! Syncs with watch and everything. |
Excellent! I'm really glad it works for you now! Thank you for filing this bug! Enjoy! |
Upgraded timex_datalink_client in timex_datalink_crt, too: |
To reproduce my issues...
I run following the sample code, located here:
https://github.com/synthead/timex_datalink_client/blob/main/docs/timex_datalink_protocol_1.md
When using the following with the Pico with the below u2f:
https://github.com/synthead/timex-datalink-arduino/releases/tag/v1.0.0
I get:
78 55 C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/rubyserial-0.6.0/lib/rubyserial/windows.rb:73:in
'write': ERROR_SEM_TIMEOUT (RubySerial::Error) from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client/notebook_adapter.rb:35:in
block (2 levels) in write'from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client/notebook_adapter.rb:32:in
each' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client/notebook_adapter.rb:32:in
block in write'from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client/notebook_adapter.rb:31:in
each' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client/notebook_adapter.rb:31:in
write'from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client.rb:113:in
write' from ./timexTest.rb:132:in
OR
when using the the following with the same Pico with the below u2f:
https://github.com/famiclone6502/DIY_Datalink_Adapter/tree/main/pico
I get:
78 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/rubyserial-0.6.0/lib/rubyserial/windows.rb:73:in
'write': ERROR_SEM_TIMEOUT (RubySerial::Error) from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client/notebook_adapter.rb:35:in
block (2 levels) in write'from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client/notebook_adapter.rb:32:in
each' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client/notebook_adapter.rb:32:in
block in write'from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client/notebook_adapter.rb:31:in
each' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client/notebook_adapter.rb:31:in
write'from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/timex_datalink_client-0.12.1/lib/timex_datalink_client.rb:113:in
write' from ./timexTest.rb:132:in
Running on Windows 11. There is no blinking on my Raspberry Pi Pico's inbuilt LED during either run. If I unplug the Pico and run, I just get "ERROR_FILE_NOT_FOUND". Both the above errors are consistent in length each time the application is run. Any ideas? Outdated gems?
The text was updated successfully, but these errors were encountered: