Remote Terminal Window for Spark/Particle Core

Is there a way to have a terminal window running on my Windows PC and have the spark core output information to it WITHOUT being connected via a USB cable? Something like Serial.print(""); but without a USB connection. Perhaps transmitting through wifi and having the terminal window listening to whatever the core is transmitting.


@osprey, you could use a TCPServer and TCPClient to create a telnet type of service on the Core/Photon. The TCPServer would open telnet port 23 and you can use Putty to connect to it. You could then use client.print() command to print message to the telnet client (Putty) over wifi.

This is actually a great “tool” to implement! It does take up a socket but I believe a least couple are available to the user so that should be fine even when another server/client is open. Let me think on it this weekend and try to get some code out.

@bko, I’d love to get your ideas on this one! :smile:


Hi @osprey

In addition to @peekay123 excellent advice on a telnet-style solution, I would add that Spark.publish() works pretty well for this if you

  • watch out for the rate limit and only publish once per second on average
  • Make your debug info less wordy–single character + a number

You can buffer up short messages into a longer one to reduce the publish interval. Right now the length limits are changing and will soon be up to 255 chars per publish.

I also have a serial backpack on an LCD display that I like for debugging messages, particularly if you don’t need the TX/RX pins for your app.


Thanks @peekay123 ! If you plan to do a tutorial, keep in mind that I an absolute beginner and I am not sure I understood everything you said. I never used putty.

1 Like

@bko, super great ideas! It may be a great idea to create a “simple debugging tools” topic and outline the different ways to debug without going into JTAG tomfoolery :smile:

1 Like

Thanks @bko ! I will look up this publish thing you mentioned but I might need to send debug info at a slighter faster rate than once a second.

Hi peekay123,can you give the more refined steps to do what you said above!!.I am absolutely complete beginner for this TCPClient things…

@ashish150395_, search the forum for “telnet” as I believe I discussed that and posted some code. Let me know what you find! :wink: