liderbug
Posts: 189
Joined: Sat Oct 08, 2011 4:47 pm

ESP-8266 almost there, almost

Wed Sep 06, 2017 3:39 am

OK, I have a Makerfocus esp8266 board, uUSB port, rst & flash buttons (but no model num). It's connected to my Pi3. Anyhow I have Arduino IDE installed and can detect and start to Upload (blink) and >splat<

Code: Select all

/home/pi/.arduino15/packages/esp8266/tools/esptool/0.4.8/esptool -vv -cd nodemcu -cb 115200 -cp /dev/ttyS0 -ca 0x00000 -cf /tmp/arduino_build_413565/Blink.ino.bin 
produces:

Code: Select all

	setting board to nodemcu
	setting baudrate from 115200 to 115200
	setting port from /dev/ttyUSB0 to /dev/ttyS0
	setting address from 0x00000000 to 0x00000000
	espcomm_upload_file
	espcomm_upload_mem
opening port /dev/ttyS0 at 115200
	tcgetattr
	tcsetattr
	serial open
opening bootloader
resetting board
trying to connect
	setting character timeout 0
	done
	setting character timeout 1
	set timeout failed
	done
error: failed sending 0xC0
	espcomm_send_command: sending command header
error: failed sending 8 bytes
...
Connecting with 'screen' sits there until I type AT and it is the same as if I do the cat /dev/ttyS0 it looks like it's dumping all 4M of the 8266. I tried using the usb port to no avail so I pulled out my ribbon cable, breakout board and jumped 3v3, gnd, tx,rx. That's when the cat/screen started working. I found a post - pull down gpio0 - no change. I at Whitt's End. Oh, I can ping 192.168.4.1 - problem is my net is 192.168.ZERO.x.
Help please.
Thanks

tpylkko
Posts: 409
Joined: Tue Oct 14, 2014 5:21 pm

Re: ESP-8266 almost there, almost

Wed Sep 06, 2017 3:03 pm

You cannot flash the chip unless it is in a bootloader mode. This is achieved by pulling the Gpio pin down while hard resetting it. Some Linux distributions require a udev rule set so that a normal user can access USB connected devices. Did you write the compiled file in Arduino?

liderbug
Posts: 189
Joined: Sat Oct 08, 2011 4:47 pm

Re: ESP-8266 almost there, almost

Wed Sep 06, 2017 8:15 pm

On my RasPi I have the Arduino IDE programming tool - several examples built in - ie: blink. When I click on "Upload" it generates /tmp/arduino_build_700115/[113 files]. And I can from the tool find:

"/home/pi/.arduino15/packages/esp8266/tools/esptool/0.4.8/esptool -vv -cd nodemcu -cb 115200 -cp /dev/ttyS0 -ca 0x00000 -cf /tmp/arduino_build_413565/Blink.ino.bin"

and run it from the cmd line. It seems that right off the bat - Rst - the permissions on /dev/ttyS0 go to 620 and everything fails from then on. I added pi to group tty and to root - still fails.

I did find a posting that said "pull up gpio0" . That didn't do anything. You say pull the gpio pin down - which one? This is what I have https://images-na.ssl-images-amazon.com ... L1200_.jpg there's no model number and it seems there are 96 versions of the 8266 - well maybe not 96 but... the wifi is ESP-F but it's mounted on another board and I can't find any specs/manual. All sorts of web pages where "On your MS Windoz box..."

When you say "bootloader" mode - there is a "Flash" button - ? hold that down and tell the programmer to "Upload"?
Get me working and I owe'ya a beer.

Return to “General discussion”