TCP Port not starting

Hello guys,

I used blynk as a local blynk server on my raspberry pi 3b till the micro sd card died.
Now I started all over and got stuck on connecting any hardware to the blynk server.
The blynk app could connect without any problems.
The raspberry pi is open to everything which comes from my local network and I didn’t changed anything on the router since the sd card broke.

Here the log:

03:23:33.212 INFO - Using data dir ‘/home/pi/Blynk’
03:23:36.049 INFO - Region : local. Host : 127.0.1.1.
03:23:37.995 INFO - Initializing gmail smtp mail transport. Username : ****.*****@gmail.com. SMTP host : >smtp.gmail.com:587
03:23:38.092 INFO - Didn’t find custom user certificates.
03:23:38.097 INFO - Didn’t find Let’s Encrypt certificates.
03:23:38.097 WARN - You didn’t specified ‘server.host’ or ‘contact.email’ properties in server.properties file. Automatic >certificate generation is turned off. Please specify above properties for automatic certificates retrieval.
03:23:38.098 WARN - ATTENTION. Server certificate paths (cert : ‘/home/pi’, key : ‘/home/pi’) not valid. Using >embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
03:23:39.911 INFO - Hardware SSL server listening at 8441 port.
03:23:39.916 INFO - HTTP API and WebSockets server listening at 8080 port.
03:23:39.918 INFO - HTTPS API, WebSockets and Admin page server listening at 9443 port.
03:23:39.921 INFO - Mqtt hardware server listening at 8440 port.

and the server.properties (tried with and without)

hardware mqtt port
hardware.mqtt.port=8440

hardware ssl port
hardware.ssl.port=8441

hardware plain tcp/ip port
hardware.default.port=8442

#http and web sockets port
http.port=8080

#https and web sockets port
https.port=9443

#application ssl port
app.ssl.port=8443

I “hacked” the library in the src/Blynk folder. I changed BlynkConfig.h with these settings and reflashed my ESP’s:

#define BLYNK_DEFAULT_DOMAIN     "192.168.178.103"
#define BLYNK_DEFAULT_PORT       8080
#define BLYNK_DEFAULT_PORT_SSL   8441

Obviously change the IP address. This way you can use the default Blynk.connect(auth); connection handler without having to set the IP and so on in your sketch. It’s a bit tricky because you have to change it when you update your library, but it works for me :slight_smile:

1 Like

Thanks nice idea.