Apologies if these questions have been asked before and answered elsewhere, I did try searching.
Ok so lets say we have a spark that is setup as an access point or is one of the devices on a wifi network.
And there is an APP on a smart phone thats on the same wifi network.
So now here is what I am trying to figure out:
Can the APP speak with the spark without having to use the Spark Cloud?
e.g. can spark have a TCP port listening and can the APP on the phone send messages to that port or even better run a http server on it?
Can the spark send TCP messages right to the APP?
Some other questions:
A) Does the Spark have to use the Spark Cloud or register with it? Don’t get me wrong I see the benefits. But what if you are just after making something you can only want to control locally via wifi?
B) Lets say an app on a smart phone and the spark are connected to a wifi connection that has no connection to the internet. What restrictions if any does this pose on communications between the spark and the app?
C) From what I understand a spark registers itself with a central Spark Cloud system, is this correct? If so will spark only work if you do this?
D) Do you have to create a spark account in order to use and program a spark?
E) Does SPARK have a network diagram showing how everything interconnects, what messages are sent where and when?
I know these are alot of question which you may think answers are not need to in order to use spark. You are right.
but for me I like to know as much as possible about how a platform works, this way I can make the most of it when programming gadgets.
And there are community libraries like HttpClient as well.
There are also SYSTEM_MODEs that give you control over the Core’s behaviour regarding the cloud connection (see http://docs.spark.io/firmware/#advanced-system-modes)
So you don’t have to use the cloud at all or you can run a local cloud server, but out the box the Core will want to call home by default…
For D): It wouldn’t harm, but as far as I think it’s not compulsory (on the other hand, you seem to have one already ;-))
In addition the excellent answer you already got from @ScruffR I would just add that in the beginning of your post you mention the Spark Core being an access point. This is the only thing in your list that Spark Core cannot do–it must connect to an access point, not be one. The new upcoming (and backward compatible) Spark Photon does have AP mode for setup but I don’t know if you can use that mode for general operation.
If you want to compile and download programs without using the web IDE or the Spark command line tools, a traditional makefile approach is available. Just add your favorite editor or configure up an IDE (I know @ScruffR likes Eclipse for instance). There is a tool chain to download and use, but it is pretty standard.
Also, if you want to run stuff on your own network without using the Spark Cloud (due to a lack of internet connection for example), you can consider setting up a Local Cloud. This has most functions of the Spark Cloud, but can be controlled and managed locally, thus handing the power to you. You can edit all settings, set up rules, and edit in in any way you see fit. If I’m not mistaken, you can run it on pretty much anything that can run Node.js (think Raspberry Pi for example).
Your own spark core local “cloud” seems like an interesting idea.
I’m also assuming there is nothing stopping you from running it on your own hosted server. Would that be correct?
If you can do that then I assume you can control what spark device is allowed to communicate with what app?
Is there any doco on how the access is controlled by device and app? E.g what smart phone is allowed to access what spark device.