WLAN/WIFI-Modul ESP8266

Hi, I have been working on making ESP8266 reliable for pfodApp
For Ardumower use I think the easiest route is to use a UartToWiFi bridge.

See http://www.forward.com.au/pfod/CheapWifiShield/ESP2866_01_WiFi_Shield/index.html
No need for the shield board, but you will still need all the resistors etc to run the ESP.
Also check out the software that is being loaded. That page also covers programming the ESP. Do not try to use the AT command set. The Async msgs are too difficult to handle. I wrote a library but it only partially worked and did not handle raw data well.

This project include webpage configuration to connect the ESP to your network.

The ESP module only handles one packet at a time and blocks while waiting for it to be ACKed. This means it can miss incoming serial data when baud rate is >9600. The current code on those webpages buffers data to fill packets or just send it after 10mS is no more data. This solves the partial send of pfod menus.

The new code version I am working on will allow for higher baud rates with out losing data, by making the ESP wifi write non-blocking so the ESP module can continue to read incoming Serial data. Should have that update out in a few days.

On the computer side, if you have a PC you can install Andy (Android emulator) and run pfodApp inside there. NOTE: however Windows is very slow to ACK the ESP tcp packets (about 200mS delay). With the code I am working on now this will limit the baud rate to
 
Hello Matthew,

Perfect solution you developed! I think the ESP8266 is a great choice (I did use the ESP8266 on another project by using a modified version of Frederic's ESP8266 firmware ), and was able to communicate at 1 MBit/sec to an STM32F4 - so speed is possible with that Wifi :) )

Regards,
Alexander
 
Neat idea increasing the Serial buffer to 1024. Solves a lot of problems.

Suggest you add a connection timeout and keepAlives. I had trouble when the app was killed or the router died but the ESP still though there was a connection. Could not connect again until ESP power cycled.
see http://www.codeproject.com/Articles/37490/Detection-of-Half-Open-Dropped-TCP-IP-Socket-Conne
Also you might like to consider the pushbutton web page config for convenient setup. You could then sell pre-coded ESP modules that way and just have the users connect them to their network and assign an IP address.
 
Thanks for your work Fred. I'm trying to use the esp8266 as well, specifically one of the nodemcu boards with all the pin breakouts... Is it possible to run an arduino sketch on one of these while the mega is simultaneously using it for wifi?
 
using the esp8266 and 1.3 board is it possible to program it using the key jumper right ?
connect jumper KEY. apply power to pcb , connect ardino to laptop (with passthrough.ino loaded on it)

i can successfully connect via serial monitor to the esp module (without the key jumper) and send at commands
but flashing using xtcom fails when jumper is connected
it conects to the correct com port at 115200 then fails to connect to the device (retry counter increases to 200 and stops)

any help ?

i attached some photos from this
the strange characters appears in serial monitor when i apply power with KEY jumper enabled
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/4927/20190925_121805.jpg/
 
Zuletzt bearbeitet von einem Moderator:
What do you want to do with the esp?
I have connected a esp32 on the due and it is very easy , simply replace the bt module
See the post concerning rfid on pcb 1.3 and check the code on git
 
thanks for the quick answer..
as shown in the picture i am trying to make esp-01 work on its default wifi pcb1.3 location to use pfod app over wifi
after programming to the ESP8266SerialWifiBridge.cpp_00000.bin and 10000.bin using pcb1.3 board this module doesnt seem to boot anymore and wifi led on pcb1.3 stays on all the time.

i catch the booting process at 7.4k baud rate but then no more data is sent anymore from this module (at any baudrate), i get boot reset 2 and boot(3,6) message
i can reverse the original firmware 9.50.2.bin at location 00000 and that seems to bring back the at commands. so the xtcom programming seems to be correct
 
@Bernard
Can you give me the code for the esp32 please and do you have a small schematic, how you connected the esp to the PCB1.3 and if I have to put the jumper on 3.3V or 5V?
 
Hi Roland.
For the wiring it's here https://www.ardumower.de/index.php/de/forum/ardumower-pcb/1942-rfid-on-pcb1-3#17655 But you need only the 4 wire for communication with PCB1.3

The ESP 32 DEVKIT V1 is 3.3V module like the DUE ,so RX2 and TX2 are 3.3V and JP10 BlueS jumper for data is 3.3V
The Vin is 5V so JP4 BlueV jumper is 5V
On the picture with RTC module you can see the jumper

I have build a simple PCB for RFID,Sender,Receiver and Here the PDF from easyeda See only the H2 Header
Schematic_test3_Sheet-1_20190926130053.pdf


For the code,I use the BT part for a full compatiility with Azurit and it's very easy:
All is into git: https://github.com/Boilevin/AzuritBer/tree/RFID See the folder ESP32_RFID for BT part (it's line 103 to 109 and 22,23 30,31)
So Something like that :

Code:
// ESP-32    <--> pcb1.3 pin mapping:
// Vin       <--> 5v ON BT CONNECTOR
// GND       <--> GND ON BT CONNECTOR
// RX2       <--> TX ON BT CONNECTOR
// TX2       <--> RX ON BT CONNECTOR

#include "BluetoothSerial.h" //Header File for Serial Bluetooth, will be added by default into Arduino
BluetoothSerial ESP_BT; //Object for Bluetooth
void setup() {
//BT seial for Pfod init
  Serial2.begin(19200);
  ESP_BT.begin("ESP32_BT01");
}
void loop() {
  while (ESP_BT.available()) {
    Serial2.write(ESP_BT.read());
  }
  while (Serial2.available()) {
    ESP_BT.write(Serial2.read());
  }
}

If you want to use the Wifi you need to write a different code and maybe the ESP32_sender_area2 can help you but i never use PFOD over WIFI.
Attachment: https://forum.ardumower.de/data/med...5/Schematic_test3_Sheet-1_20190926130053.pdf/
 
Zuletzt bearbeitet von einem Moderator:
Oben