I'm new to programming Arduino boards. I have an Arduino Leonardo with Headers and I'm trying to upload a program to it. I've been getting this error:
avrdude: error: programmer did not respond to command: exit bootloader
Here's my Build Options:
I'm assuming my Port or Programmer isn't configured correctly. What should the Port and Programmer be? Do I need to install a driver?
Port
You should select port of serial communication with your board. It should look like this (I have connected Arduino UNO):
Programmer
In regular case programmer selection is irelevant. Arduino IDE uses programmer only if you want it. So if you want to upload your code with usb cable, you do not need to care about it.
Drivers
If you are sure, that your cable is working and Arduino port is not in the list of ports in Arduino IDE, you should install FTDI drivers. To install
Head over to the FTDI Chip drivers page
Scroll down a little to find the table of download links. Find your computer operating system in the list and select the appropriate download link
Download the driver to your computer
Open the installer DMG file
Open the FTDIUSBSerial.pkg file. This will open an installer dialog box. Click continue through the main windows, and agree to terms of software license agreement to install
Enter your admin password. Click Install Software. Wait while install processes. Installation should be successful.
Thanks to Jan Černý for the detailed response.
The actual solution to my problem however was getting the right cable. I was using a micro usb cable that must have been charge only.
Anyway, I bought one of these and the correct Port showed up.
Related
I can open my ESP32 Vroom32 device made by Espressif with a cp2101 chip on Ubuntu. I used Ubuntu to flash Micropython onto it, however when I try to connect with Putty, MPFshell or anything else on Windows 10 it will not work. I downloaded and installed the recommended drivers for it and also updated Windows which was supposed to load the driver as well. I can see the device and COM port in device manager but when I attempt to connect I get blocked. For example on MPFshell I get the message "Cannot connect to COM17"
It is a common reason for boards to show the "Cannot Connect to COM" error because of a bad USB cable.
Always check with another cable first, before getting deeper to the problem.
I'm new with NodeMCU firmware use. I have a Amica ESP-12E (v2?) dev kit connected to a DHT22 which I program using the Arduino IDE. All is setup and working fine.
My problem came when I wanted to update NodeMCU firmware. Since I don't really know what came pre installed from China, I downloaded ESPlorer to try to determine NodeMCU version. I get the following "error" when I reset the dev board:
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.
{{a long string of weird characters that I can't copy and paste appear here}}
At this point I'm totally clueless about what version of firmware I have. Is there a way to obtain NodeMCU firmware version by software via Arduino IDE code, ESPlorer GUI or something similar?
On the other hand, is there a really easy way to compile/download latest NodeMCU firmware BIN file? Even one with all the modules active will be fine for me now, I'm just trying to understand and test things.
You seem to be confusing two very different platforms. I leave out some details as not to confuse you any further.
Arduino: you use Arduino programming in the Arduino IDE then build and install a binary to your device whenever the application changes. No NodeMCU firmware needed!
NodeMCU: you flash the NodeMCU firmware once (e.g. using esptool.py) and then upload Lua code (e.g. using ESPlorer) whenever the application changes. This is more lightweight than the Arduino platform.
On the other hand, is there a really easy way to compile/download
latest NodeMCU firmware BIN file?
Yes, have a look at the NodeMCU documentation at http://nodemcu.readthedocs.io/en/latest/en/build/. The easiest is to use the cloud builder at https://nodemcu-build.com/. I currently suggest to build from the dev branch because flashing is easier with it.
As pointed out you have several options for firmware and you'll need to make a choice as to which suits you going forward. If you are going to stick with the Nodemcu LUA firmware you can determine the version by typing:
print(node.info())
at the command line prompt.
There are alternatives to using ESPlorer e.g. Putty or Coolterm that will give you the raw output from the device with no interpretation. So if you have the correct serial port settings and the device plugged into the USB port it will show the banner when you reset giving an indication of the origin and version of the installed firmware.
In ESPlorer, there is an option under settings which if unchecked will stop looking checking for the version of the code.
For whatever reason, ESPlorer is not designed to read nodemcu version.
The error message throws you off, could lead you to think, there is an error.
At best, the above error can be ignored. It has no impact at all. In background, init.lua is up and running.
Background info
WinAVR:
I installed WinAVR, and use avrdude.exe comes with WinAVR to download program into our board.
Adapter card:
We have an adapter card with FTDI4232 and AVR m328p on it. PC connects to FTDI4232 with a micro USB cable.
Schematic:
Sorry, I cannot post pics. So just describe the major part of schematic here. Two wires from(DATA_P & DATA_N pins) out from macro USB connector to DP[pin8] and DM[pin7] on 4232. And four wires(SCK, MOSI, MISO, SS_N) out from 4232 to m328p.
How to download program into the card before: Via pocket programmer. But we cannot give one pocket programmer to every engineer, so try to find out a way to download the program into m328p. Coz we have already had FTDI4232 on board, so this seems to be the best choice.
Can I download program via FTDI4232 on adapter card?
I know there is dedicated programmer based on 4232 chip, but this is our own design, I am not sure we can do it or not according to the above schematic.
what I did
Run this command:
C:\WinAVR-20100110\bin\avrdude.exe -c 4232h -p m328p -U flash:w:\Desktop\work\a_card\WinAVR\blink\blink.hex:i
But got the following error:
avrdude.exe: Error: no libftdi or libusb support. Install libftdi1/libusb-1.0 or libftdi/libusb and run configure/make again.
Then, download the compiled libftdi package from this link:
https://code.google.com/p/picusb/downloads/detail?name=libftdi1-1.0_devkit_mingw32_17Feb2013.zip
, and extract it as “compiled_libftdi”.
There is not too much info about how to use this compiled package, so I just found info online.
(1) I installed WinUSB driver for the first two ports of 4232 by Zadig. I can choose one port in the drop down menu, then choose “WinUSB(v6.1,7600…)”, “Install WCID Driver”.
(2) Then, enter into the “compiled_libftdi” folder, run “find_all”, I saw:
Number of FTDI devices found:1
Checking device: 0
Manufactureer: FTDI, Description: USB <-> Serial Converter
I think it means the USB driver for libftdi package installed successfully.
Run the above download command again, still failed.
I thought maybe because the avrdude.exe is out of date. So download a .exe from here:
http://download.savannah.gnu.org/releases/avrdude/avrdude-6.0.1-mingw32.zip
And replace the old one in the WinAVR folder.
Still got the error, but got one extra line info:
avrdude.exe: programmer operation not supported
I am trying find out how and with which program for OSX (10.5.8) I can configure serial ports? I am trying to establish a wireless connection between two Xbee´s (RF modules) and cannot figure out how to use ZTerm nor screen under Terminal. The setup I am using is: an Arduino+Xbeeshield+Xbee with external power supply, and an xbee on the xbee explorer connected to the Computer via USB.
I am trying to gather information on this through various forums, but most of them cover the configuration issue for PC using X-CTU (which I tried with CrossOver but it doesn´t recognize ny of my ports). According to one source, using screen under Terminal should show me all my serial ports, particularly /dev/tty.KeySerial1 - but it doesn´t show, even though I´ve plugged in both my arduino+xbee shield and the xbee on the explorer.
/dev/tty.KeySerial1 is incorrect.
First step is to get the FTDI USB driver installed if it has not yet been installed. The fastest way to determine if it is installed or not is to connect the XBee Explorer board. Then go look in /dev for a device named tty.usbserial-XXXXXXXX (Xs will be a unique hex ID). If you see multiple devices like this, then you probably have the Arduino plugged in too and you will need to disconnect it to determine what the device name is for the XBee Explorer board.
Once you know the device name, all you need to do is the command "screen /dev/tty.usbserial-XXXXXXXXX 9600". That should do it for you.
You can configure the tty device itself using stty. Be sure to redirect input from the terminal you want to configure, as stty operates on it's input. For instance, to set a serial port to 9600, no parity, 8 data bits, and 1 stop bit, aka "9600N81" in Windows parlance, try:
stty 9600 cs8 -cstopb -parenb < /dev/tty.usbserial-xxxxxxxx
Programmatically, you do this by opening the serial port and using the termios(4) ioctls on the device. See the termios(4) man page for more assistance.
I'm developing a project that has a number of hardware sensors connecting to the deployment machine through RS232 serial ports.
But ... I'm developing on a machine without an physical RS232 serial ports, but I would like to make fake serial ports that I can connect to and output data from with the aim of faking input from hardware sensors.
Does anyone know of a way to create a fake serial port and control it on Windows XP?
If you are developing for Windows, the com0com project might be, what you are looking for.
It provides pairs of virtual COM ports that are linked via a nullmodem connetion. You can then use your favorite terminal application or whatever you like to send data to one COM port and recieve from the other one.
EDIT:
As Thomas pointed out the project lacks of a signed driver, which is especially problematic on certain Windows version (e.g. Windows 7 x64).
There are a couple of unofficial com0com versions around that do contain a signed driver. One recent verion (3.0.0.0) can be downloaded e.g. from here.
I know this is an old post, but in case someone else happens upon this question, one good option is Virtual Serial Port Emulator (VSPE) from Eterlogic
It provides an API for creating kernel mode virtual comport devices, i.e. connectors, mappers, splitters etc.
However, some of the advertised capabilities were really not capabilities at all.
EDIT
A much better choice, Eltima. This product is fully baked. Good developer tech support. The product did all it claimed to do. Product options include both desktop applications, as well as software development kits with APIs.
Neither of these products are open source, or free. However, as other posts here have pointed out, there are other options. Here is a list of various serial utilities:
com0com (current)
com0com - With Signed Driver (old version)
Yet another place for com0com with Signed Driver (Pete's Blog)
Tactical Software
Termite
COM Port Serial Emulator
Kermit (obsolete, but still downloadable)
HWVSP3
HHD Software (free edition)
I use com0com - With Signed Driver, on windows 7 x64 to emulate COM3 AND COM4 as a pair.
Then i use COM Dataport Emulator to recieve from COM4.
Then i open COM3 with the app im developping (c#) and send data to COM3.
The data sent thru COM3 is received by COM4 and shown by 'COM Dataport Emulator' who can also send back a response (not automated).
So with this 2 great programs i managed to emulate Serial RS-232 comunication.
Hope it helps.
Both programs are free!!!!!
There's always the hardware route. Purchase two USB to serial converters, and connect them via a NULL modem.
Pro tips:
1) Windows may assign new COM ports to the adapters after every device sleep or reboot.
2) The market leaders in chips for USB to serial are Prolific and FTDI. Both companies are battling knockoffs, and may be blocked in future official Windows drivers. The Linux drivers however work fine with the clones.
Another alternative, even though the OP did not ask for it:
There exist usb-to-serial adapters.
Depending on the type of adapter, you may also need a nullmodem cable, too.
They are extremely easy to use under linux, work under windows, too, if you have got working drivers installed.
That way you can work directly with the sensors, and you do not have to try and emulate data.
That way you are maybe even save from building an anemic system.
(Due to your emulated data inputs not covering all cases, leading you to a brittle system.)
Its often better to work with the real stuff.
i used eltima make virtual serial port for my modbus application debug work. it is really very good application at development stage to check serial port program without connecting hardware.