Here's a demo, starting from a brand new ESP8266 module.
Code: Select all
jimmo@jimmo-x240: ~
11:17 $ esptool --port /dev/ttyUSB0 erase_flash
esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: 5c:cf:7f:19:a3:02
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 10.1s
Hard resetting via RTS pin...
jimmo@jimmo-x240: ~
11:17 $ esptool --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 ~/downloads/esp8266-20190125-v1.10.bin
esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting.......
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: 5c:cf:7f:19:a3:02
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0040
Compressed 615388 bytes to 399928...
Wrote 615388 bytes (399928 compressed) at 0x00000000 in 9.3 seconds (effective 528.7 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
jimmo@jimmo-x240: ~
11:18 $ miniterm.py /dev/ttyUSB0 115200
--- Miniterm on /dev/ttyUSB0 115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
MicroPython v1.10-8-g8b7039d7d on 2019-01-26; ESP module with ESP8266
Type "help()" for more information.
>>> import urequests
>>> help(urequests)
object <module 'urequests'> is of type module
Response -- <class 'Response'>
patch -- <function patch at 0x3ffef0f0>
__name__ -- urequests
request -- <function request at 0x3ffef0c0>
delete -- <function delete at 0x3ffef100>
get -- <function get at 0x3ffeefe0>
head -- <function head at 0x3ffef000>
post -- <function post at 0x3ffeeff0>
put -- <function put at 0x3ffef0e0>
usocket -- <module 'lwip'>
>>>