Go Down

Topic: ESP8266 (Read 102597 times) previous topic - next topic

rogerClark

The ESP8266 can act as both AP or client, but I think it may need to reboot when you change from AP to client

I wrote an IoT device which starts as an AP and runs a web server to allow configuration, and after config is complete, it reboots and connects as a client

However I didnt do this using AT commands, I did it in code.


Now that the ESP8266 Dev team have made Arduino "cores" file for the ESP8266, you may find its better to write code to do this in the Arduino IDE rather than trying to use the AT commands

Freelance developer and IT consultant
www.rogerclark.net

killerspec

HI all

I am new to the ESP range and have the ESP-01. I have a ttl programmer and have the set it up to converse with the Arduino IDE. I have selected the comms port in my case comms port 3 and set carriage return to 115200. When I plug in my ttl programmer I am getting a windows driver message which says Microsoft Serial Mouse failed.

Any ideas on what maybe the issue here?

Matt

pYro_65

@killerspec, is this still a problem.

You could open your device manager and delete the drivers for it, then re-installing them should fix it. Mine never showed up as a mouse, but did require a manual install as the automatic install failed.
Forum Mod anyone?
https://arduino.land/Moduino/

killerspec

@killerspec, is this still a problem.

You could open your device manager and delete the drivers for it, then re-installing them should fix it. Mine never showed up as a mouse, but did require a manual install as the automatic install failed.
Thanks a million will try this in the morning.

baranbaran

it will be great if you do that....good luck
Graduated from Soran University with First Class Degree with Honours in Computer Science.

impeham

i've attached a word document to show the output i got from the serial monitor - the following is copied from it to whoever don't have a doc reader:

I'm using ESP8266 03 with baud rate of 9600:

First - connecting the ESP to the PC's usb using Power source/pins of ESP not changed - only TX/RX now connect through "CP2102 USB 2.0 to TTL UART 6PIN Module Serial Converter" (the power source is the USB's 3v output):
AT and AT+GMR commands looks ok.

Next - try to connect to access point, command:
AT+CWJAP="ssid","somepassword"
The ssid and password are printed correctly (they are false - that's why the error)

Next - ESP power source stays the same, only TX and RX are moved to pins 2 and 3 of the arduino nano - the serial monitor is now connected to the arduino nano, and the code on the nano is just printing the output of one another - this is the code uploaded to the nano:

---
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3);

void setup() {
  mySerial.begin(9600);
  Serial.begin(9600);
}

void loop() {
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}
---

AT and AT+GMR looks ok, Trying to connect to the access point, command:
AT+CWJAP="ssid","somepassword"
results with bad characters and it won't succeed to connect (even if ssid and password were correct - I verified in the router).
   
The question is - why does it behave differently? Why through the nano some sent characters are being passed incorrectly and is there a way to fix that?

gelraen

Shameless plug:

JavaScript interpreter for ESP8266 - https://github.com/cesanta/smart.js
Supports I2C (bit-banging on any GPIOs) and SPI (hardware). Also there's simple HTTP client and rudimentary cloud support.

JimDrew

Does anyone have an example of using the WPS features that were recently added to the library?

Such as:

ESP8266WiFiClass::beginWPSConfig(void)


electricalhobbyist

I hope this one helps, Controlling Appliance and Lights.
1. Stand alone ESP8266-12E wifi Module
2. Arduino and ENC28J60 ethernet module

I was able to control my lights and water pump where ever i am for three months already now, i can also monitor my power consumption thru internet. here is the link guys. The design is great.

electricalhobbyist

I hope this one helps, Controlling Appliance and Lights.
1. Stand alone ESP8266-12E wifi Module
2. Arduino and ENC28J60 ethernet module

I was able to control my lights and water pump where ever i am for three months already now, i can also monitor my power consumption thru internet. here is the link guys. The design is great.
Heres the link guys. I really hope it helps a lot.
http://thinkingparts.blogspot.com/2015/08/home-automation-controlling-home.html

rhiakath

Hi there. I just acquired an esp8266, to connect to my atmega328p and am trying to configure it, but am currently unable to do anything with it.

I am currently using it connected to a raspberry pi, since it's easier to debug.

When i plug it in, using baud 115200, 8N1, i get a whole lot of garbage, followed by this:

Ai-Thinker Technology Co. Ltd.

invalid


I've seen in other places that this is not a reason to worry about, but i should be getting some useful info instead of that garbage, right?

also, after that, every command i type, only returns error. every single one.

I also am in doubt if this is properly connected. I've connected ground, tx and rx, and then CH_PD and VCC to 3.3V.

I've tried with gpio0 to low and 2 high. also both low.
also tried with reset high.

It always does the same. What can i do?
Thanks.

rogerClark

From what I've read the initial garbled text is sent at a strange baud rate of 74880 during bootup

What it sends after that is entirely dependant on what firmware is loaded into the ESP8266

Freelance developer and IT consultant
www.rogerclark.net

rhiakath

ok, what about the constant error reply?

and are my connections ok? I've seen people do very different connections on these.

Erni

Quote
are my connections ok?
It depends on which module you have, there are more than 10 different variants.

If it is an ESP8266-01 you can see the connections here:

http://esp8266basic.com/flashing-instructions/

gunjalshah

I want to interface esp8266 to a controller to just connect to a network and open a webpage to check if its working. Can anybody provide me how to do it?

Go Up