Arduino serial monitor does not show anything for AT command - arduino

I am a beginner to arduino and trying to follow one of the videos from youtube to make a project- Master And Slave using HC-05 modules. I followed every step from that video carefully. Here's the link to the video -> https://www.youtube.com/watch?v=BXXAcFOTnBo For Slave Module when I type AT commands in the serial monitor nothing shows up. I searched in Internet for the this problem and still didn't fix it. Here's What i have done:
tired restarting my pc
tried Changing arduino, At first i used arduino nano and then uno
I tried changing the baud rate to all other values and nothing happened
And there is no change in light blink, it stays on AT command mode until power is turned off and on again.
This is how is looks
Thank You For the Answer

Not responding to AT commands is common with cloned HC-05 modules. The biggest reason for this is that the ENABLED pin is not plugged in. Right next to the VCC pin, there is a pin called KEY that should be idle. When you feed that pin with 3.3V, you will see that you get a response to the AT commands. If you don't get any response, don't forget to press the button on the BT Module after making the connection. If that doesn't work, be sure to remove the EN pin and press the button again. You should try these ways until you get a response from the AT command. Every time you write AT on the serial port screen, the bluetooth module will also respond to these requests with the led on it.

Related

How to fix Failed to connect to ESP32: Timed out waiting for packet header error?

I tried to flash an ESP32 but I didn't succeed, I tried with esptool.py and Arduino IDE. I tried to press the boot button and reset but it didn't work. Here is the error:
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
If using the Arduino IDE, try lowering the upload speed (Tools/Upload Speed). Lowering mine from 921600 to 460800 did the trick.
First ensure that you are in download mode:
Start the serial monitor and set the speed (mine is 115200).
While pressing the "boot" button, press and release the "en" button (your buttons may be labeled differently).
You should see something like this on the serial monitor:
waiting for download
Now start the upload
My development machine, a 2013 iMac is connected via USB to the USB-c port on my ESP32 Dev Module. Apparently the iMac's USB or ESP32 board's USB cannot keep up at the 921600 upload speed.
DISCLAIMER! May not be correct answer but may help to save time for someone.
Quick answer if you do not want read my experience: Disconnect all wires from pins and try uploading again! It may help.
I came across with the same error and could not figure it out. I first thought that something is wrong with the code, because it happened after I edited working code while figuring out where to connect what pin 😀. I also wasn't able to upload simple HelloWorld after it happened with connected wires. But then I disconnected all my wires from the board and the upload works fine.
I can not figure out the WHY factor but I think it must had been the input/data pin I was using, in my case D13. I have the DevKit with fewer pins. Maybe someone can comment why connected pins may make the error come up?
To make your ESP32 board go into flashing/uploading mode automatically, you can connect a 10 μF electrolytic capacitor between the EN pin and GND. When I had the same problem, when I followed this advice, the problem was solved.
References
Failed to connect to ESP32: Timed out waiting for packet header
espressif/arduino-esp32 - issue
On some AliExpress-like ESP32s you have to press the boot button in order to upload your sketch.
If you are watching the Arduino IDE console ouput and Connecting ... appears, you have to press the boot button for approximately 2 seconds until the console output changes.
Try to do this one after the other
Press the boot button when press uploading button until it write the code.
Try disconnect esp32 from the board/header/pcb that you are using right at the time.
Disconnect any other connection that your esp32 might have.
Do not connect to anything even your hand if possible.
Try put it in something that doesnt have a moist surface. look pic number 3.
MY CASES(30 pin version):
Case 1: I dont know why. I was connecting the pin to a female header it doesnt work and sometimes it just work like that. look pic number 1.
Case 2: when Im holding esp32 on my hand sometimes it wont work then i put it on my table and another time it doing well.
Case 3: pressing boot button when uploading it helped sometimes, and the other time it just work like it should.
Case 4: when it connected to pcb its simply just wont work, but when disconnected boom it work like nothing ever happen. look pic number 2.
Maybe just maybe something with capacitive or something like that (just assuming because number Case 1). hope that will help you out.
pic 1pic 2pic 3
This technique definitely working
Goto Tools > programmer, Select ISP and Upload Your Code.
if you can't see any programmer, then download 1.8.12 version.
https://www.arduino.cc/en/software/OldSoftwareReleases
With Arduino IDE
Make sure the Com port is selected under Tools menu. My experience with ESP32 is Com 5.
If it is not available as an option, try changing USB ports and/or re-select Tools - Board - ESP32 dev module.
Watch the "Compiling Sketch" window.
Press the "Boot" button as soon as you get the red message "Serial port Com 5" You can release the button as soon as it starts to upload.
If this doesn't work,try plugging into another USB port.
The Reset button only resets the uploaded sketch to re-initialise and has nothing to do with the uploading.
Install expressif.exe and port drivers,connect the port and flash the esp32 ,upload the code using ardiuno,solve the error
in my case buttons are new but not shorting properly as multimeter showed ..opened both scratched resoldered and all working
Changing by upload speed from 921600bps to 115200bps fixed it. No need to press any buttons.
Just download the drivers x)
CP210x: CP210x USB to UART Bridge VCP Drivers
FTDI: FTDI Virtual COM Port Drivers

esp8266 on wifi serial board and Arduino Uno board

I bought esp8266 with serial wifi wifi card
I connect RX to TX; TX to RX; VCC to VCC; GRD to GRD;
I cant communicate with the board not if program mode and not in UART mode; the reset do nothing.
the red led on the board is on.
I connected the wifi serial to Arduino uno board.
try to upload sketch i got the following error:
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
Any help or guides will help me to solve the issue.
Since I have had numorous of problems with my ESP8266 modules, this is what I generally watch for:
Output is 3.3v
Swap over tx and rx. Some boards have them swapped for some reason (searched for days for this!!)
When uploading the code, first the code compiles, then the code uploads. During the compile process, keep the reset button (or pin) pressed. As soon as you see the "uploading" status message, you can release it.
Make sure the GPIO0 is connected to the ground and (depending on which version you have) the GPIO15 as well.
When grounding the GPIO0 and GPIO15, use a resistor for each (between 2K and 10K will do).
I've spent two nights trying to upload firmware so I'll just repeat what helped me since there's not so many solutions:
First in Serial Monitor make sure that your chip responses to AT commands. There's no point in going further without achieving it. If you fail here then it's time to check your commutation, power source, etc.
While uploading: 1. Ground GPIO-0 pin. 2. In Arduino IDE press Upload button. 3. Code starts compiling. 4. As soon as you see that code starts uploading ground RST pin for just a blink. Before I reseted the chip too early so I had sync failed problem as you did. It took me a while to "catch" this moment for resetting the chip. Still I upload new firmware in 4-5 takes.
Before flashing firmware, please hold FLASH button, and press RST button once. When our firmware download tool released, it will flash firmware automatically and needn't press any button
I have this really weird issue where grounding GPIO 0 didn't work for me, but after a lot of trial and error I managed to upload the sketch connecting directly both gpios to ground in the arduino board and it worked. Really strange.
I had the same issue. In my case, I was uploading while in another terminal program I was checking for serial data. After I closed the serial monitor (and let Arduino IDE use the serial port) the problem was resolved partially.
The other half of the problem involves carefully pressing the button GPIO0 and then RESET.
This helped me achieving that.
I had the same issue, but after I set the Programmer to "AVR ISP" in the Arduino IDE/Tools, after that the upload was successful and it worked fine.
Hope it helps.
First you have to make sure that the Arduino IDE has the ESP8266 libraries installed. To do that, go to file>preferences and under Additional Boards Manager URLS, paste this link:
http://arduino.esp8266.com/stable/package_esp8266com_index.json
Then, go to tools>board>boards manager. Scroll until you find the link for ESP, than download it.
Once you select all the info for the board change the programmer to "AVR ISP"
Finally, to download the code, hold down the GPIO0 button and press the reset button once. Finally, hit download!
To use serial monitor, you may need to use the 115200 speed as it is not the default.
Hope this helps!
Please downlode and install these driver as per OS i spent 6 hours today and finally this was the solution.
https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
Look follow the leads and you will get the proper output as 'OK' in reply to AT command, just search for Arduino15 file in C directory of your computer, it will be in somewhere at C/users/app data and delete it, then set the Arduino to arduino uno board or whatever board you are using and connect the Esp8266 as, UNO --- ESP8266
RX ----- RX
TX ----- TX
GND --- GND
3.3V --- VCC and CH_PD
Once Connected open the Serial Monitor and set "Both NL & CR" and Baud to 9600.
Send "AT" to test. If nothing comes up try different baud rates such as 115200 or 57600 and retest.
If you get "OK" reply then all is working.
I just bought the Wemos D1 and had the same problem: I could not upload my sketches. There were several reasons for this:
1) I did not have the CH340G drivers loaded on my Mac. Both Win and Mac platforms need these drivers. Linux does not. I found my drivers at http://sparks.gogo.co.nz/ch340.html
2) You need to add the board to your Arduino IDE. You can find the steps to do that at http://www.beerandchips.net/2016/01/24/wemos-d1-hands-on-with-the-new-arduino-compatible-esp8266-dev-board/
Once I completed those 2 steps (be sure to select the serial port) everything worked great and I can upload my sketches with no difficulty.
I had (too many/wrong) COM port(s). Find the right one and I't fine.
This worked for me this time in the following way to successfully upload sketch from IDE to esp8266 via arduino:
1) IDE Tools menu: upload speed 115200
2) opt this one in tools menu: Programmer- AVR ISP
3) Keep serial monitor closed. If com port not visible under Tools, disconnect and reconnect USB from laptop
4)Reset Arduino
5)Connect GPIO0 of 8266 to VCC(3.3V) for a blink and remove
6) Connect reset of 8266 to gnd for a blink and remove
7)GPIO0 grounded..keep this one gnded for the upload period
Hope this one works..

Arduino YUN doesn't start

When we start an Arduino YUN board we see the LED RX binking once and then LED ON doesn't work. When we upload the program - it works, but we cannot see the WiFi of Arduino now, and LED ON doesn't work as well.
Is it somehow possible to fully erase the board? Or how to repair this issue?
Once I thought my Yun is dead too, I spent 2 days trying to track down the issue. It was faulty code I've uploaded and it caused my board to run infinite loop, it blocked my serial communication and I couldn't even upload new code via USB. Eventually what worked for me was reseting everything on board and uploading empty sketch via LAN (not USB). Yun has 3 different reset buttons, use them.
Yún RST
32U4 RST
WLAN RST
Things to investigate are: Bootloader, uploaded Sketch, Board settings. Try uploading empty sketch via ethernet (not usb), it's great advantage of Yun that you can upload new code that way. Simply try to clear everything and then you might fix your Yun. Good luck.
You need to be more specific.
1. What program are you uploading?
2. Can you consistently load a sketch onto the Yun?
3. Did you read the Yun page and follow these instructions http://arduino.cc/en/Guide/ArduinoYun#toc6 to reset the Yun processors and WiFi?

Arduino Uno rejects uploads, changes ports

After experimenting with some Serial communication (which may or may not be relevant), the Arduino IDE throws a "Error opening serial port" error when I try to upload new code to the Arduino or use Serial Monitor. This has happened in both Windows and Linux.
In Linux, after a failed upload I tried disconnecting, then reconnecting the board. It was reassigned to the next open serial port. For example, it starts out as /dev/ttyACM0, then moves to /dev/ttyACM1, and so on.
When plugged in, the "TX" LED lights up, then goes dark. When I try to upload to it, the "TX" LED flickers twice, then nothing.
Any ideas?
Open the file ~/.arduino/preferences.txt file(linux). There you will find a string serial.debug_rate. Check its value. Typically its value is 9600(it denotes the baud rate of the serial communication). So if this value is something else, that might be causing the problem.
I have no definite answer for what might cause the value to change. But in my case changing it back to 9600 worked fine.
Having something physically plugged into the serial port on the arduino will keep sketches from uploading.

Arduino uno r3 does not reset when pressing reset button

I am starting off with an Arduino Uno and am able to flash some sketches via the Arduino IDE.
Something confuses me though... When I press the reset button on the board I was under the impression that my currently flashed application is removed. That is not the case. It still executes the last flashed application. Is that supposed to happen?
Also when I flash the "bare minimum" sketch with no code instructions, the on board LED on pin 13 is constantly active. Is that the default behavior?
All that the reset does is restart your application you wrote in the arduino code IDE.
Actually, when you press the reset button, the controller is reset and starts execution at a specified address (the reset vector). In the case of Arduino, the address is in the upper end of the flash memory which contains the boot loader. If the boot loader does not see any traffic in the serial line (i.e. an incoming new program) it transfers execution to your program, i.e. setup(), loop() and the works. The program you load to Arduino is programmed in a flash memory, it does not go away that easily.
That button should be labeled REBOOT. That is what it does to the board.
I added this similar answer because I understand that it' conceptually different to re-run the sketch than reset and startup everything

Resources