Multiple WVLANs

My question is in regard of the Photon specifically. I understand that it might work differently or in a limited way on the core.

When configuring the photon, we initially starting with AP configuration, which is later on replaced by a client configuration.

My question is whether it would be possible to have multiple wireless VLANS configured so that the AP configuration would always be available, while the other network configuration would be “occasionally” available.
( reasoning : I would’t want the photon communication to get disconnected from the client while trying to validate the connection on the main wlan).

I know that most of the router wi-fi chipsets have that capability, but I don’t know what’s the involved software complexability.

thanks,

Tsachi

@tsachih, I am not sure what you are asking. Do you mean having the Photon/Core have multiple SSIDs stored so it can fail from one to another? The Core’s CC3000 can store 7 SSID/password combinations while I would expect the Photon to store at least that many. If a connection is lost to an SSID, the CC3000 will try the next SSID it can find with stored credentials.

What do you mean by AP versus client configurations? I believe the softAP functionality will be available programmatically along with the standard network services like TCPServer, TCPClient, etc.

@peekay123, thanks for your quick response.

My question is about holding multiple concurrent WLANs simultaneously.
The softAP is the first WLAN ( whether it’s mostly emulated by software or not). The question is whether the second WLAN connection is made, the first one got disconnected or not.

I understand that there are bunch of classes that support these network services ( TCPServer… ) which is awesome. But I think that my question goes far “lower”.

I’m trying to understand if, for example, the photon can serve web pages via the softAP, and load NTP and domain resolve on another WLAN at the same time.
( note that when I’m saying at the same time, it doesn’t mean concurrently, it means just without killing the active user web connection )

now, if I’ll want to take it even further, can it support 3 WLANs ? ( I don’t really need it right now. just out of curiosity )

thanks,

Tsachi

Hi @tsachih

If I am reading you right, you are asking if the Photon has multiple radios and I believe the answer is no, it does not. A router might have multiple radios (or simulate having them anyway) to allow for more SSIDs on one device, but I don’t think Photon is capable of this.

1 Like

Yup i think @bko got us in the right direction.

You can turn on SoftAP with 1 SSID and that’s about it. With regards to how many clients can connect concurrently to the 1 AP exposed, i didn’t see anything notes after digging briefly.

1 Like

Thank you guys.

Kind of sad to get bad news, but it’s good to know that someone have been there already.

:smile:

Tsachi

What’s the use case like? We can definitely keep that in mind :smile:

It’s quite simple use case actually. I want the user to have the photon to serve as a web server. the web server would have a “setup” application, and part of that setup would include internet connectivity tasks. ( i.e. get information from the internet via various protocols ).

I would like the web browser to send a http command to the server that would cause the photon to perform few http/tcp/udp tasks on the home network and return the result to the web client.

Now, at this point, it seems that the user would have his connection dropped while the photon is attempting to connect to the home network, and then re-connecting after the information was obtained from the internet.

That is clearly not the ideal behavior. ( any time the connection is lost, there is a chance that it won’t come back. I hate taking chances. )

Are you aware of other products based on the same Broadcom BCM43362 chip that do implement this functionality ?

I can’t think of any product that is currently doing it in that way. Yet, I’m quite confident that it has potential to improve the usability experience; don’t you think so ?

As a sidenote, and as @bko suggested, my old dd-wrt router had that ability. I used to have a WDS configuration which worked flawlessly. I think that I had a single radio on that router, but I can’t say that for sure.

http://www.dd-wrt.com/wiki/index.php/Linking_Routers#WDS
http://www.dd-wrt.com/wiki/index.php/Multiple_WLANs

btw - I couldn’t find the Broadcom BCM43362 communication library in the GitHub.
Do you have any idea where would it be ?

An AP chipset with WDS or WDS-like features could easily support this kind of mode, however, the BCM43362 has been optimised for the client-side, not the AP. It does offer soft-AP as a means to configure, but does not support WDS or similar, as far as I know.

If Broadcom do not support this functionality in either the silicon or SDK for this chip, then it is very unlikely to happen.

Zach and the team are working with Broadcom on the exact method by which Spark will open source the product, while respecting and protecting Broadcom’s IP - the firmware repository containing the Broadcom code is currently private and limited to people covered by the NDA.

WDS can be done with a single radio on each AP at the expense of half the RF bandwidth, but as this link says, it is not a standard and generally not interoperable between brands:

http://www.dd-wrt.com/wiki/index.php/WDS_Linked_router_network

What @tsachih described above is some kind of bridge mode that I have never seen before. It is unclear to me in your description why the Photon cannot just be on the home network all the time–there are many ways to achieve what I think your goal is, including just using the Spark cloud as it was intended. The nice thing about the Spark cloud is that any host that can connect to the internet in any way can serve as the front end for a home control app on a Photon.

@AndyW, If I read you right, than you’re actually saying that the silicon might be fully capable of performing this task, however, the Broadcom provided communication library does not support that level of complexity.

That would be a good argument to Broadcom that their proprietary SDK is pushing their sales down…

@bko, In ideal world everything is super simple. Real life sucks. really.

Now, the reason for the dual-WLAN is that the home network is:

  1. not guaranteed to be available all time.
  2. sometimes available with some constraints. ( i.e. MAC filtering, bad DHCP server and other realities)
  3. sometimes available with no internet connection.
  4. jumping between networks on a web browser isn’t trivial due to “browser security features”. ( and don’t let me go there… I’ve messed with this long enough )

btw - I really appreciate all your help on this forum.

1 Like

No, I’m saying it is highly likely that this silicon does not support it, because it is not targetted at APs.

Hey @peekay123,

Never mind. Answered here:

How would you set the core to associate with multiple WiFi networks? I know I can set credentials but does this not overwrite previous credentials? For instance if I code the following will the core associate with one of these networks when they are in range:

WiFi.setCredentials("homeNetwork", "superSecret");
WiFi.setCredentials("workNetwork", "1234567890");
WiFi.connect();
while(!WiFi.ready());
Serial.print("Connected to: ");
Serial.println(WiFi.SSID());

In this example the module would be in my car powered by a battery. I want it to connect to the network when I get to work and to my home network when I get home. Is this possible? You say it can store up to 7 SSID/Password combinations but cannot find an example use case for multiple networks.

Thanks

@IOTrav, the work is done by the cc3000 and associations are done in a first-in, first-out way with a max of 7 credentials being stored. The cc3000 will attempt to connect to the stored SSID with the strongest signal level and will stay connected until it loses that connection. So, going from home to work will be straight forward. However, roaming in a place where you have overlapping access points, the cc3000 may not “hop” as expected since it will not re-evaluate its connection until the existing one has dropped.

As for credentials, you can explicitly program them (as in your code example) or by setting them once and allowing the cc3000 to store them in one of its 7 “slots”. :smile:

My understanding is that the Photon will be able to host both a AP and a STA wifi network concurrently. I’ve not tested this - this will be my focus next sprint, along with putting the system loop on a separate thread from the user code.

Thanks. I vaguely recall that I’ve seen a demo that shows STA + AP on broadcom’s web site.