wemos board D1

Hello world i have board wemos D1 or i am not sure is wemos D1 R2 and i purchase from ebay https://www.ebay.co.uk/itm/OTA-WeMos-D1-CH340-WiFi-Development-Board-ESP8266-ESP-12F-For-Arduino-UNO-R3-IDE/291707002105?hash=item43eb179cf9:g:OoAAAOSwxg5X0mmM.

I instal arduino ide 169 in ubuntu 12.04 lts 32 bits and and board http://arduino.esp8266.com/stable/package_esp8266com_index.json with version esp 2 1 0

i configure the board in arduino ide Wemos D1 R2 & mini ; cpu 80 mhz ;
flas size 4M (3M SPIFFS) ; PORT /dev/ttyUSB0 ; upload speed 921600 ; Programer - AVRISP-mkII ; Upload using - serial.

i put example ESP 8266 BLINK

/*
ESP8266 Blink by Simon Peter
Blink the blue LED on the ESP-01 module
This example code is in the public domain

The blue LED on the ESP-01 module is connected to GPIO1
(which is also the TXD pin; so we cannot use Serial.print() at the same time)

Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/

void setup() {
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is acive low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
}

AND I HAVE THIS ERROR ; HOW TO FIX THAT :

Arduino: 1.6.9 (Linux), Board: "WeMos D1 R2 & mini, 80 MHz, Serial, 921600, 4M (3M SPIFFS)"

Board d1_mini (platform esp8266, package esp8266) is unknown

Error compiling for board WeMos D1 R2 & mini.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

HOW TO FIX THIS ERROR THANKYOU

This error indicates you have two versions of the ESP8266 core for Arduino installed. Often this happens when you change from one version to another and the Arduino IDE doesn't fully remove the previous version. For example, you say you have version 2.1.0 installed but maybe you first installed the latest version, 2.3.0, then decided you wanted 2.1.0 instead.

Try this:

  • Open /home/(username)/.arduino15/packages/esp8266/hardware/esp8266
  • You will probably see two folders at this location (e.g. 2.1.0 and 2.3.0). Delete the folder of the version that you are no longer using.

THANKS but i have this forders ; packages ; staging ; library_index.json ; package_esp8266com_index.json ; package_esp8266com_index.json.sig.tmp ; package_index.json ; package_index.json.sig ; preferences.txt

OK, that's the contents of /home/(username)/.arduino15 but you need to go deeper. Now follow the rest of the path I told you: /home/(username)/.arduino15/packages/esp8266/hardware/esp8266

Hello Pert i did like you say and i have only 1 folder 2.0.0-rc1 and i have this error 2.0.0-rc1

Sketch uses 198,560 bytes (19%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 32,870 bytes (40%) of dynamic memory, leaving 49,050 bytes for local variables. Maximum is 81,920 bytes.
warning: espcomm_sync failed
error: espcomm_open failed

mi preferences.txt is showing like that

board=d1
boardsmanager.additional.urls=http://arduino.esp8266.com/staging/package_esp8266com_index.json
browser=mozilla
build.verbose=false
build.warn_data_percentage=75
compiler.warning_level=none
console=true
console.auto_clear=true
console.error.file=stderr.txt
console.length=500
console.lines=4
console.output.file=stdout.txt
custom_CpuFrequency=d1_80
custom_FlashSize=d1_4M3M
custom_UploadSpeed=d1_57600
custom_UploadTool=d1_esptool
editor.antialias=true
editor.caret.blink=true
editor.code_folding=false
editor.divider.size=0
editor.external=false
editor.font=Monospaced,plain,12
editor.indent=true
editor.invalid=false
editor.keys.alternative_cut_copy_paste=true
editor.keys.home_and_end_beginning_end_of_doc=false
editor.keys.shift_backspace_is_delete=true
editor.languages.current=
editor.linenumbers=false
editor.save_on_verify=true
editor.tabs.expand=true
editor.tabs.size=2
editor.update_extension=true
editor.window.height.default=600
editor.window.height.min=290
editor.window.width.default=500
editor.window.width.min=400
export.applet.separate_jar_files=false
export.application.fullscreen=false
export.application.platform=true
export.application.stop=true
export.delete_target_folder=true
gui.scale=auto
last.ide.1.6.9.daterun=1513443400
last.ide.1.6.9.hardwarepath=/opt/arduino-1.6.9/hardware
last.screen.height=768
last.screen.width=1024
last.serial.location=54,80,906,339
last.sketch.count=1
last.sketch.default.location=45,21,979,747,561,6
last.sketch.default.path=/home/luna/.arduino15/packages/esp8266/hardware/esp8266/2.0.0-rc1/libraries/esp8266/examples/Blink/Blink.ino
last.sketch0.location=45,21,979,747,561,6
last.sketch0.path=/home/luna/.arduino15/packages/esp8266/hardware/esp8266/2.0.0-rc1/libraries/esp8266/examples/Blink/Blink.ino
last.sketch1.location=262,159,500,600,439,0
last.sketch1.path=/home/luna/.cache/.fr-jXpUcX/WifiTest/WifiTest.ino
launcher=xdg-open
platform.auto_file_type_associations=true
preproc.color_datatype=true
preproc.enhanced_casting=true
preproc.imports.list=java.applet.,java.awt.Dimension,java.awt.Frame,java.awt.event.MouseEvent,java.awt.event.KeyEvent,java.awt.event.FocusEvent,java.awt.Image,java.io.,java.net.,java.text.,java.util.,java.util.zip.,java.util.regex.*
preproc.output_parse_tree=false
preproc.save_build_files=false
preproc.substitute_floats=true
preproc.substitute_unicode=true
preproc.web_colors=true
programmer=arduino:avrispmkii
proxy.manual.hostname=
proxy.manual.password=
proxy.manual.port=
proxy.manual.type=HTTP
proxy.manual.username=
proxy.pac.url=
proxy.type=auto
recent.sketches=/home/luna/.arduino15/packages/esp8266/hardware/esp8266/2.0.0-rc1/libraries/esp8266/examples/Blink/Blink.ino,/opt/arduino-1.6.9/examples/01.Basics/Blink/Blink.ino,/home/luna/Arduino/sketch_dec02b/sketch_dec02b.ino,/home/luna/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/libraries/esp8266/examples/Blink/Blink.ino,/home/luna/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/esp8266/examples/Blink/Blink.ino,/home/luna/.cache/.fr-jXpUcX/WifiTest/WifiTest.ino
run.display=1
run.options=
run.options.memory=false
run.options.memory.initial=64
run.options.memory.maximum=256
run.present.bgcolor=#666666
run.present.exclusive=false
run.present.stop.color=#cccccc
serial.databits=8
serial.debug_rate=115200
serial.parity=N
serial.port=/dev/ttyUSB0
serial.port.file=ttyUSB0
serial.port.iserial=null
serial.stopbits=1
sketchbook.path=/home/luna/Arduino
software=ARDUINO
target_package=esp8266
target_platform=esp8266
update.check=true
update.id=7061268022483417404
upload.using=bootloader
upload.verbose=false
upload.verify=true

That's progress!

When you have trouble uploading I recommend you to turn on verbose upload output (File > Preferences > Show verbose output during: compilation (uncheck) > upload (check) > OK).

Are you sure you have the right port selected from the Tools > Port menu?

Have a read of this to see if it will help with your problem:
https://arduino-esp8266.readthedocs.io/en/latest/faq/a01-espcomm_sync-failed.html

verbouse output during - i enable upload and disable compilation and i have this error

Sketch uses 198,560 bytes (19%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 32,870 bytes (40%) of dynamic memory, leaving 49,050 bytes for local variables. Maximum is 81,920 bytes.
/home/luna/.arduino15/packages/esp8266/tools/esptool/0.4.6/esptool -vv -cd nodemcu -cb 57600 -cp /dev/ttyUSB1 -ca 0x00000 -cf /tmp/build2c26f2bccc1d0f4bd7f6026101e651ea.tmp/Blink.ino.bin
esptool v0.4.6 - (c) 2014 Ch. Klippel ck@atelier-klippel.de
setting board to nodemcu
setting baudrate from 115200 to 57600
setting port from /dev/ttyUSB0 to /dev/ttyUSB1
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
stat /tmp/build2c26f2bccc1d0f4bd7f6026101e651ea.tmp/Blink.ino.bin success
opening port /dev/ttyUSB1 at 57600
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
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
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
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
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
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
warning: espcomm_sync failed
error: espcomm_open failed

maybe the linux ubuntu i have to reconfigure the usb port com ? or can i check the connection of port of wemos board ?

luna@luna-Vostro-1500:~$ lsusb
Bus 002 Device 004: ID 05a9:2640 OmniVision Technologies, Inc. OV2640 Webcam
Bus 002 Device 003: ID 18a5:0302 Verbatim, Ltd Flash Drive
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0461:4d16 Primax Electronics, Ltd
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 413c:8138 Dell Computer Corp. Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard EAP-SIM Port
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 004: ID 0a5c:4503 Broadcom Corp. Mouse (Boot Interface Subclass)
Bus 003 Device 003: ID 0a5c:4502 Broadcom Corp. Keyboard (Boot Interface Subclass)
Bus 003 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
luna@luna-Vostro-1500:~$

is showing when wemos board is connect to ubuntu

and here is showing when is not connected to pc the wemos board

luna@luna-Vostro-1500:~$ lsusb
Bus 002 Device 004: ID 05a9:2640 OmniVision Technologies, Inc. OV2640 Webcam
Bus 002 Device 003: ID 18a5:0302 Verbatim, Ltd Flash Drive
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0461:4d16 Primax Electronics, Ltd
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 413c:8138 Dell Computer Corp. Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard EAP-SIM Port
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 004: ID 0a5c:4503 Broadcom Corp. Mouse (Boot Interface Subclass)
Bus 003 Device 003: ID 0a5c:4502 Broadcom Corp. Keyboard (Boot Interface Subclass)
Bus 003 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
luna@luna-Vostro-1500:~$

i think Ubuntu doesnt want to connect the usb device ?

Try a different USB cable and a different USB port because the Wemos is not showing up. Also this might help.

Use the following in Preferences Board Manager URLs. The staging version is old.

http://arduino.esp8266.com/stable/package_esp8266com_index.json

is not working

Build options changed, rebuilding all

Sketch uses 222,137 bytes (21%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 31,512 bytes (38%) of dynamic memory, leaving 50,408 bytes for local variables. Maximum is 81,920 bytes.
/home/luna/.arduino15/packages/esp8266/tools/esptool/0.4.8/esptool -vv -cd nodemcu -cb 115200 -cp /dev/ttyUSB0 -ca 0x00000 -cf /tmp/buildd48bdb3d4f01512ebdd6db3464b05548.tmp/Blink.ino.bin
esptool v0.4.7 - (c) 2014 Ch. Klippel ck@atelier-klippel.de
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from /dev/ttyUSB0 to /dev/ttyUSB0
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
opening port /dev/ttyUSB0 at 115200
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
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
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
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
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
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
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed

Use lsusb and dmesg (see the article I linked to above) to determine which device is the Wemos. You seem to have more than one serial device on your PC. The other device is a 3G radio so do not mess with it. The Wemos board might also be dead which would explain why it does not show up in your previous lsusb posting. Try the board on a different computer to see it works. If you do not understand the article, post the output of dmesg.

Here is what I see from lsusb for a board using the CH34x USB serial chip. NodeMCU boards use the same chip.

Bus 00x Device 0xx: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

Linux 12.04 is 5 years old so it might not support the CH34x USB serial device.

dmesg.

dmesg.

[ 0.914827] usb usb6: Product: UHCI Host Controller
[ 0.914829] usb usb6: Manufacturer: Linux 4.4.0-78-generic uhci_hcd
[ 0.914831] usb usb6: SerialNumber: 0000:00:1d.1
[ 0.914979] hub 6-0:1.0: USB hub found
[ 0.914987] hub 6-0:1.0: 2 ports detected
[ 0.915308] uhci_hcd 0000:00:1d.2: UHCI Host Controller
[ 0.915315] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 7
[ 0.915323] uhci_hcd 0000:00:1d.2: detected 2 ports
[ 0.915346] uhci_hcd 0000:00:1d.2: irq 22, io base 0x00006f40
[ 0.915402] usb usb7: New USB device found, idVendor=1d6b, idProduct=0001
[ 0.915404] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.915407] usb usb7: Product: UHCI Host Controller
[ 0.915409] usb usb7: Manufacturer: Linux 4.4.0-78-generic uhci_hcd
[ 0.915411] usb usb7: SerialNumber: 0000:00:1d.2
[ 0.915556] hub 7-0:1.0: USB hub found
[ 0.915564] hub 7-0:1.0: 2 ports detected

Nothing in the dmesg output shows you plugged in a USB serial device. The plugged in device is a USB hub with nothing on its ports.