Connection Error

I am starting to blynk :smile: over USB serial; it works at home and now I tried to run the same sketch at work but get the following error

could it be the company firewall?

Connecting device at COM11 to cloud.blynk.cc:8442…
OpenC0C("\.\COM11", baud=9600, data=8, parity=no, stop=1) - OK
Connect(): connect(“cloud.blynk.cc”, “8442”) ERROR Unknown error (10061)
Reconnecting in 3s…

Waiting for 0 seconds, press a key to continue …
OpenC0C("\.\COM11", baud=9600, data=8, parity=no, stop=1) - OK
Connect(): connect(“cloud.blynk.cc”, “8442”) ERROR Unknown error (10061)
Reconnecting in 3s…

Waiting for 0 seconds, press a key to continue …
OpenC0C("\.\COM11", baud=9600, data=8, parity=no, stop=1) - OK

/**************************************************************
  • Blynk is a platform with iOS and Android apps to control

  • Arduino, Raspberry Pi and the likes over the Internet.

  • You can easily build graphic interfaces for all your

  • projects by simply dragging and dropping widgets.

  • Blynk library is licensed under MIT license

  • This example code is in public domain.


  • This example shows how to use ordinary Arduino Serial
  • to connect your project to Blynk.
  • Feel free to apply it to any other example. It’s simple!
    1. Optional, but recommended.
  • Connect additional USB-serial adapter to see the prints.
    1. Edit auth token and upload this sketch.
    1. Run the script (script located in “scripts” folder of library root,
  • e.g. ‘blynk-library/scripts’) for redirecting traffic to server:
  •  for Windows:         scripts/blynk-ser.bat
    
  •  for Linux and OSX:   ./scripts/blynk-ser.sh (may need to run with sudo)
    
  • You can specify port, baud rate, and server endpoint like this:
  •  ./blynk-ser.sh -c <serial port> -b <baud rate> -s <server address> -p <server port>
    
  • For instance :
  •  ./blynk-ser.sh -c /dev/ttyACM0 -b 9600 -s cloud.blynk.cc -p 8442
    
  • Run blynk-ser.sh -h for more information
  • Be sure to select the right serial port (there may be multiple).
  • Attention!
  •    Arduino IDE may complain with "programmer is not responding".
    
  •    You need to terminate script before uploading new sketch.
    
    1. Start blynking! :slight_smile:

**************************************************************/

// You could use a spare Hardware Serial on boards that have it (like Mega)
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11);
#define BLYNK_PRINT SwSerial
#include <BlynkSimpleSerial.h>
#include <SimpleTimer.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “XXXXXXXXXXX”;

WidgetLED led1(1);
WidgetLED led2(2);

SimpleTimer timer;

void setup()
{
SwSerial.begin(9600);
Blynk.begin(auth);
timer.setInterval(1000, sendUptime);

timer.setInterval(1000, blinkLedWidget);
timer.setInterval(1500, fadeLedWidget);
// Default baud rate is 9600. You could specify it like this:
//Blynk.begin(auth, 57600);
}

void sendUptime()
{
// You can send any value at any time.
// Please don’t send more that 10 values per second.
Blynk.virtualWrite(5, millis()/1000);
Blynk.virtualWrite(6, millis()/1000);
}

void blinkLedWidget()
{
if (led1.getValue()) {
led1.off();
BLYNK_LOG(“LED1: off”);
} else {
led1.on();
BLYNK_LOG(“LED1: on”);
}
}

void fadeLedWidget()
{
if (led2.getValue()) {
led1.off();
BLYNK_LOG(“LED2: off”);
} else {
led2.on();
BLYNK_LOG(“LED2: on”);
}
}

void loop()
{
Blynk.run();
timer.run(); // Initiates SimpleTimer
}

Your IT services may have disabled connections to different ports…
I don’t have any other ideas why it can fail.

@Geab

try “telnet cloud.blynk.cc 8442” from your PC within office network to see if ports open in your office.

THX - will try and get back

It is very unusual in a secure company firewall to allow port 8442/8443 outbound additionally if the firewall has any application checking this would further make things problematic.

Try a guest wireless or a different network.

Did the telnet cloud.blynk.cc 8442 and got

Connecting To cloud.blynk.cc…Could not open connection to the host, on port 8442: Connect failed

will try our guest network as proposed by @Spudgunman

The guest network has a time limit :frowning:
hence one would need to change the passcode on the YUN every 3 days which does not make it really attractive; could there be a chance of tunneling one way or another?

I configured the correct SSID and passcode via the YUN configuration menu : 192.168.240.1
but now the guestnetwork requires to log on via Internet explorer using a
Username eg myself@myself.com &
Passcode;
any idea how to pass this info via the sketch?

thx

this will be info I get from the serial monitor

added: Starting bridge…

Current WiFi configuration
SSID: NZGuest
Mode: Client
Signal: 0%
Encryption method: -
Interface name: wlan0
Active for: 0 minutes
MAC address: XX:A2:DA:F8:16:XX
RX/TX: 0/0 KBs

Port 8442 closed on provider side for security reason