-->
Page 1 of 2

RTOS HTTPD - Server handles both station and AP client???

PostPosted: Thu May 12, 2016 3:53 pm
by jhinkle
I've implemented the RTOS version -- nice work.

The server opens a connection when accessed via the stations IP address.

If I use a IP - connect to the AP -- and then ask to access a web page -- the server does not see the request.

The code for opening the socket does not distinguish station or AP mac or IP -- so can anyone explain why access the AP port 80 (as in requesting a page or link) does not produce a response from the listen.

Thanks for any insight.

Re: RTOS HTTPD - Server handles both station and AP client??

PostPosted: Thu May 12, 2016 8:08 pm
by IOT@urremote.com
Here is an example of a library in the Arduino development environment where the web server is visible simultaneously on the network to which it is connected as well as the WiFi network it is hosting. See https://github.com/kentaylor/WiFiManager . It is even visible at the same IP address on both networks as well as a default IP address on it's hosted network.

Re: RTOS HTTPD - Server handles both station and AP client??

PostPosted: Fri May 13, 2016 7:08 am
by jhinkle
Thanks for the reply. I looked at the project and into your WifiManager but it does not shed light on my question. I don't use the Adruino IDE and I "think" it uses the non-os implementation.

My question is specific to the RTOS implementation.

I got it to respond ... here is how ...

When I asked the question the Ipad always responded "no Internet available".

Wish wireshark could track wireless!!!!

I added a DNS Server.

In user_init() I called wifi_softap_set_dhcps_offer_option(OFFER_ROUTER, &mode);
which informed any wireless device acquiring an IP from the AP that the AP was also a DNS server.

I implemented a DNS Server (a task) - that would return the AP's IP address for any DNS request.

Now if I enter any web site name --- BANG!! -- the web server is notified and responds.

Simple little DNS server addition solved my issue.

Re: RTOS HTTPD - Server handles both station and AP client??

PostPosted: Fri May 13, 2016 10:42 pm
by Sprite_tm
Hmm, I need to look at this. Any chance you can modify your patches into a more general pull request so I can add them to the official code?