-
Notifications
You must be signed in to change notification settings - Fork 19
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
Can't detect device in Windows 7 #16
Comments
Some questions: |
|
2 more questions:
|
|
I will try to reproduce what you are seeing later today and will let you know the outcome. |
I was able to reproduce the issue you had with manually setting the com port and that has been repaired in version 2.0. I cannot reproduce the auto detect issue. I do not have Windows 7, but doubt if that is the cause of your problem. I tested on Windows 10. I had tried the same code you provided for auto-detection earlier in the development stages but had issues with it working across all platforms. In addition, it requires a driver to be installed for Windows usage, and many schools are very reluctant to have any drivers installed on their machines. Therefore, I will be keeping the auto-detection as-is. Please try version 2.0 and manually specifying the com port with the -p command line option. I will be closing this issue, but if you are still having problems, please leave a comment here, and I will reopen it if necessary. Thanks. |
I am not sure I understand. Is there a device plugged into COM2 and that is why it is stopping there? |
I will look at this to see if I can come up with a fix. |
I tried implementing a fix, but because pyserial has changed its API from 2.7 to 3.0, I will need to add a lot of complicated code to do board detection within the auto detection loop. I need to support pyserial 2.7 through 3.4 so that current users do not need to update pyserial to a specific release. Because the problem is specific to your motherboard, and it is unlikely that I will be making any additional changes to s2m for Scratch 2.0 in the future, I suggest that you clone the code and add the code that solves the problem for you. Therefore, I am marking this issue as an enhancement for when Scratch 3.0 is released. Please feel free to leave any additional comments or questions here. |
Thanks for your hard work, this project is very helpful in class! |
@MrYsLab Pyserial allows you to iterate over all available ports and query their VID and PID (http://pyserial.readthedocs.io/en/latest/tools.html#serial.tools.list_ports.ListPortInfo.vid) if they are available for the specific port (not all COM ports will have it, as these are USB IDs). You can use that feature to identify connected micro:bits: |
@carlosperate Unfortunately, this does not work with pyserial 2.7 and Linux (and perhaps Windows and Mac as well - I can't remember). Because I don't want to publish a breaking change release at this time, and because Scratch 2.0 is unlikely to be supported once Scratch 3.0 is released, I will wait to address this until Scratch 3.0 comes out. Scratch 2.0 and 3.0 extensions are likely to be incompatible and will need to be rewritten. |
That's fair enough. Out of curiosity, where does the PySerial 2.7 requirement come from? Is that the default version installed in some systems? |
I normally don't like to bundle other libraries with mine, since it means I may need to provide updates as fixes come available for the external package. I guess if it is working I can ignore any future changes. I will do some experimenting and if bundling works, I will create a new version and close this issue. |
I am having problems with bundling working across python 2, python 3, windows and linux, so I am going to leave things as they are. |
No worries, thanks for looking into it. |
I followed the user guide, but can't detect device either by autodetecting or specifying serial port.
After modifying serial port detecting part in s2m.py, I can detect device either by autodetecting or specifying serial port now.
Original code:
Modified:
F.Y.I.
ref: ntoll/microrepl
The text was updated successfully, but these errors were encountered: