What technologies used in accessing spark core from cloud


I’m really curious to know how it is that the Spark Cloud can access my spark core regardless of the various firewalls I’ve had it behind. Is it using Web Sockets technologies?

Hey @risingtiger! In order to communicate with the Spark Cloud, the Core opens a persistent TCP socket with the Spark Cloud using an encrypted version of CoAP through outgoing port 5683 on your network. CoAP stands for “Constrained Application Protocol”, and is basically a byte efficient version of HTTP for use in constrained environments, like on itty bitty hardware.

Does that help to answer your question?


Fantastic! Now I have a whole new chapter of learning:)

Thank you for the update.

Hi will,
So each Spark Core acts like a CoAP server, or I’m getting this wrong?

Spark Core is a client. It connects to the Spark Cloud and communicates via CoAP.

The cloud has a HTTP interface that you can use to send data to the Spark Core. If a message is sent to the Spark Cloud then figures out what connected Spark Core it needs to send the data too.

Hope that makes since.

1 Like

Thanks, @Carsten4207!

Hi, @Carsten4207 , how can the Spark server sends the control command to the client? one way is the spark core client maintains a short coap connection, and then on the cloud side, when sending a command it searches the connection and send the command through this coap connection. another way is the spark core client also acting like a server, every time the spark core client registers with cloud server, the cloud server remembers its IP address and sends the command accordingly

as far as I know from this post, the spark core will maintain a coap connection for 15 seconds, so I guess when the cloud wants to send the control command to spark core, it will just uses this short-lived incoming connection to send back the command, is it?

Hi @helxsz

Please see my answer in your other thread–the core-to-cloud connection is TCP and not short-lived so your assumptions don’t hold here.