Arduino nano 3 - avrdude: stk500_getsync(): not in sync: resp=0x00 - arduino

I have got an arduino nano v 3.0.
When I tried to install drivers using arduino installation folder, it not shows any driver for nano board. I installed the driver from FTDI website.
When i upload the program to board, it's uploaded correctly, but the program is not working. IDE shows the error
avrdude: stk500_getsync(): not in sync: resp=0x00
at console after uploading the program to board.
My OS is Win 8.1 64 bit

Solution for my problem with Nano clone (based on CH340 not FTDI) was to change baud rate to 57600.
Following command line works for me:
avrdude.exe -v -P COM3 -c arduino -p atmega328p -b57600 ...

I was able to fix this by selecting the right board that I was using from the Tools Menu. Tools>Boards>Arduino Model

I had the same problem with a nano chinese clone with the 340. The solution for me was to reset the baud rate in device manager to 57600. At first it did not work until I pressed the reset on the nano. Bottom line baud rate to 57600 press reset before uploading.

i have removed all drivers available in computer currentely for arduino connecitn while it is connected to computer.
installed this file
http://www.ftdichip.com/Drivers/CDM/CDM20824_Setup.exe
It worked perfect.

Related

Unable to upload code to Arduino Mega in Ubuntu VM (computer is Win10)

I'm trying to upload code to an Arduino-Mega in Ubuntu 18.04. I'm using Oracle Virtual Machine to run Ubuntu and my computer is Win10.
From Win10, the port the Arduino is using is COM3. In the VM settings, I have these settings for Serial Port 1:
In Ubuntu, I run 'sudo arduino' in the terminal and compile my code.
In the Arduino IDE, the only Serial Port I can connect to is ttyS2:
When I try to upload the code, I get these error messages:
Before, I kept having the error message "Native Serial Port, can't obtain info", but now I just get these error messages.
Any help is appreciated, thank you everyone!
The issue was simple, I forgot to select the Arduino in the Ubuntu environment (Devices > USB > Arduino)

AVRDude/USBTiny failing to initialize with ATMega2560 using AVR Pocket Programmer

I have a brand new Atmega2560 sitting on a board that I made. I'm trying to use a Sparkfun AVR Pocket Programmer to program the board with USBTiny/AVRdude but when I input avrdude -c usbtiny -p atmega2560 -v -v -v into the CMD for avrdude, I'm getting an error as seen below
avrdude: programmer operation not supported
avrdude: Using SCK period of 10 usec
CMD: [ac 53 00 00] [00 00 00 00]
CMD: [ac 53 00 00] [00 00 00 00]
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
I checked connections and the board is fine. I was able to program it with a friends AVR Pocket Programmer without issue. For some reason, this one isn't working. I programmed another board I have without issue so I don't think it's the pocket programmer. I would use his again, but he's in another state.
Any ideas?
So I ended up triple checking my connections and MOSI wasn't fully connected to the board. Strange.
Suggestions for those who run into this issue in the future:
Check connections. Double check connections. Triple check connections. Make sure the pad from the MCU is touching the pad of the board
Try slowing the speed of the read. ex: avrdude -c usbtiny -p atmega2560 -B 250
Make sure your avrdude is upto date - I'm currently using avrdude version 6.0.1
Make sure your drivers are up to date
From what I've read, with other peoples experiences, is that it is usually number 1 - the connections not being correct.
For others, if you changed your fuses and it stopped responding. You may have 'bricked' your MCU and need the programmer/debugger from AVR to unbrick it.

Code is not uploading in new aurdino mega

I am new(new purched board and me also) in arduino programming. when I am uploading my code in ardino mega board (using Aurdino 1.8.2) i am getting following error
Arduino: 1.8.2 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
Sketch uses 1482 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM3 -b115200 -D -Uflash:w:C:\Users\Admin\AppData\Local\Temp\arduino_build_393128/Blink.ino.hex:i
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM3
Using Programmer : wiring
Overriding Baud Rate : 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
An error occurred while uploading the sketch
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude done. Thank you.
How i solve this problem.
My setting are as follows
.
rest of them are as default. also my driver are up to date in device manager.
First, try a loopback test. If that fails, you have a problem with the hardware most likely. If it passes, try replacing the avr directory with another version. Additionally, if pins 1 or 0 are connected to anything, this error could be caused. That is because these pins are used for Tx/Rx. Additionally, the bootloader for the mega will break if you use !!! in your code. If all of that fails to help, try reinstalling the FTDI drivers.

Arduino _command_line_ sketch upload: avrdude: stk500_recv(): programmer is not responding

When trying to upload the sketch from the command line I get a
avrdude -vvv -F -V -c arduino -p ATMEGA328P -P /dev/ttyACM0 -b 115200 -U flash:w:test.hex
avrdude: Version 6.0.1, compiled on Oct 21 2013 at 15:55:32
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/toni/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
but from the Arduino IDE it works flawlessly, so, obviously, the IDE is doing something I don't know about.
I've tried activating "Show detailed output during upload" but the output window history is way too short to view the commands launched. I can only see the end of the successful upload.
I'm guessing the IDE resets somehow the Arduino to talk to the booloader before the already loaded sketch starts running
Ho could I do this from the command line (without the IDE) ?

Unable to program NodeMCU

This question is related to this, Cannot program ESP8266, but different settings.
I have a NodeMCU devkit v1, its comercial name is NodeMCU v2. I tried different setting to connect the devkit.
First the devkit has a usb-serial bridge (CP2102) and voltage adapter from 5v (USB) to 3.3v. So I connect the devkit with the machine via USB. The driver is installed correctly, and I can see the com, it is COM3.
After turning on the NodeMCU I can see a Wifi AI-THINKER-adfe21.
Then I tried with the nodemcu-flasher - WINDOWS.
Without any button or pin to ground. I press Flash in the flasher and stay Waiting MAC and the log says Begin Find ESP8266 as the question I told in the begin and the ESP's led (blue led) blinks.
Holding FLASH, press RESET, release FLASH. Still the same like 1.
Wire D3 (GPIO0) to GND. Same result
With ESPtool - LINUX - Trying these commands
python2 esptool.py --port /dev/ttyUSB0 read_mac
python2 esptool.py --port /dev/ttyUSB0 write_flash 0x00000 firmware.bin
Without any button or pin to ground. The output for the commands was Connecting... A fatal error occurred: Failed to connect to ESP8266
Holding FLASH, press RESET, release FLASH. Same
Wire D3 (GPIO0) to GND. Same result.
Via Arduino IDE, I installed the ESP8266 board and selected NodeMCU 1.0. The result to try upload some code -> warning: espcomm_sync failed error: espcomm_open failed
I tryed to connect the NodeMCU without the USB. Using an Arduino UNO, connecting like following... And I'm getting the same errors.
UNO | NodeMCU
5v -> Vin
GND -> GND
Rx -> Tx
Tx -> Rx
The last test I made, it is with Putty or Arduino SerialMonitor connect to the COM3 or /dev/ttyUSB0 and turning on the NodeMCU. I should see some characters or garbage if it in different baud rate. But I got nothing, the terminal is blank. I restart the NodeMCU, put it in Flash mode. No response.
Are there some solution, tip or trick to make it programmable?
PS: I know the NodeMCU is in Flash mode because its wifi disappear.
EDIT:
I discovered something.
I just connected the NodeMcu with a mobile charger and connect the D0 to Serial ground and D3 to Serial Rx. On the putty with 115200 Baudrate, I'm able to get the following code on reset.
node : sta(mac address) + softAP(mac address)
add if0
add if1
dhcp server start:(ip:192.168.4.1, mask:255.255.255.0,gw:192.168.4.1)
bcn 100
I have been working with both the node-mcu flasher and the esptool.
First in the esptool yo should use more parameter in the call. Use something like this
python esptool.py -p SERIAL_PORT_NAME --baud 9600 write_flash --flash_size=8m 0 firmware-combined.bin
Be careful with the baudrate, i always use 9600.
If you prefer using the windows program you should only connect the ESP8266 through usb and dont connect any other pin. If it still gives you problems you should check that u have installed the com ports.
Good Luck
if you are using esptool (either in Linux or windows), you should include -fm and -fs inside the esptool command. There will be no response if you did not include those 2 parameter even though it show successfully upload. you can refer the detail in this youtube tutorial or its description for flashing firmware in nodemcu V2 or v1.0.
esptool.py --port [serial-port-of-ESP8266] write_flash -fm [mode] -fs [size] 0x00000 [nodemcu-firmware].bin
Tutorial on how to flash firmware using esptool(windows):
https://www.youtube.com/watch?v=MHrm7axsImI
cheers!
Maybe you can try this setting.
$sudo esptool.py -p /dev/ttyUSB0 --baud 115200 write_flash -fs 16m -fm qio -ff 0x00000 firmware.bin

Resources