Question with simultaneous Web Servers and AP's. #6218
Replies: 1 comment
-
Posted at 2020-02-14 by @gfwilliams I think what you're after is fine to do (it sounds like a great idea), but there might be a minor issue: You can only have one web server on Espruino WiFi, although I believe that web server can be accessible from both networks. Because of that, you may need to ensure that you create the Web Server after you've initialised both network interfaces? If you're changing configuration (eg to connect to the second interface) I'd close the first server, connect to the AP, and then re-open it... Posted at 2020-02-14 by M.Montore Thanks for replying so fast, Gordon! I understand what you are saying. However, I want to create a device with an easy setup/configuration, in which case I need to provide constant feedback. The information submitted (WiFi password, IP, Gateway and Netmask) can be correct or not, and whichever the case is, I need to be able to inform it to the customer, and my only way to communicate is through the web page. If I close the server first, I am unable to inform of the result. Any suggestions? Are you planning on implementing something that may help with this issue in the near future? Thanks again for the help! Posted at 2020-02-14 by @gfwilliams I don't see that you'll have a big problem.. You can...
So I think what you're after shouldn't be a big problem... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-02-14 by M.Montore
Hi!
I am still learning so I want to apologize in advance if I say something incorrect.
The thing is, I initialize the Espruino as an AP and create a Web Server with the AP IP address. The pages presented by the Web Server show a list of the nearby Access Points detected by "wifi.scan" in checkboxes. It also has 4 text fields: to introduce the WiFi password, an IP, a Gateway and a Netmask. The customer should select one of the detected WiFi networks and fill the blanks in the four text fields.
With the inputs submitted by the customer it tries to connect to this new WiFi and creates another WebServer with the IP, gateway and netmask received.
So, after this process Espruino WiFi should be able to have simultaneously the AP generated by the Espruino and connected to the WiFi network, each one with its Web Server associated. When I create the second page, the first Web Server disappears, and also the Espruino stops working as an AP itself.
How can I keep both Web Servers active and the Espruino working as an AP also connected to the new WiFi network I receive? Am I missing something important?
Thanks for the help!
Beta Was this translation helpful? Give feedback.
All reactions