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

Cannot upload any type of file on windows #1

Open
KT819GM opened this issue Jan 13, 2021 · 6 comments
Open

Cannot upload any type of file on windows #1

KT819GM opened this issue Jan 13, 2021 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@KT819GM
Copy link

KT819GM commented Jan 13, 2021

Hi, at first - thank you for doing good work. I've tried to write small file into device running latest (for the time of writing) dev version using windows and got an error:

\go-mcu-1.0.0-windows-amd64.exe --port com9 --baud 460800 upload test.lua
go-mcu 2021/01/13 21:57:56 Sync is called
go-mcu 2021/01/13 21:57:57 Sync ok
go-mcu 2021/01/13 21:57:57 SendFile is called
go-mcu 2021/01/13 21:57:57 File opened 'test.lua'
go-mcu 2021/01/13 21:57:57 SendFile is called, loading recv code
go-mcu 2021/01/13 21:57:58 Calling recv()
go-mcu 2021/01/13 21:57:59 ReadyToRecv is called
2021/01/13 21:57:59 Device isn't ready to receive data

I'm using 460800 baud on all of my devices. And I can upload code with ESPlorer (and other tools). Besides, info read working okay:

go-mcu 2021/01/13 22:06:40 Sync is called
go-mcu 2021/01/13 22:06:40 Sync ok
go-mcu 2021/01/13 22:06:40 HardwareInfo is called
{"ChipID":12135951,"FlashSize":4096,"FlashMode":0,"FlashSpeed":40000000,"FlashID":1458208}

I will definitely try MacOS tomorrow, but still, windows is important for some users of nodemcu. How could I help to find out the reason?

@matiasinsaurralde
Copy link
Owner

Hi, no worries. Thanks for the report, I did my first Windows tests yesterday so this is very helpful.
Could you run the go-mcu hwinfo command and share the output?
Thanks

@matiasinsaurralde
Copy link
Owner

My bad, you already shared the hwinfo below, I will investigate it

@matiasinsaurralde matiasinsaurralde self-assigned this Jan 13, 2021
@matiasinsaurralde
Copy link
Owner

@KT819GM Quick question, are you trying to upload a file that's on a subdir?
I was able to reproduce the issue in the following scenario:

  • The Lua script is part of a subdirectory, like "scripts/test.lua"
  • The program runs as follows: "./go-mcu scripts/test.lua"

@matiasinsaurralde
Copy link
Owner

matiasinsaurralde commented Jan 13, 2021

I was able to reproduce a very similar scenario and have issued a potential fix in bf422a8
I would appreciate if you could re-download the binaries (they were recompiled) and try it out 🙏

Update: Have tested it on Windows again, so far it's looking good.

Thanks!

@matiasinsaurralde matiasinsaurralde added the bug Something isn't working label Jan 14, 2021
@KT819GM
Copy link
Author

KT819GM commented Jan 16, 2021

Sorry for late reply, bugfix introduced did not solved my problem yet, I think it's related to RTS/CTS flow control, which should be enabled in my case, thats why it possibly works on your side and not on my side. Could you please enable that option? Also I've tried on mac, it has problems also, like:

2021/01/16 12:09:30 Unknown baud rate 460800

But I think I will separate findings on macos side on different bug report.

Thank you.

@matiasinsaurralde
Copy link
Owner

matiasinsaurralde commented Jan 16, 2021

No worries, have you tried nodemcu-uploader? It seems to disable RTS and DTR by default so if the issue is related, it should be reproducible with that tool as well, the code is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants