Wemos d1 r2 upload over wifi using ArduinoDroid

Hi, thanks for reading my post.

I have bought a wemos board to upload sketches over wifi using ArduinoDroid which is a mobile version of Arduino sketch.

When I turn on the wifi on my phone, there is an available wifi connection to the board. It makes a stable connection between the board and the phone, but whenever I try to upload a sketch over wifi, there is an error. The port number typed in might be wrong cause I assumed it to be 8266. The IP address is correct given by the connection status.

Is it just impossible to upload a sketch without an initial setting using a usb connection or am I doing something wrong?

1 Like

This seems more a question for ArduinoDroid than here.

have you looked at ArduinoDroid - Arduino/ESP8266/ESP32 IDE for Android: Troubleshooting

Uploading

"SerialException"

From time to time i get serial exception reports. This is hardware-related issue and i have no idea why it happens. Vote for reliable uploading in order to help me finish with avrdude usage.

"No boards found" message

First, your android device have to support USB-Host mode (USB-OTG).
Second, try to use external power source for your arduino board (eg. my Arduino Nano v3 can't be found if it's not attached with external power supply as tablet can't provide enough current for the board). Try this app to make sure USB-Host feature is supported and available for your device.

If you're having such issue on Nexus 7 2013 you can try this solution. Thanks, Taylor!

Follow "Uploading checklist" below for other devices.

"No boards found" message on Galaxy Note devices

Solution from the user: "Both apps [ArduinoDroid and ArduinoCommander] work properly when I hook the arduino up through a powered usb hub.. It will not work directly from phone to arduino, but if I run it through a usb hub (powered or unpowered), it works fine". Thanks, Steve!

"The board did not reply within 1000ms" message

ArduinoDroid resets Arduino board before start uploading and for some reason it takes different times for different boards (even within the same board type), so standard delays can be unsuitable for your board. This can happen for internal uploader, i'd recommend avrdude uploader instead (choose uploader in app settings).

Avrdude failed to upload with some long output

You can try internal uploader instead of avrdude in app settings.

"Failed to set baud rate: -9"

Make sure you've selected right board type. Recent times more and more Arduino clones use CH340G instead of original FTDI. If you've purchase cheap Chinese one, that's your case most likely. Read more.

Failed to init libusb: -1 on Android Nougat devices

Android Nougat introduced permissions limitations so i had to fix it in ArduinoDroid 4.2. Read more.

Constantly fails to upload to Arduino Nano board

If you're using Arduino Nano with a new bootloader - it's supported starting ArduinoDroid 4.6.0. More info.

controlTransfer issue

Sometimes ArduinoDroid (4.9.0 or newer) fails to upload to Arduino Uno board with VID= 0x2341 and PID=0x43 with internal uploader with UartCdcAcm: Failed to init (controlTransfer) message in output panel. It can be reportedly (thanks, Russ Herman!) fixed by using external power supply for Arduino board.

Uploading checklist:

  1. Make sure your android device supports USB-Host feature (USB-OTG). Try USB Host Diagnostics app to define/fix it.
  2. Check your Arduino board is available via Android API ("Android section") using any USB Device info app like this.
  3. Check your USB-OTG cable. Some cheap cables support charging only and don't support data transfer. Make sure you can upload sketches using the cable from your pc/mac.
  4. Try to use external power supply or powered usb hub (plug both usb and power cable to arduino board). Some android devices with USB Host support are not powerful enough to power arduino boards and different arduino boards can require different power.
  5. Upload "Echo" sketch (that writes back everything it receives) in Monitor (menu / Actions / Monitor).
  6. Make sure you've selected right usb device as your device can have built-in USB devices like USB hub.
  7. Try to upload "Blink" sketch (from your desktop) or any sketch that is not using Serial class to avoid using USB from android device and from sketch on the Arduino board conflict.
2 Likes

That is correct:
https://arduino-esp8266.readthedocs.io/en/3.0.2/ota_updates/readme.html

the first firmware upload has to be done over a serial port. If the OTA routines are correctly implemented in the sketch, then all subsequent uploads may be done over the air.

The esp8266 boards platform comes with a library named "ArduinoOTA". You must upload a sketch to your Arduino that uses the ArduinoOTA library to watch for an OTA upload and write the incoming data to the ESP8266 board's flash memory. You will also need to make sure that every sketch you upload over OTA after that has the ArduinoOTA code, since if you upload a sketch without that code, or with the code not working correctly, you will not be able to upload again over OTA and you'll need to once more upload a good sketch over the USB cable.

Check the link above for lots of good information about OTA.

There might be some special considerations for ArduinoDroid. I don't have any experience with that application so I can't advise on that. However, I see that there are multiple options for OTA uploads, only one of which depends on the Arduino IDE, so it does look promising.

3 Likes

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.