These are chat archives for esp8266/Arduino

30th
Mar 2017
ongvanor
@ongvanor
Mar 30 2017 02:31
I guys just want an input from you. the esp-12e is connected to the MQTT server but its having a wierd behavior its also working as an AP mode while connected to the server. i have code where if SSID in EEPROM is empty it runs and APmode
if ( romssid.length() != 0 ) {

  } else {
    digitalWrite(ledGreen, HIGH);
    IPAddress local_Ip(192, 168, 1, 1); // uncomment these two lines if you want to set the IP address of the AP
    IPAddress local_gateway(192, 168, 1, 2);
    IPAddress local_subnet(255, 255, 255, 0);
    Serial.println("Starting AP");
    WiFi.softAPConfig (local_Ip, local_gateway, local_subnet) ;
    WiFi.softAP(defssid, defpass); // start access point
    server.begin();
Tejas H
@CodingCreate101
Mar 30 2017 03:55
Hi guys, I need another clarification.. now the clients and AP are connected, I was wondering
.. at a time how much data I am allowed to transmit??
Lars Englund
@larsenglund
Mar 30 2017 05:08
@arcao Thanks, that could fill some of my needs
@zenmanenergy Oh, when was WiFi.onEvent deprecated? What should I use instead?
Steve Nelson
@zenmanenergy
Mar 30 2017 14:25
@larsenglund when I compile my code with onEvent, I get this message: warning: 'void ESP8266WiFiGenericClass::onEvent(WiFiEventCb, WiFiEvent_t)' is deprecated
Lars Englund
@larsenglund
Mar 30 2017 14:27
@zenmanenergy ok, are you using the latest git version?
Steve Nelson
@zenmanenergy
Mar 30 2017 14:27
Lars that's exactly what I was looking for! My googling skills must be in the toilet! I searched for a while and never came across that page
probably not. I'm using the latest 'stable' version
which is like 8 months old at this point
Manu Gil
@manugildev
Mar 30 2017 17:38
hi
im trying to build a mesh of esp8266 devices
In a tree configuration
so only one will be connected to the internet and the rest will be STA + AP at the same time since every AP can only have 4 STA connected to it
I have upd servers in all of them
and all act as clients too
but the problem is that the when the esp is connected to another esp udp messages doesnt work
but it does if the esp is connected to the home wifi
Tejas H
@CodingCreate101
Mar 30 2017 17:42
You need to configure DNS. Did you?
Manu Gil
@manugildev
Mar 30 2017 17:42
I need to set the wifi mode to WIFI_STA in order to connect so I can only have two levels
No!
Whats that...
alta
so the first one that is connected to the internet and the clients work, it sends messages to its clients and receive messages too
Tejas H
@CodingCreate101
Mar 30 2017 17:45
To share the internet to other clients, you need to configure DNS in AP. There is package, it's called mDNS, if I am not wrong. Check that out. Check out in their PDF book(hope you have it).
Manu Gil
@manugildev
Mar 30 2017 17:45
The second level one should be AP (for the third level esps) and STA for connecting to the upper level
ok, thanks
I dont want to share internet, I just want to share messages using udp
But I will try
Tejas H
@CodingCreate101
Mar 30 2017 17:46
Ohh.. then you don't DNS
Need*
Manu Gil
@manugildev
Mar 30 2017 17:47
This problems that I have happens with udp and with web server
Tejas H
@CodingCreate101
Mar 30 2017 17:47
Well, I have a suggestion. Before that, I wanna know, why are you going with tree topology?
Manu Gil
@manugildev
Mar 30 2017 17:48
I need to have one master that controls the "game" and connects to the internet with mqtt and I need more than 4-5 connected to the master
Since esp8266 has an AP limitation of 4 as fas as I read
I can not connect more than 5 to the same esp
And I want the system to be independent, if the master has connection to the internet is fine, but if it doesnt all should be connected to the master and share info between them waiting for internet connection at some time
Tejas H
@CodingCreate101
Mar 30 2017 17:51
Okay for that, (I hope it works. Others please correct me if I am wrong) use array of client objects. Use single port to communicate with more than 4 clients(more than default limit). So, don't have to deal with tree topology.
Manu Gil
@manugildev
Mar 30 2017 17:54
Can you explain me a little bit more
Array of client objects?
Single port for each one?
Single port for the udp server?
It needs to be realtime so connecting and disconnecting to the ap to recieve and send info doesnt suit me
Maybe the problem that i have is:
Tejas H
@CodingCreate101
Mar 30 2017 17:56
No, all of those stay connected.
Manu Gil
@manugildev
Mar 30 2017 17:57
Since the APs in the second level has also the same 192.168.4.1 IP that the one in the upper level, when I try to send a udp message to the ip it just doesnt work
It shouldn't happen, but maybe it makes a request to itself, since it has the same ip in his own network than the AP that it is connected to
Tejas H
@CodingCreate101
Mar 30 2017 17:59
No, it actually doesn't matter. It only considers what's in it's NETWORK.
Do you subnet?
Know*
Manu Gil
@manugildev
Mar 30 2017 17:59
Not really
Just guide me a little bit if you know any solution and I will try to find the information and do it
I dont know what could be the problem
Tejas H
@CodingCreate101
Mar 30 2017 18:01
Basically, your layers are totally different "networks". So, even if the IP is same, it's not an issue.
I suggest you not to implement tree topology. It takes much hardware and conding time.
Manu Gil
@manugildev
Mar 30 2017 18:01
lol
it does
So can I connect multiple to the master one
Tejas H
@CodingCreate101
Mar 30 2017 18:02
What is "it"?
Manu Gil
@manugildev
Mar 30 2017 18:03
it takes coding time*
Tejas H
@CodingCreate101
Mar 30 2017 18:04
I suggest you to work around and use array of client objects in programming.
Manu Gil
@manugildev
Mar 30 2017 18:05
ok, i will look at what is that
And if anyone does know what is cousing me this problem let me know
Tejas H
@CodingCreate101
Mar 30 2017 18:06
..That way, you will be able to control 5-6 or even more ESPs with single AP
Martin Ayotte
@martinayotte
Mar 30 2017 18:06
If you have alll APs set to 192.168.4.1, you're looking for troubles. You can't have STA and AP on the same subnet, ESPs are confused which network interface to use.
Manu Gil
@manugildev
Mar 30 2017 18:07
Do you know any solution?
Martin Ayotte
@martinayotte
Mar 30 2017 18:08
I think espressif has a ESP-MESH example somewhere...
But do i have to change the sdk of the esp?
for using that?
Martin Ayotte
@martinayotte
Mar 30 2017 18:10
I don't know
Oh ! maybe this one, since it is an Arduino one : https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFiMesh
Manu Gil
@manugildev
Mar 30 2017 18:13
Yeah I was looking that
It is not that efficient
cause it connects and disconnects to the network