-->
Page 1 of 1

esptool from Android

PostPosted: Wed Dec 12, 2018 7:51 pm
by Erik Schiegg
Hi folks,

I try to use esptool.py from an Android device and use the terminal of pyDroid 3.
I have problems to find the correct serial port, here is the error I got:

Code: Select all/storage/emulated/0 $ cd Download
/storage/emulated/0/Download $ ls /dev/tty.*
ls: /dev/tty.*: No such file or directory

/storage/emulated/0/Download $ cat /proc/tty/drivers

/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
rfcomm               /dev/rfcomm   216 0-255 serial
g_serial             /dev/ttyGS    235 0-3 serial
usbserial            /dev/ttyUSB   188 0-511 serial
acm                  /dev/ttyACM   166 0-31 serial
smd_tty_driver       /dev/smd      243 0-36 serial
msm_serial_hs        /dev/ttyHS    244 0-255 serial
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master

/storage/emulated/0/Download $ esptool.py --port /dev/ttyUSB erase_flash
esptool.py v2.5.1
Serial port /dev/ttyUSB
Traceback (most recent call last):
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/serial/serialposix.py", line 265, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/bin/esptool.py", line 2853, in <module>
    _main()
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/bin/esptool.py", line 2846, in _main
    main()
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/bin/esptool.py", line 2547, in main
    esp = ESPLoader.detect_chip(each_port, initial_baud, args.before, args.trace)
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/bin/esptool.py", line 244, in detect_chip
    detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled)
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/bin/esptool.py", line 213, in __init__
    self._port = serial.serial_for_url(port)
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/serial/__init__.py", line 88, in serial_for_url
    instance.open()
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/serial/serialposix.py", line 268, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB: [Errno 2] No such file or directory: '/dev/ttyUSB'
/storage/emulated/0/Download $


Re: esptool from Android

PostPosted: Sat May 04, 2019 11:05 pm
by Erik Schiegg
The problem seems to be that ESP8266 Loader can only upload firmware only without data.
See this video: https://youtu.be/gsCXKYdxzLk