Comments (6)
you mean WiFi.config
from wifispi.
No, we are talking about WiFiSpi here - I thought. ;-)
Pls look at file WiFiSpi.h
But you are right - Of course I meant ".config" and not ".begin"
Thanx anyway.
from wifispi.
Hi, I can't do any tests now. I'll be back in the middle of September.
Looking at the code I am afraid the code won't work without entering a gateway address. Precisely speaking, without specifying the gateway address, the gateway IP is set to 0.0.0.0. I can't test it, I've only looked into the sources.
Look at:
- library WiFiSPI, file WiFiSPI.cpp, function
bool WiFiSpiClass::config(IPAddress local_ip)
- then app WiFiSPIESP, file WiFiSPICmdGeneral.cpp, function
void WiFiSpiEspCommandProcessor::cmdSetIpConfig()
- then library ESP8266WiFi, file ESP8266WIFISTA.cpp, function
bool ESP8266WiFiSTAClass::config(IPAddress local_ip, IPAddress arg1, IPAddress arg2, IPAddress arg3, IPAddress dns2)
- and finally <arduino_path>\hardware\esp8266\esp8266\tools\sdk\lwip\src\core\netif.c, function
void netif_set_addr(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw)
If it were so, I'd have to delete the function bool WiFiSpiClass::config(IPAddress local_ip)
from the library.
from wifispi.
the Arduino's WiFiNINA and WiFi101 have the same error. the code to create the addresses is missing.
I have a PR for booth
arduino-libraries/WiFiNINA#219
arduino-libraries/WiFi101#326
from wifispi.
@JiriBilek, @JAndrassy
Hi and thanx for your replies.
I had a look at all the files and functions you listed and it's exactly the same on my machine.
Then I tried to find a workaround and decided to take my own ip address as gateway and dns like this:
#ifdef IP_ADDRESS
IPAddress local_ip(IP_ADDRESS);
#ifdef DNS_ADDRESS
IPAddress dns_server(DNS_ADDRESS);
#else
IPAddress dns_server(IP_ADDRESS);
#endif
#ifdef GW_ADDRESS
IPAddress gateway(GW_ADDRESS);
#else
IPAddress gateway(IP_ADDRESS);
#endif
#ifdef SUBNET_MASK
IPAddress subnet(SUBNET_MASK);
#else // if none specified we assume the smallest network class (C)
IPAddress subnet(255, 255, 255, 0);
#endif
#endif
At least it works this way and I couldn't find any problems so far.
BTW: do you know if there is example code that makes the AVR (Mega) / ESP8266 work as a server that supports multiple sockets? The Ethernet library has a function "Ethernet.accept" which is missing in the WiFiSpi library.
from wifispi.
BTW: do you know if there is example code that makes the AVR (Mega) / ESP8266 work as a server that supports multiple sockets? The Ethernet library has a function "Ethernet.accept" which is missing in the WiFiSpi library.
my WiFiEspAT library with Jiri's ATMod firmware
from wifispi.
Related Issues (20)
- Using library with Arduino Zero clone. HOT 2
- Example wifiManager HOT 1
- Problem with 3 second delay when calling WiFiSpiServer::avaliable() HOT 28
- Allow more than one connection in WiFiSPIServer HOT 3
- WiFi module not present HOT 23
- Protocol version mismatch. Please upgrade the firmware HOT 2
- Possible to run this on Arduino Due? HOT 10
- Add .remoteIP() function to WiFiSpiClient HOT 1
- How to manage maximum socket connections? HOT 16
- Compiler warning when "delete"ing a client instance HOT 31
- ESP8266: change AxTLS to BearSSL HOT 1
- Deprecated boolean type HOT 1
- Problems using ArduinoMDNS with WiFiSpi HOT 13
- Possible to set MAC address of ESP? HOT 1
- Reason for limitation of 4 sockets? HOT 1
- Protocol version mismatch. Please upgrade the firmware HOT 8
- Connect fail using BearSSL branch HOT 26
- Version mismatch HOT 2
- Unstable HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wifispi.