So i got my code all up and running but it don't work right because the people that designed it didn't do a very good job apparently. My situation is i need a way to send data struct from one esp to another at a fast rate. Assume that every 500ms the server will receive a 32byte struct from a node x8. The only thing i have not really tried is MQTT. I don't know what to do here. 8 nodes will be hammering the server with structs at a pretty fast rate. The server will then be responsible for sending that that data to an arduino over serial. i have the serial code figured out. I actually had a whole program that worked but it don't work fast enough "ESP8266AsyncTCP Client/Server. It really is a shame because the program i was using almost worked. I'm at a stand still here. I really need someone with more experience than me to help me.
What are you using as the server. An ESP8266 sending a packet every 500ms should be no problem but one being used to receive from 8x nodes, process and then send over serial to an Arduino is probably where your bottleneck is.
You will need to describe the project layout in more detail and possible post code to get more meaningful help.
Riva:
What are you using as the server. An ESP8266 sending a packet every 500ms should be no problem but one being used to receive from 8x nodes, process and then send over serial to an Arduino is probably where your bottleneck is.
You will need to describe the project layout in more detail and possible post code to get more meaningful help.
Just for starters i'm using the simple client/server example from Here. The only thing i changed is in the client i changed
os_timer_arm(&intervalTimer, 2000, true); // schedule for reply to server at next 2s ///TO,
os_timer_arm(&intervalTimer, 500, true); // schedule for reply to server at next 2s
it hangs pretty bad just sending the string. i tried it with a large data struct and it was about the same as far as i could tell. The problem is i need a more reliable consistent send/recv pattern if i want to send a sensors readings to the server once ever 500ms i figured i should be able to.
The project is,
ESP-
ESP---
ESP-----
ESP------ "ESP SERVER" - rx/tx Arduino
ESP-----
ESP----
ESP--
ESP-
those esp clients send a 32 byte struct to the server then the server relays the data over serial to the arduino and if i want to send a command to the esp client node
"Arduino serial tx" - "ESP Server" - Esp Client
This is the design i was going with. however without being able to get past the example not being reliable i dont know what to do. If i run the example code and lower the interval to send the message faster it becomes sluggish but dont seem to get any corrupt data. it almost seems like the messages get built up and them a bunch of them dump at once and then the process repeats