-
-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
WiFi generic object interface #589
Comments
This work item needs coupled with #630. |
Initial lower level design work has started but we immediately ran into a major design question. Should the |
I'd a library. I know you hate me saying 'look at the code', but: JSNetwork stores callbacks in a hidden https://github.com/espruino/Espruino/blob/master/libs/network/js/network_js.c And the other network stuff stores data (pins, etc) in JsNetworkData, which it accesses like:
I'd be tempted to stick with the hidden If you were to store all data in a single user-accessible class then it's possible someone might do something like create another, or clone the existing and it'd really screw you up. |
Howdy @gfwilliams I looked at the code of cc3000 and of wiznet ... and think I realize that their is a misunderstanding on what I am thinking. I see that the However ... the ESP8266 needs ESP8266 specific callbacks remembered as well. For example, the ESP8266 needs to remember a callback for connecting to an access point. eg.
The function passed into |
Work is actively underway on this issue. Currently implemented functions are:
Now comparing in detail against wiki design specs. The latest binaries now have these functions included. Comments posted on the gitter stream inviting users to test the function and see how close we are to what is desired. |
In reviewing the esp8266 Wifi implementation it strikes me that each implementation will have its peculiarities. Some things will be supported and others not. Some functions may behave in a slightly odd way. Some functions may be added as device-specific. All this will want documentation. I'm wondering whether as a result the following set-up wouldn't be nice:
|
That's a really good idea... It might require a small change to build_jswrapper, but shouldn't be big at all. It'd make the documentation easier too - much better than if we somehow had to combine docs for different implementations called the same thing. |
Addition of "dnsServers" option for wifi.connect(). |
Function for #589 and comment removals
After some more thought, I decided to change the concepts of how the settings for defaults at boot should work. Here are the new concepts:
Will make this connect and settings the default at the next boot.
Will make this access point and settings the default at the next boot.
Will remove any default station connect at next boot.
Will remove any default creation of an access point at next boot. |
What are the semantics of omitting the |
Issue #589 changes to the default station and access point creations.
If we omit the default option or set the default value to false ... then the current "default" settings remain the same. Literally following a reboot with "default = false" or "default omitted" then it will be as though the API that had default = false had not happened. |
As I continue to "play" at being a consumer of the new generic wifi interface, I found that I needed to know the set of stations connected to my device when it was being an access point. To that end, I have chosen to introduce the concept of |
Issue #589. Design and implementation of wifi.getStatus()
Background: Forum article post
As more board types start to offer WiFi services such as:
Unless we do something, we will see fragmented implementations and different styles of interaction. This work item will include the requirements gathering, design, documentation and implementation of a general purpose interface that is board agnostic.
One of the early implementors of the interface will be the ESP8266 port.
A WiKi page has been created to capture discussion items for all on this work item.
The text was updated successfully, but these errors were encountered: