Comments (10)
Note: I changed the following in the example code:
serial_device: "\\.\COM3",
Which is the location of my device.
from timex_datalink_client.
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 👍
from timex_datalink_client.
@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.
from timex_datalink_client.
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 C:/Ruby32-x64
in your exceptions. How did you install Ruby?
It also looks like you're calling ./timexTest.rb
! Could you share this script?
from timex_datalink_client.
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 C:/Ruby32-x64
is a path that is used by RubyInstaller (GitHub repo here).
from timex_datalink_client.
I was able to reproduce it!
I'll take a look and see what it'll take to get this fixed, thanks!
from timex_datalink_client.
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:
- It connects to the Notebook Adapter at 9600 baud with 8 data bits, no parity, and one stop bit (the rubyserial defaults)
- There are generous sleep calls between writes, which should make data transfer even less troublesome
- There are no serial read calls; timex_datalink_client simply writes data to a device (and slowly at that)
from timex_datalink_client.
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!
- https://github.com/synthead/timex_datalink_client/releases/tag/v0.12.2
- https://rubygems.org/gems/timex_datalink_client/versions/0.12.2
To update timex_datalink_client on your installation, do:
gem update timex_datalink_client
This should produce output similar to:
$ gem update timex_datalink_client
Updating installed gems
Updating timex_datalink_client
Successfully installed timex_datalink_client-0.12.2
Parsing documentation for timex_datalink_client-0.12.2
Installing ri documentation for timex_datalink_client-0.12.2
Done installing documentation for timex_datalink_client after 0 seconds
Parsing documentation for timex_datalink_client-0.12.2
Done installing documentation for timex_datalink_client after 0 seconds
Gems updated: timex_datalink_client
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 👍
from timex_datalink_client.
Excellent! I'm really glad it works for you now! Thank you for filing this bug! Enjoy!
from timex_datalink_client.
Upgraded timex_datalink_client in timex_datalink_crt, too:
from timex_datalink_client.
Related Issues (20)
- Some spec descriptions are missing an aesthetic terminating quote
- Update Ruby to 3.2.2
- Update gems
- Use clearer description of how CRTs work in README.md
- README.md mentions "supported protocols," even though all protocols are supported
- Use hints about the various applications of the protocols in README.md
- Inconsistency in protocol 9 documentation in Timer example
- Protocol 9 Timer code examples are different than the complete code examples
- Inconsistent examples in protocol 7 documentation for phone numbers
- TimexDatalinkClient#initialize's models param is missing YARDoc documentation for protocol 6 model classes
- Protocol 6 (Beepwear Pro) is one hour fast on daylight savings time
- Support more characters in protocol 6 (Beepwear Pro)
- Protocol 1 documentation has a small grammatical error
- Syntax errors, no idea where to start HOT 8
- Add required_ruby_version to gemspec to require Ruby 3.1.0 or greater
- Ruby 3.1.0 requirement should be mentioned in README.md
- Add validation to ensure calendar event time is greater or equal to device time for protocol 7
- Complete code example for protocol 7 uses fixed calendar event times from 2022, and currently raises exceptions
- Add Time spec for protocol 6 to test daylight savings time
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timex_datalink_client.