nodemcu / nodemcu-devkit

A development kit for NodeMCU firmware
MIT License
800 stars 287 forks source link

Cannot flash firmware on Mac OS X #2

Open squix78 opened 9 years ago

squix78 commented 9 years ago

How can I flash firmware on the devkit from a Mac OS X? I succesfully installed the driver from here http://raysfiles.com/drivers/ch341ser_mac.zip and can talk with the ESPlorer to the AT firmware. But for some strange reason flashing does't work. To do this I press the flash button while powering up and run the esptool.py as I do when I flash any other ESP8266... Might this be an issue with the CH340G serial-to-usb converter?

gorhgorh commented 9 years ago

same problem here ...

abl commented 9 years ago

I tried to investigate this: themadinventor/esptool#26 - if you don't mind testing 77400 baud, do you see the same values for boot mode? Works OK with an external UART.

However, looking at #5 - that might be the source of the problem.

rei-vilo commented 9 years ago

On Mac OS X, once the driver CH341SER_MAC_ZIP is installed, has you launched on Terminal sudo nvram boot-args="kext-dev-mode=1"?

abl commented 9 years ago

Without that argument the kext won't install; with the kext not installed, you won't see a port. Since AT commands work, well, it's not the unsigned kext.

I'm also seeing the exact same problem with a different (signed) driver; AT commands (and other UART work after boot) works fine, flashing doesn't.

caquino commented 9 years ago

same problem here with Repleo Drivers.

magalage commented 9 years ago

Hi I got v0.9 and plugged in to my mac but get cant auto detect firmware because mcu didn't send a proper reply. AT commands gets timed out obviously. Port is open with 9600. Pls help.

rei-vilo commented 9 years ago

The default tool esptool doesn't work but pyesptool works fine. Give it a try.

AddoSolutions commented 9 years ago

@rei-vilo Where are you getting this pyesptool?

rei-vilo commented 9 years ago

@AddoSolutions Check https://github.com/themadinventor/esptool and http://embeddedcomputing.weebly.com/nodemcu-board.html for more pointers.

magalage commented 9 years ago

rei-vilo - thanks for the reply. I really couldn't figure out the pyesptool and got it flashed using my Ubuntu machine. Thanks now I can see you have given the link to pyesptool. What I think it's the USB to serial driver issue in OSX. In Ubuntu esprool.py works like a charm. Just plug the devkit and execute the esptool.py command.

rei-vilo commented 9 years ago

You're welcome!

Actually, esptools.py works very well on Mac OS X, provided libusb —and the CH340 serial to USB driver for the NodeMCU board— have been installed.

What doesn't work with the NodeMCU board is esptools.

abl commented 9 years ago

esptools.py was patched to support this board since this issue was opened so that might be part of it.

squix78 commented 9 years ago

Funny, for me the latest version of esptool.py still doesn't work on Mac. I can see the Repleo-Port, so this is not the problem. Which version of the Nodemcu board do you use? I have a V0.9. rei-vilo and abl: can you describe your setup?

rei-vilo commented 9 years ago

Here are the details:

Also, make sure power can deliver up to 350 mA. Flashing and reboot seem to require a lot of power.

bender-2000 commented 9 years ago

@squix78 Take a look at this https://github.com/themadinventor/esptool/issues/36#issuecomment-102634652 , I just commented a workaround which is working under OS X, using a CH341 with Repleo driver, maybe it works for you too.

tomasinouk commented 9 years ago

esptool rendered nodeMCU unhappy flashed the FW ok, but after reset ESPlorer could not connect to the board.

followed @LucasG2000 post only with slight change (I pressed Flash button only). After that press Reset button and ESPlorer is good to go.

running OSX 10.10.3

AddoSolutions commented 9 years ago

Turns out my problem was with the mac driver, after updating it it looks like it works like a charm now! Thanks :)

sombriks commented 7 years ago

i can confirm too that updating mac driver can help there: http://www.mblock.cc/posts/run-makeblock-ch340-ch341-on-mac-os-sierra