AP & Station mode concurrently, Soft-AP in connected mode

Hi,

@mdma teased us many many moons ago with running soft AP and station mode concurrently. Can we have that?

Simple reason being that having both concurrently in conjunction with using the soft-ap http server extensibility would mean that if for instance internet was not available, the client device could communicate either via the soft-ap ssid or via the user’s home wifi network with the photon and issue rest http calls.

@nexxy, I did spot in softap.cpp:1099 this:

void stop() {
        wiced_http_server_stop(&server);
    }

I’d tracked the softap http server up and down the stack as to who called who, and started thinking that this stop event is the perfect location to simply team it up with a start on the STA interface, ie:

void stop() {
        wiced_http_server_stop(&server);
        wiced_http_server_start(&server, 80, 1, page, WICED_STA_INTERFACE, 1024*4); // lets start it on the newly connected station/client network
    }

Thoughts, feelings, emotions?

2 Likes