make programming reset pulse longer for esp8266 and add notes to readme

v2.1
Thorsten von Eicken 9 years ago
parent fe2c74ea3d
commit df8afa82d0
  1. 17
      README.md
  2. 3
      esp-link/cgiwifi.c
  3. 2
      serial/serbridge.c

@ -365,8 +365,21 @@ it starts the connection with the `?\r\n` synchronization sequence.
(This is not well tested, more details forthcoming...)
Yes, you can use esp-link running on one esp8266 module to flash another esp8266 module!
For this to work you need a special version of esptool.py that has support for serial over
telnet.
The basic idea is to use some method to direct the esp8266 flash program to port 2323 of
esp-link. Using port 2323 with the appropriate wiring will cause the esp8266's reset and
gpio0 pins to be toggled such that the chip enters the flash programming mode.
One option for connecting the programmer with esp-link is to use my version of esptool.py
at http://github.com/tve/esptool, which supports specifying a URL instead of a port. Thus
instead of specifying something like `--port /dev/ttyUSB0` or `--port COM1` you specify
`--port socket://esp-link.local:2323`. Important: the baud rate specified on the esptool.py
command-line is irrelevant as the baud rate used by esp-link will be the one set in the
uC console page. Fortunately the esp8266 bootloader does auto-baud detection. (Setting the
baud rate to 115200 is recommended.)
Another option is to use a serial-to-tcp port forwarding driver and point that to port 2323
of esp-link. On windows users have reported success with
[HW Virtual Serial Port](http://www.hw-group.com/products/hw_vsp/hw_vsp2_en.html)
Debug log
---------

@ -113,7 +113,7 @@ wifiAddStateChangeCb(WifiStateChangeCb cb) {
DBG("WIFI: max state change cb count exceeded\n");
}
static bool mdns_started = true;
static bool mdns_started = false;
static struct mdns_info mdns_info;
// cannot allocate the info struct on the stack, it crashes!
@ -126,7 +126,6 @@ void wifiStartMDNS(struct ip_addr ip) {
mdns_info.server_port = 80, // service port
mdns_info.ipAddr = ip.addr,
espconn_mdns_init(&mdns_info);
espconn_mdns_enable();
mdns_started = true;
}
}

@ -211,7 +211,7 @@ serbridgeRecvCb(void *arg, char *data, unsigned short len)
if (mcu_reset_pin >= 0) GPIO_OUTPUT_SET(mcu_reset_pin, 0);
os_delay_us(100L);
if (mcu_isp_pin >= 0) GPIO_OUTPUT_SET(mcu_isp_pin, 0);
os_delay_us(100L);
os_delay_us(2000L);
if (mcu_reset_pin >= 0) GPIO_OUTPUT_SET(mcu_reset_pin, 1);
//os_delay_us(100L);
//if (mcu_isp_pin >= 0) GPIO_OUTPUT_SET(mcu_isp_pin, 1);

Loading…
Cancel
Save