This may be a more general Telnet question, I’m not sure.
I’d like to send a string of ASCII to my Core over TCP/Telnet. I’m using the code in the firmware documentation:
// EXAMPLE USAGE
// telnet defaults to port 23
TCPServer server = TCPServer(23);
TCPClient client;
void setup()
{
// start listening for clients
server.begin();
// Make sure your Serial Terminal app is closed before powering your device
Serial.begin(9600);
// Now open your Serial Terminal, and hit any key to continue!
while(!Serial.available()) SPARK_WLAN_Loop();
Serial.println(WiFi.localIP());
Serial.println(WiFi.subnetMask());
Serial.println(WiFi.gatewayIP());
Serial.println(WiFi.SSID());
}
void loop()
{
if (client.connected()) {
// echo all available bytes back to the client
while (client.available()) {
server.write(client.read());
}
} else {
// if no client is yet connected, check for a new connection
client = server.available();
}
}
I’m able to connect to the core just fine using its local IP address, however, I have been unable to connect over the internet (using the IP address listed in the dashboard).
I’m using Tera Terminal and other than the IP address, I haven’t changed anything when I attempt to connect.
Any ideas?
Thanks very much in advance,
Mark