Skip to content
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

gort scan serial - not returning anything on Windows 7 #27

Open
janaka opened this issue Dec 31, 2014 · 8 comments
Open

gort scan serial - not returning anything on Windows 7 #27

janaka opened this issue Dec 31, 2014 · 8 comments

Comments

@janaka
Copy link

janaka commented Dec 31, 2014

I've got an Arduino Uno plugged into my PC running Win7 Pro 64 bit. Arduino IDE recognises it on COM3. However gort scan serial returns nothing.

C:\Windows\system32>gort scan serial
Connected serialport devices:

Running the following works

gort arduino upload fermata COM3
And then running node cylone scripts (e.g. led blink) works.

Any ideas?

Thanks

@deadprogram
Copy link
Member

Thanks for reporting this, @janaka

@hunterboerner I know you had committed the original windows scanning code, did you run on Win7 or Win8+?

@hunterboerner
Copy link
Contributor

I tested it on Win8.

@deadprogram
Copy link
Member

OK got it. Someone will have to dig into this who has a Win7 install.

@athorsen
Copy link

I'm not sure if this is still an open issue for anyone, but I ran into this today, as well, on a Windows 10 install. The kicker was that it worked perfectly yesterday, but it stopped working after I did the gort arduino install. During the install of WinAVR (I think), my "PATH" variable value got nuked somehow. Being that the scan command executes powershell in a manner that relies on it being in the PATH, it was silently failing.

The way I found that out what was going on was by snatching the following from the "scan.go" file and plugging it into a new "Go" application to print the output of the underscore (though I had to rename the variable):

out, _ := exec.Command("powershell", "Get-WmiObject Win32_SerialPort", "|", "Select-Object Name, DeviceID, Description").Output()
fmt.Println("Connected serialport devices: ")
fmt.Println(string(out))

What I saw was this:

D:/repos/Go/src/Gobot/Gobot.exe [D:/repos/Go/src/Gobot]
Connected serialport devices:

Underscore value:
exec: "powershell": executable file not found in %PATH%
Success: process exited with code 0.

Luckily, I had recorded my PATH variable in a screencast a couple of days ago, so I just manually typed all of the paths back in, and the "scan" command started displaying the output again.

I hope this helps anyone still struggling with this issue.

@athorsen
Copy link

I just verified that when the WinAVR install takes place (at least on my machine :-)), it overwrites the Path variable instead of appending to it. Not sure if this is Win10-specific, but if you have that option ("Add directories to Path") checked during the installation, your Path variable is no more.

I thought it had completely nuked it only because I had uninstalled WinAVR just prior to figuring out what was going on, so the uninstall took the two AVR directories out of the PATH variable, which were the only ones left in there.

@twick00
Copy link

twick00 commented May 31, 2017

Can confirm what athorsen has written. He saved me a hours of work.

@deadprogram
Copy link
Member

Wow, I did not realize that the WinAVR install "semi-worked" on Win10. That is good news.

I have been looking into using the latest avrdude version from their build server, instead of the old old WinAVR binary. Ran into some challenges related to the needed windows drivers. I'm trying to get Zadig running properly on my Win10 test machine.

Another option might be taking the binaries from the latest Arduino build. Or possibly even installing Arduino and then Gort using the Arduino command line interface. Not sure if that would be considered too "heavy"? It certainly would improve compatibility, as well as allowing for full compilation of code from INO files.

Any thoughts from anyone on this?

@deadprogram
Copy link
Member

A work-around for the above would be for the Gort install to save and put back the PATH as it was before as part of triggering the WinAVR install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants