Sending data between two spark cores without connecting to the cloud

Dear All
I'm looking forward to connect two spark cores together without the cloud to send the data back and forth. Therefore, can I do that directly between them or I should use the local cloud as mentioned in the community:

to be able to do that?
Any suggestion will be appreciated.
Thanks in advance.
@bko @Dave

You can consider TCP/UDP communucation as well without a :cloud: .

A local :cloud: makes it somewhat easier with some heavy lifting work done :smile:

2 Likes

Any simple examples out there that you know of on how to get two photons to play ping-pong?

1 Like

Dear @kennethlimcp
Thanks for the fast reply. Do you mean that I can use the TCP CLIENT, TCP SERVER which are mentioned in the Particle Docs to achieve the communication between two spark cores without internet and without connecting to the cloud?
Thanks in advance.

Hey Ahmedsa1983,

This reply seems to be what I’m looking for but I’m a rookie to this microcontroller…

Could you perhaps expand on how to do this ?

Cheers,

Oscar

Hi @odlh,

If you want two Photon modules to communicate with each other and they are on the same network then I would recommend having one act as a TCP server and the other connect to it as a client. This will allow the two to communicate with each other. See links for documentation on TCP Client and TCP Server

@IOTrav

Thank you ! Hopefully this will work !

If you have any questions let me know. I have used the TCP client and server libraries quite a bit.

Hi, I am exactly doing the work connecting three photon with one of it working as a server and the other two photon working as a client. But I am totally confused by the procedure I should take.
Can you give me some instruction.

This should be possible. However I have not tried connecting multiple TCPClients to a single Particle TCPServer object. The documentation on TCPServer and TCPClient would be my best recommendation.

well, thanks! I have done this. I receive messages from clients independently by switching the client I connect with different remoteIP.