esp8266 / Arduino

ESP8266 core for Arduino
GNU Lesser General Public License v2.1
16.05k stars 13.33k forks source link

OSX - Nodemcu v1.0 not showing on Arduino IDE port menu #732

Closed cescoferraro closed 9 years ago

cescoferraro commented 9 years ago

Just downloaded the latest Arduino IDE 1.6.5 Added the boards manager [tried with both staging and stable] Downloaded SiLabsUSBDriverDisk and ch341ser_mac drivers. Rebooted. I can see all the esp8266 types under boards menu. But under ports i cant see my board. What am I doing wrong?? I also cant find esptool under programmer. I am running Maverick and just the android cable from the unit to computer.

screen shot 2015-08-30 at 10 40 09 am

asetyde commented 9 years ago

Check if Mac see com port , sometimes Mac put default Bluetooth serial port

Sent from my iPhone

On 30 Aug 2015, at 15:39, Francesco notifications@github.com wrote:

Just downloaded the latest Arduino IDE 1.6.5 Added the boards manager [tried with both staging and stable] Downloaded SiLabsUSBDriverDisk and ch341ser_mac drivers. Rebooted. I can see all the esp8266 types under boards menu. But under ports i cant see my board. What am I doing wrong??

— Reply to this email directly or view it on GitHub.

cescoferraro commented 9 years ago

Tried to upload sketch to the bluetooth incoming port but got. warning: espcomm_sync failed error: espcomm_open failed

Osx does not seem to recognize the module. mac-osx :: ~ » ls -l /dev/cu* crw-rw-rw- 1 root wheel 18, 1 Aug 30 09:54 /dev/cu.Bluetooth-Incoming-Port crw-rw-rw- 1 root wheel 18, 3 Aug 30 09:54 /dev/cu.Bluetooth-Modem

asetyde commented 9 years ago

No sorry Francesco , you must use usb serial ,

If my cable on Mac it's not link , you see this

Sent from my iPhone

On 30 Aug 2015, at 17:03, Francesco notifications@github.com wrote:

Tried to upload sketch to the bluetooth incoming port but got. warning: espcomm_sync failed error: espcomm_open failed

Osx does not seem to recognize the module. mac-osx :: ~ » ls -l /dev/cu* crw-rw-rw- 1 root wheel 18, 1 Aug 30 09:54 /dev/cu.Bluetooth-Incoming-Port crw-rw-rw- 1 root wheel 18, 3 Aug 30 09:54 /dev/cu.Bluetooth-Modem

— Reply to this email directly or view it on GitHub.

cescoferraro commented 9 years ago

See what? I should see an extra serial port at the menu right by using the android cable, right? I dont need any serial cables since the board has its own FTDI, right?

cescoferraro commented 9 years ago

YEAH! tried SEVEN cables. With the former, now I see SLAB_USBto UART on the port menu! But still cant program it. I think because I cant see esptool on the programmer menu.

I get: Uploading 205232 bytes from /var/folders/lg/jnvy9my56nsgqkkxt3ftqwz40000gn/T/build1264847574822280989.tmp/Blink.cpp.bin to flash at 0x00000000 warning: espcomm_send_command: didn't receive command response warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed warning: espcomm_send_command: didn't receive command response

asetyde commented 9 years ago

Wait nodemcu has not ftdi chip

Sent from my iPhone

On 30 Aug 2015, at 17:34, Francesco notifications@github.com wrote:

YEAH! tried SEVEN cables. With the former, now I see SLAB_USBto UART on the port menu! But still cant program it. I think because I cant see esptool on the programmer menu.

I get: Uploading 205232 bytes from /var/folders/lg/jnvy9my56nsgqkkxt3ftqwz40000gn/T/build1264847574822280989.tmp/Blink.cpp.bin to flash at 0x00000000 warning: espcomm_send_command: didn't receive command response warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed warning: espcomm_send_command: didn't receive command response

— Reply to this email directly or view it on GitHub.

igrr commented 9 years ago

esptool should not appear in programmers menu. Apparently some outdated tutorials still mention it.

On Sun, Aug 30, 2015, 18:46 Alexandro Todeschini notifications@github.com wrote:

Wait nodemcu has not ftdi chip

Sent from my iPhone

On 30 Aug 2015, at 17:34, Francesco notifications@github.com wrote:

YEAH! tried SEVEN cables. With the former, now I see SLAB_USBto UART on the port menu! But still cant program it. I think because I cant see esptool on the programmer menu.

I get: Uploading 205232 bytes from /var/folders/lg/jnvy9my56nsgqkkxt3ftqwz40000gn/T/build1264847574822280989.tmp/Blink.cpp.bin to flash at 0x00000000 warning: espcomm_send_command: didn't receive command response warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed warning: espcomm_send_command: didn't receive command response

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/esp8266/Arduino/issues/732#issuecomment-136155106.

asetyde commented 9 years ago

You must check your driver chip . I've also mac but i prefer Windows

Inviato dal mio iPhone

On 30 Aug 2015, at 17:52, Ivan Grokhotkov notifications@github.com wrote:

esptool should not appear in programmers menu. Apparently some outdated tutorials still mention it.

On Sun, Aug 30, 2015, 18:46 Alexandro Todeschini notifications@github.com wrote:

Wait nodemcu has not ftdi chip

Sent from my iPhone

On 30 Aug 2015, at 17:34, Francesco notifications@github.com wrote:

YEAH! tried SEVEN cables. With the former, now I see SLAB_USBto UART on the port menu! But still cant program it. I think because I cant see esptool on the programmer menu.

I get: Uploading 205232 bytes from /var/folders/lg/jnvy9my56nsgqkkxt3ftqwz40000gn/T/build1264847574822280989.tmp/Blink.cpp.bin to flash at 0x00000000 warning: espcomm_send_command: didn't receive command response warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed warning: espcomm_send_command: didn't receive command response

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/esp8266/Arduino/issues/732#issuecomment-136155106.

— Reply to this email directly or view it on GitHub.

cescoferraro commented 9 years ago

I have enabled verbose. It looks like the esptool is missing something. I have never used the nodemcu v1.0 before. should I press something before flashing? Something happened after trying to upload , since the LED is not blinking anymore. I think I have wipped out LUA, but did not quite get my arduino blink sketch running

esptool v0.4.5 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
    setting board to ck
    setting baudrate from 115200 to 9600
    setting port from /dev/tty.usbserial to /dev/cu.SLAB_USBtoUART
    setting address from 0x00000000 to 0x00000000
    espcomm_upload_file
    stat     /var/folders/lg/jnvy9my56nsgqkkxt3ftqwz40000gn/T/build1264847574822280989.tmp/Blink.cpp.bin success
opening port /dev/cu.SLAB_USBtoUART at 9600
    tcgetattr
    tcsetattr
    serial open
opening bootloader
resetting board
trying to connect
    setting character timeout 0
    done
    setting character timeout 1
    done
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
trying to connect
    setting character timeout 0
    done
    setting character timeout 1
    done
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_open
Uploading 205232 bytes from        /var/folders/lg/jnvy9my56nsgqkkxt3ftqwz40000gn/T/build1264847574822280989.tmp/Blink.cpp.bin to         flash at 0x00000000
    erasing flash
        size: 0321b0 address: 000000
    first_sector_index: 0
    total_sector_count: 51
    head_sector_count: 16
    adjusted_sector_count: 35
    adjusted_size: 023000
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    setting timeout 10000
    setting character timeout 100
    done
    setting timeout 1
        setting character timeout 1
    done
    espcomm_send_command: receiving 2 bytes of data
    writing flash
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: didn't receive command response
closing bootloader
igrr commented 9 years ago

Normally the board should be reset automatically during upload. I'm using nodemcu 1.0 on a Mac, and it works quite well... I must say, I had issues like this with some usb cables as well. If this issue is 100% reproducible with other cables as well, we can try to increase flash erase timeout.

On Sun, Aug 30, 2015, 19:27 Francesco notifications@github.com wrote:

I have enabled verbose. It looks like the esptool is missing something. I have never used the nodemcu v1.0 before. should I press something before flashing? Something happened after trying to upload , since the LED is not blinking anymore. I think I have wipped out LUA, but did not quite get my arduino blink sketch running

esptool v0.4.5 - (c) 2014 Ch. Klippel ck@atelier-klippel.de setting board to ck setting baudrate from 115200 to 9600 setting port from /dev/tty.usbserial to /dev/cu.SLAB_USBtoUART setting address from 0x00000000 to 0x00000000 espcomm_upload_file stat /var/folders/lg/jnvy9my56nsgqkkxt3ftqwz40000gn/T/build1264847574822280989.tmp/Blink.cpp.bin success opening port /dev/cu.SLAB_USBtoUART at 9600 tcgetattr tcsetattr serial open opening bootloader resetting board trying to connect setting character timeout 0 done setting character timeout 1 done espcomm_send_command: sending command header espcomm_send_command: sending command payload trying to connect setting character timeout 0 done setting character timeout 1 done espcomm_send_command: sending command header espcomm_send_command: sending command payload espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_open

Uploading 205232 bytes from /var/folders/lg/jnvy9my56nsgqkkxt3ftqwz40000gn/T/build1264847574822280989.tmp/Blink.cpp.bin to flash at 0x00000000

erasing flash size: 0321b0 address: 000000 first_sector_index: 0 total_sector_count: 51 head_sector_count: 16 adjusted_sector_count: 35 adjusted_size: 023000 espcomm_send_command: sending command header espcomm_send_command: sending command payload setting timeout 10000 setting character timeout 100 done setting timeout 1 setting character timeout 1 done espcomm_send_command: receiving 2 bytes of data writing flash

warning: espcomm_send_command: didn't receive command response warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed warning: espcomm_send_command: didn't receive command response

closing bootloader

— Reply to this email directly or view it on GitHub https://github.com/esp8266/Arduino/issues/732#issuecomment-136157224.

asetyde commented 9 years ago

With my mac all ok

Sent from my iPhone

On 30 Aug 2015, at 18:34, Ivan Grokhotkov notifications@github.com wrote:

Normally the board should be reset automatically during upload. I'm using nodemcu 1.0 on a Mac, and it works quite well... I must say, I had issues like this with some usb cables as well. If this issue is 100% reproducible with other cables as well, we can try to increase flash erase timeout.

On Sun, Aug 30, 2015, 19:27 Francesco notifications@github.com wrote:

I have enabled verbose. It looks like the esptool is missing something. I have never used the nodemcu v1.0 before. should I press something before flashing? Something happened after trying to upload , since the LED is not blinking anymore. I think I have wipped out LUA, but did not quite get my arduino blink sketch running

esptool v0.4.5 - (c) 2014 Ch. Klippel ck@atelier-klippel.de setting board to ck setting baudrate from 115200 to 9600 setting port from /dev/tty.usbserial to /dev/cu.SLAB_USBtoUART setting address from 0x00000000 to 0x00000000 espcomm_upload_file stat /var/folders/lg/jnvy9my56nsgqkkxt3ftqwz40000gn/T/build1264847574822280989.tmp/Blink.cpp.bin success opening port /dev/cu.SLAB_USBtoUART at 9600 tcgetattr tcsetattr serial open opening bootloader resetting board trying to connect setting character timeout 0 done setting character timeout 1 done espcomm_send_command: sending command header espcomm_send_command: sending command payload trying to connect setting character timeout 0 done setting character timeout 1 done espcomm_send_command: sending command header espcomm_send_command: sending command payload espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_send_command: receiving 2 bytes of data espcomm_open

Uploading 205232 bytes from /var/folders/lg/jnvy9my56nsgqkkxt3ftqwz40000gn/T/build1264847574822280989.tmp/Blink.cpp.bin to flash at 0x00000000

erasing flash size: 0321b0 address: 000000 first_sector_index: 0 total_sector_count: 51 head_sector_count: 16 adjusted_sector_count: 35 adjusted_size: 023000 espcomm_send_command: sending command header espcomm_send_command: sending command payload setting timeout 10000 setting character timeout 100 done setting timeout 1 setting character timeout 1 done espcomm_send_command: receiving 2 bytes of data writing flash

warning: espcomm_send_command: didn't receive command response warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed warning: espcomm_send_command: didn't receive command response

closing bootloader

— Reply to this email directly or view it on GitHub https://github.com/esp8266/Arduino/issues/732#issuecomment-136157224.

— Reply to this email directly or view it on GitHub.

cescoferraro commented 9 years ago

Got it now! I got confused because on the chip its written to use 9600 baud rate. [I think its LUA related] Changed do 115200 and it got it to upload. I have also deleted the stable and downloaded the staging version at the same time.

asetyde commented 9 years ago

✌️

Sent from my iPhone

On 30 Aug 2015, at 18:54, Francesco notifications@github.com wrote:

Got it now! I got confused because on the chip its written to use 9600 baud rate. [I think its LUA related] Changed do 115200 and it got it to upload. I have also deleted the stable and downloaded the staging version at the same time.

— Reply to this email directly or view it on GitHub.

mtnbrit commented 9 years ago

I love being able to upload at 921600 baud with this board.

One thing I noticed with the v1.0 board is that ESP.reset() doesn't work, it just hangs up showing wdt but never restarts. Perhaps they are pulling rst low too hard or something? ESP.reset() works fine on the v0.9 board for example.

asetyde commented 9 years ago

Esp.restarts work but not very well , I say to you my method ,

Sent from my iPhone

On 30 Aug 2015, at 20:33, mtnbrit notifications@github.com wrote:

I love being able to upload at 921600 baud with this board.

One thing I noticed with the v1.0 board is that ESP.reset() doesn't work, it just hangs up showing wdt but never restarts. Perhaps they are pulling rst low to hard or something? ESP.reset() works fine on the v0.9 board for example.

— Reply to this email directly or view it on GitHub.

Links2004 commented 9 years ago

@mtnbrit ESP.reset(); does kill the SDK hard but not do a power loop ( resenting registers ) this can end in bad states. like your wdt loop. for safe reboot use ESP.restarts();

see here: https://github.com/esp8266/Arduino/blob/260ab630f3391ee8bd6c6fed7636bad15a819673/hardware/esp8266com/esp8266/cores/esp8266/Esp.cpp#L116

mtnbrit commented 9 years ago

I tried both ESP.restart and ESP.reset but the both ended in wdt but no actual restart on NodeMCU v1.0 board

asetyde commented 9 years ago

Please check gpio 0 , 2 Must hight My Board reboot , not agenzia you flash board

Sent from my iPhone

On 30 Aug 2015, at 22:21, mtnbrit notifications@github.com wrote:

I tried both ESP.restart and ESP.reset but the both ended in wdt but no actual restart on NodeMCU v1.0 board

— Reply to this email directly or view it on GitHub.

francwalter commented 7 years ago

Hello sorry when I put my answer here, maybe wrong: I have the same problem with a NodeMCU V3 ESP8266 ESP-12 E Lua CH340 - when I put in the USB-cable nothing appears in the port list, but when I put there the good old Arduino Uno V3 my port appears and all works. I tried it with 1.6.5 and the actual 1.8.3. The port submenu is grey in 1.6.5 and shows only the usb bluetooth in 1.8.3. I tried two different USB cables which are good working but no difference. The ESP8266 shortly blinks blue when I put the cable to my MacBook (with OS 10.11.6). I installed the ESP8266 IDE extension for the Arduino IDE. What can it be? Thanks. frank EDIT I will try later on PC...

mtnbrit commented 7 years ago

You need to install the CH340 driver for OS X.

On Jun 26, 2017, at 4:25 AM, franc notifications@github.com wrote:

Hello sorry when I put my answer here, maybe wrong: I have the same problem with a NodeMCU V3 ESP8266 ESP-12 E Lua CH340 http://www.ebay.de/itm/162472635911 - when I put in the USB-cable nothing appears in the port list, but when I put there the good old Arduino Uno V3 my port appears and all works. I tried it with 1.6.5 and the actual 1.8.3. The port submenu is grey in 1.6.5 and shows only the usb bluetooth in 1.8.3. I tried two different USB cables which are good working but no difference. The ESP8266 shortly blinks blue when I put the cable to my MacBook (with OS 10.11.6). I installed the ESP8266 IDE extension for the Arduino IDE. What can it be? Thanks. frank

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/esp8266/Arduino/issues/732#issuecomment-311032659, or mute the thread https://github.com/notifications/unsubscribe-auth/AKy2zrOJIre4lzxHA1vD1BSjsj3s-pP0ks5sH5UsgaJpZM4F0qUi.

francwalter commented 7 years ago

Thank a lot! Works now 👍 with the driver CH341SER_MAC-1.4 from the site "Signed Mac OS Driver for Winchiphead CH340 serial bridge" I also had to set in Arduino IDE the Reset Method to nodemcu (in Tools) instead of ck and then it worked. Shows now in the statusbar: Generic ESP8266 Module, 80 MHz, 40 MHz, DIO, 115200, 512K (64K SPIFFS), nodemcu, Disabled, Node on /dev/cu.wchusbserial620 and I can upload sketches :)

rafaeleyng commented 7 years ago

@francwalter Hello there! I'm having the same issues, and your solution, unfortunately, didn't work for me.

I'm on macOS Sierra 10.12.6

I'm trying to setup a NodeMCU 1.0 board, and the port don't appear on the list, even after installing CH341SER_MAC-1.4.

The error I get is:

/Users/rafael/Library/Arduino15/packages/esp8266/tools/esptool/0.4.9/esptool -vv -cd nodemcu -cb 115200 -cp /dev/cu.usbmodem1421 -ca 0x00000 -cf /var/folders/m3/9tc0dcj531d1v746xyl_ms7h0000gn/T/arduino_build_504741/NodeMCU-Blink.ino.bin 
esptool v0.4.9 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
    setting board to nodemcu
    setting baudrate from 115200 to 115200
    setting port from /dev/tty.usbserial to /dev/cu.usbmodem1421
    setting address from 0x00000000 to 0x00000000
    espcomm_upload_file
    espcomm_upload_mem
opening port /dev/cu.usbmodem1421 at 115200
error: cannot access /dev/cu.usbmodem1421

error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

The README of this driver states:

After the installation is completed, you will find serial device in the device list(/dev/tty.wchusbserial*), and you can access it with serial tools.

but this file doesn't exist there.

Also, about your phrase:

I also had to set in Arduino IDE the Reset Method to nodemcu (in Tools) instead of ck and then it worked.

I couldn't find anything related to that in Arduino IDE. Could you provide some screenshot, maybe?


PS: tried on Windows and, while it doesn't give an error (it actually does the upload up to 100%), I'm unable to see any result. Like, running a simple led blinking doesn't make the led actually blink.

francwalter commented 7 years ago

What exactly for Screenshot do you need?

rafaeleyng commented 7 years ago

I wanted to see where was the option to set:

I also had to set in Arduino IDE the Reset Method to nodemcu (in Tools) instead of ck and then it worked.

But I ended up using a Windows machine and everything worked, so I gave up trying to make it work on mac.

francwalter commented 7 years ago

bildschirmfoto 2017-10-16 um 08 47 32

This is it. But I think that is my fault, this "Reset" menu-entry is only shown when set to "Generic ESP8266 Module" and not to "NodeMCU 1.0 ..." where I guess this setting is implicit.

But anyway, if the driver is not installed and not visible under Port after plugged into the USB-Jack:

bildschirmfoto 2017-10-16 um 12 02 06 it won't work. By the way, each USB-Jack has his own port-name on my MacBook with OS 10.11.6

rdedinsky commented 6 years ago

This driver worked for me: https://kig.re/2014/12/31/how-to-use-arduino-nano-mini-pro-with-CH340G-on-mac-osx-yosemite.html

FunMiles commented 6 years ago

I have a similar situation but a bit more twisted. I installed the Silab drivers and I was able to plug in my NodeMCU and program it. I did run the blink program in two ways. One with the on-board LED and one with an outside LED connected to a pin and ground. Then I decided to try a WiFi http program. It seemed to work, but when I opened the serial console, the output was garbled as the console was running 9600 bauds instead of the 115k set for the program upload. I switched it to 115k and decided to unplug then replug the node mcu. Since then, the port never shows up anymore. I've tried swapping three other micro-USB cables and nothing works so far. I've un-installed and re-installed the Silab drivers twice as well. Is there any way to see outputs from the drivers that would indicate whether it is invoked or rejects the board?

PS: The board is working. I can connect to the server it creates on the network with the uploaded sketch. Yet it does not show the USB /dev/cu.... device file.

Resolution: I have installed the driver at the link from @rdedinsky and now it works. I can unplug and plug back the device and the /dev/cu.SLAB_USBtoUART file appears. What I don't understand is how it did work the first time without it.

More trouble After going back to working on an actual Arduino board and then back to the ESP board, the programming of the board failed at the very end. Then after I unplugged and plugged back in, once again, the /dev/cu.SLAB_USBtoUART file does not appears. Can anybody help?

thelinguist commented 5 years ago

I had the same problem as the original poster. When you are on a mac, and the board isn't appearing in the port, you may have forgotten to give permission for the driver to run. I was using Silab's driver, and although I gave permission for the INSTALLER to run, I did not give permission for the DRIVER to run (annoying!) Mac will block the driver from running after you install it (I was on OSX 10.13.6). If you have this problem, make sure you grant permission for the driver to run in System Preferences: screen shot 2019-03-02 at 9 41 50 pm I wasted several hours wondering why my board wasn't showing up in the ports menu, I hope this helps someone

gus-abreu commented 5 years ago

I wasted several hours wondering why my board wasn't showing up in the ports menu, I hope this helps someone

Thanks, that was it. If you're using MacOS Mojave, you need to give permission for the driver to run.

rafaeleyng commented 5 years ago

This:

image

doesn't show up for me on Mojave. Do you know how do I force it to appear? @thelinguist @ghabreu

gus-abreu commented 5 years ago

This:

image

doesn't show up for me on Mojave. Do you know how do I force it to appear? @thelinguist @ghabreu

It should appear right after installing / using the driver (causing it to be blocked). You may have to unlock the panel before under System Preferences > Security & Privacy.

Screen Shot 2017-07-12 at 10 32 12 AM
nileshku commented 4 years ago

Thread really helped. I am using board with cp2102 Link to driver download Link