-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Feature Request... Synchronize the WiFi (And WiFiMulti) APIs between ESP 8266 and ESP 32 #5911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
what differences? the API is defined by Arduino networking libraries (Ethernet, WiFi). |
@dachshund-digital please elaborate |
You are kidding right? Sorry, but I find your request a bit of surprise. If you compare the ESP32 and ESP8266 APIs the deviations are obvious. A common API, is a common API, meaning function calls named the same, function the same, and support the same parameters per API function. This is not done at this time, meaning that custom code must be written to do the same basic tasks. Today when when writing code for ESP32 and ESP8266 you have to deviate code logic per device. One obvious example, is hostname() versus sethostname(), there are several more just in WiFi and WiFiMulti APIs alone. The various time libraries, etc. all exhibit many variances that add complexity to projects that should not be required, IMHO. I suggest the core authors of the WiFi and WiFiMulti APIs, to start, for ESP32 and ESP8266 compare notes and eliminate the various deviations so that when a programmer writes code for ESP8266 for example, that same code without modification works on ESP32, to the greatest extent possible. Obviously there will be some differences because ESP32 supports difference interrupt vectors for example, but within the basic API function calls the degree of consistence should be very high. It is not as of now. I just finish a project which is transparently compatible across ESP32 and ESP8266 devices, however I had to write several 100s of lines of code to align the logical functionality of the various API deltas. Said project is not and never will be in the public domain, so I will not and can not itemize the various API deltas since there is a code ownership issue. The above said, writing such glue code should not have been required, the official APIs should be consistent and aligned. This would be most programmer friendly scenario, hence my feature request. |
Where are official api specifications ? |
Feature Request... Synchronize the WiFi (And WiFiMulti) APIs between ESP 8266 and ESP 32. This would be a good thing. I just finished writing programming logic identical on ESP 32 and ESP 8266 devices, and frankly there is not good reason the APIs differ. It is quite user unfriendly. I wasted a lot of time having to use #defines and such to deal with the variances between the APIs in question.
The text was updated successfully, but these errors were encountered: