Code Monkey home page Code Monkey logo

Comments (10)

MuddledBox avatar MuddledBox commented on July 23, 2024 1

Note: I changed the following in the example code:
serial_device: "\\.\COM3",

Which is the location of my device.

from timex_datalink_client.

synthead avatar synthead commented on July 23, 2024 1

After some testing, I found that swapping the rubyserial gem with serialport works great in Windows (while also working great in Linux):

image

I'll get a PR up to change upstream gems and fix this issue 👍

from timex_datalink_client.

MuddledBox avatar MuddledBox commented on July 23, 2024 1

@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.

synthead avatar synthead commented on July 23, 2024

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.

synthead avatar synthead commented on July 23, 2024

Here's where the error you're seeing is defined:

https://github.com/hybridgroup/rubyserial/blob/090df6685f383497e9080a354b22af07731ece40/lib/rubyserial/windows_constants.rb#L198

Here's where the error from rubyserial is being raised:

https://github.com/hybridgroup/rubyserial/blob/090df6685f383497e9080a354b22af07731ece40/lib/rubyserial/windows.rb#L73

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.

synthead avatar synthead commented on July 23, 2024

I was able to reproduce it!

image

I'll take a look and see what it'll take to get this fixed, thanks!

from timex_datalink_client.

synthead avatar synthead commented on July 23, 2024

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.

synthead avatar synthead commented on July 23, 2024

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:

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.

synthead avatar synthead commented on July 23, 2024

Excellent! I'm really glad it works for you now! Thank you for filing this bug! Enjoy!

from timex_datalink_client.

synthead avatar synthead commented on July 23, 2024

Upgraded timex_datalink_client in timex_datalink_crt, too:

from timex_datalink_client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.