-
Notifications
You must be signed in to change notification settings - Fork 131
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
USB2 Stick Driver #21
Conversation
This does not include the serial adapter which the USB1 stick has, so the data is sent directly to the USB endpoint.
Here is the capabilities report. Can someone check whether it looks similar to the output from a USB1 stick: ========== [WRITE] ========== ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== Maximum channels: 8 ========== [READ] ========== |
Superficially, it looks fine. I'll take a deeper look and merge it later. Thanks for this, by the way. I've been swamped lately. |
What if mine stops just after 4 msg? ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== and then nothing.... |
I've got the same result. 4 messages and then nothing. Any ideas? ========== [WRITE] ========== ========== [WRITE] ========== ========== [READ] ========== ========== [READ] ========== |
Got an something working. I setup an example where I wrote just the raw hex bytes noted above by @DanAnkers. On a Garmin USB 2 stick, if I write the first two bytes (0000) from ever write line then it fails, but if I remove them then it works successfully. However, on a Garmin USB 1 stick, I must include those bytes (0000) on every write line for it to work correctly. |
i face the same problem. aarongurley, may i know which file did you make a change? thanks |
I never fixed the code to correct the problem, but I think it's deeper than one single location. You might try to make the fix in the USB2Driver class. If memory serves me right, you just need to remove the first two bytes from any message being written to that driver. I ended up going a slightly different route. I'm not really a python programmer, so I set out to write something that was a bit more native to me. I started working on a Node.js version of this library. It's very early but proving easy to work with. You can find it here: node-ant. Hope this helps! |
i get this after i comment #self.driver.write(msg.encode()) in node.py under reset function. Below is the result i get it after i remove that line ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== ========== [WRITE] ========== ========== [READ] ========== Maximum channels: 8 |
This is a basic version of a driver for the USB2 stick. Applying this should close #11
Unfortunately I've not got a USB1 stick so I can't verify correct behaviour, bur querying capabilities gives a sensible looking answer.
Dan