So it turns out the Spark Core 1 ---> cloud ---> Spark Core 2 setup that I had planned for is much more complicated than just that. After some research, I discovered that two Spark Cores cannot be connected to the same IP address. This means that each Core can be controlled wirelessly by its individual IP address, but getting these two IP addresses to talk to each other may not be in the scope of this project. On Particle's site there is a discussion about the same dilemma, and somebody mentioned a way around that problem. In their words:
"I'm sure you're right about the Spark Core with it's current software, and sorry to be picky, but you can associate more than one IP address with one network interface.
Also, for two Spark Cores to communicate there is no need for any special CC3000 functionality. Already this is easy enough using TCP or UDP. The issue is how do two Spark Cores identify each other, how do they communicate their IP addresses to each other. Already this can be done at the application level on your LAN. Broadcast a UDP packet saying "I'm a Spark Core, my Spark ID is x and my IP is y." [You only need give your IP address because this cannot reliably be discovered by the recipient on Spark UDP owing to it being buggy.]
I guess the forthcoming webhooks facility will provide this as part of the Spark Cloud and then two Spark Cores won't need to be on the same LAN to discover each other, and no UDP messing about will be required.
But pending that @spydrop could get his Cores all on the same LAN talking to each other in the way I describe. My Cores intercommunciate but I've told the local nameserver the MAC addresses of my Spark1, Spark2 etc and so the discovery process needs not be programmed even though the IP addresses are not fixed."
I don't know what that means.
It gives me hope, though. When Daniel comes to the office today, I'll ask him what his thoughts are on this approach and if he can explain it to me. If this doesn't end up working out, I'll probably switch back over to the Flora (if that can do cellular) and make an app that the Cores can communicate over. I really hope I don't have to take this route...
"I'm sure you're right about the Spark Core with it's current software, and sorry to be picky, but you can associate more than one IP address with one network interface.
Also, for two Spark Cores to communicate there is no need for any special CC3000 functionality. Already this is easy enough using TCP or UDP. The issue is how do two Spark Cores identify each other, how do they communicate their IP addresses to each other. Already this can be done at the application level on your LAN. Broadcast a UDP packet saying "I'm a Spark Core, my Spark ID is x and my IP is y." [You only need give your IP address because this cannot reliably be discovered by the recipient on Spark UDP owing to it being buggy.]
I guess the forthcoming webhooks facility will provide this as part of the Spark Cloud and then two Spark Cores won't need to be on the same LAN to discover each other, and no UDP messing about will be required.
But pending that @spydrop could get his Cores all on the same LAN talking to each other in the way I describe. My Cores intercommunciate but I've told the local nameserver the MAC addresses of my Spark1, Spark2 etc and so the discovery process needs not be programmed even though the IP addresses are not fixed."
I don't know what that means.
It gives me hope, though. When Daniel comes to the office today, I'll ask him what his thoughts are on this approach and if he can explain it to me. If this doesn't end up working out, I'll probably switch back over to the Flora (if that can do cellular) and make an app that the Cores can communicate over. I really hope I don't have to take this route...