Unable to burn program into NodeMCU when it's soldered to a board - esp8266

I seem to have come across a strange issue. When my NodeMCU is connected onto a PCB circuit, I am unable to burn the program into it (even though the board is not powered up!). It says:
espcomm_open failed
espcomm_upload_mem failed
But the very same NodeMCU, when I pull it out of the circuit and try to upload the code works fine. Why is this?
P.S. Well, I can pull out the NodeMCU, burn the program and re-insert it, but I am trying to understand what's happening behind it.

I think your comm port is getting closed or used when you plug it into the pcb circuit. So the Arduino IDE cannot comunicate with the nodeMCU com port.
I had simmilar problems and after xxx attempts i uploaded it when the Nodemcu was unpluged from the PCB and worked perfectly.
I lately found out that the pcb used com port pin.

Related

ESP8266 flush program after power lost

I program my ESP8266 with a Arduino Uno and this guidance: Programming the ESP8266 With the Arduino IDE in 3 Simple Steps
Wifi connect, Mqtt connect (subscribe, publish, callback) everything works fine and totally like expected.
But after I disconnect the power from the Arduino Board and reconnect to a another V3.3 power source, the ESP8266 behavior is like a complete clean flushed device and nothing happens.
For programming I use this settings (Arduino IDE 1.8.12):
What I am doing wrong here?
EDIT
1.) I try two different ESP8266, and 3 different scretches (1. proved working in the past, 2. simple blink sketch, 3. sketch with my code I need)
2.) the program stops immediately after disconnecting CH_PD from 3.3V
3.) I update the esp8266 board package to the newest version 2.6.3
The main issue here is my bad documentation. After a long time, I found the solution again here: Easiest ESP8266 Tutorial (Using arduino). Like the first time two years ago. In conclusion, I forgot to disconnect GPIO0 from GND after programming.
The correct way after programming is:
disconnect arduino
disconnect gpio0 from gnd
connect power to esp8266
Thanks to LiveSparks creating and uploading this great video.

NodeMCU - can't communicate at all via serial?

I just received my NodeMCU, I have installed the CP210x driver. It shows up as: /dev/tty.SLAB_USBtoUART
This is under OSX 10.11.6.
However, I cannot upload any sketch via Arduino (I have installed the ESP community libraries). I cannot even get a response using esptool, for example if I try:
esptool.py -p /dev/tty.SLAB_USBtoUART -b 9600 read_flash_status
Then I just get "Connecting..." and nothing else happens. I am wondering if it is stuck in flash mode maybe? I don't know how to check this though or how to get it out if so. Or have I just been sold a bad device? Is there any way I can tell? I have tried two USB cables but I am not also powering the board with an external power supply. Could this be the issue?
Any advice would be great, I have plenty of experience with Arduino but completely new to the ESP.

starting with nodemcu/esp8266 dev board

I have a esp dev board that I've been trying to get to work, but have faild miserably. after spending a few days trying I was able to 'flash' a firmware and up load code(to connect to my wifi) via arduino IDE. the problems are when I open the serial monitor the serial monitor window is nowhere to be seen(it refuses to show up on my desktop, but if I place my mouse over arduino IDE on the task bar I can see a tiny version of the window with what seems like the esp is supposed to tell me). I verified the wifi program was working with advanced ip scanner. The other problem is that when I try to use esplorer I am told the following:
Communication with MCU..Got answer! Communication with MCU established.
AutoDetect firmware...
Can't autodetect firmware, because proper answer not received (may be unknown firmware).
Please, reset module or continue.
à‚3þÿÖ
ü
I've tried reseting via hardware and software and also saving a init.lua to the esp ( which I am told: Waiting answer from ESP - Timeout reached. Command aborted.)
Is there an easy step by step tutorial or something where I can get this thing to work in such a way that it is possible to develop with it? I dont care what language I have to use as long as I dont have to spend more time on trying to get the hardware to work. For something that is Arduino-like hardware it is significantly harder to do the simplest thing, a pic mcu is easier.es
If you are doing serious IoT thing then, I guess its better to go by Espressif IDE. There's a Freetos version also available which makes programming experience better.
To get started step by step you can check lot of videos on youtube, that's my preferred way of getting started. I found these three helpful to get started : here

BeagleBone Black doesn't power on

I am working in a technology Laboratory. We have 15 BBB, an suddenly, 5 of them didn't power on any more.
They stay with the power on Led on, but nothing more happens.
Picture:
What can i solve the problem?
Thank you
Prior to solve the problem, you probably have to investigate it first.
I would verify those beaglebones are still functional:
That is, checking if the beaglebone black is displaying any messages on the serial console,
The procedure for connecting a USB-to-TTL adapter is described here.
I would strongly suggest to buy the exact adapter featured in the article above on e-bay
if you don't have one.
If there were no messages displayed on the serial console, I would attempt to load u-boot from the serial port.
This can be done by connecting both P8.44/SYS_BOOT3/LCD_DATA3/GPIO2_9
and P8.43/SYS_BOOT2/LCD_DATA2/GPIO2_8 to the ground (two of P9.43/P9.44/P9.45/P9.46) using two 4.7 k
ohm resistors, powering the beaglebone with an external 5V power supply (not by USB),
and power-cycling the beaglebone - power-cycling IS required, performing a 'reset' is
not enough for the new SYSBOOT configuration to be taken into account.
You can then download u-boot from your PC using Teraterm: u-boot-spl-.bin should
be downloaded using x-modem, and u-boot.bin using y-modem, as described in the
'Boot over UART' section of this TI wiki article.
Once you have u-boot running, you should be able to reinstall your beaglebone using information available on the Internet.
If you cannot boot using the boot ROM and the serial port, this would probably be a bad sign.
I would suggest to try the procedure for loading u-boot from the serial port with a beaglebone you know is working, this is totally non-intrusive providing that you don't modify the eMMC from u-boot.

Need help using Arduino R3 as serial-to-usb converter (to program something)

I have researched (and learnt quite a bit), but I have little experience in programming and only really understand basic sketches so far. I would like to use the Arduino R3 (more specifically, the usb to serial converter chip) to program a full-size hobby radio.
I have connected my radio to the Arduino appropriately (5V, Rx, Tx, Gnd) and put the Arduino into Tristate mode (apparently you have to do this..), but I seem to be lacking appropriate drivers. I basically want my Arduino R3 to function exactly like this: CP2102 . Please note that I am not being super cheap. To get something like that where I live would take at the very least a month. Some people also say that I should remove the Atmega chip. The ultimate goal is that I have a device, with drivers, on a com port and not just an "unknown device".
So, my questions are: leave the Atmega on, or remove it? and which drivers do I need?
Thanks!
EDIT: I found almost exactly what I need just after I posted. For some reason I couldn't get it to work, but maybe you could help me understand? Here's the link LINK If anyone is keen to help me out!
Just to make it clear: it has been done before, but I get the feeling people leave out things which they think are obvious, but to the not-yet-professional tinkerer like me aren't :/
Thanks so much!
It seems like the links you reference are for older Arduinos with an FTDI chip. The Arduino Uno doesn't use that. Here's a link for using the Uno
So! All of the older Arduinos (NG, Diecimila and Duemilanove) have
used an FTDI chip (the FT232RL) to convert the TTL serial from the
Arduino chip (Atmel ATmega). This allows for printable debugging,
connecting to software like PureData/Max, Processing, Python, etc.
etc. It also allows updating the firmware via the serial bootloader.
The good news about the FT232RL has royalty-free drivers and pretty
much just works. The bad news is that it can -only- act as a
USB/Serial port. It can't act like a keyboard, mouse, disk drive, MIDI
device, etc.
and
The Arduino Uno has a number of facilities for communicating with a
computer, another Arduino, or other microcontrollers. The ATmega328
provides UART TTL (5V) serial communication, which is available on
digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels
this serial communication over USB and appears as a virtual com port
to software on the computer. The '16U2 firmware uses the standard USB
COM drivers, and no external driver is needed. However, on Windows, a
.inf file is required. The Arduino software includes a serial monitor
which allows simple textual data to be sent to and from the Arduino
board. The RX and TX LEDs on the board will flash when data is being
transmitted via the USB-to-serial chip and USB connection to the
computer (but not for serial communication on pins 0 and 1).
Basically the LINK you provided, shows the user HACKING the Arduino. Using the USB/Serial(TTL) converter(what ever chip that is on your Arduino) to link to the Radio's Mini Din connector, in place of connecting to the Arduino's CPU.
As stated in other answer the Arduino uses a CHIP (of some flavor) to bridge the USB(Virtual Serial Port) to the Serial Port of the ATmega328 micro. These pins are available on the Shields connector 0(RX) and 1(TX). Hence you see the picture wiring those pins to the Radio's DIN connector.
Where I would expect in addition the RESET of the Arduino's CPU would be held to GND, this would force the pins into Hi. Simply with an extra wire jump the RESET pin to a GND.
It's working! Somewhere along the line the drivers for my arduino seem to have been deleted, so I reinstalled them, did what you said, and learnt something.
So to clarify for others: pretty much plug and play (as the link I posted suggests), but make sure to install the arduino drivers properly.
Thanks a lot for the help!

Resources