Cannot connect to hardware with local blynk server

I setup a local Blynk server on a Raspberry Pi and got it running and created a new login account. I’m having issues connect to the hardware now. I turned on the #define BLYNK_DEBUG and this is the output I get from the console:

   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.5.1 on Teensy 3.5

[910] Connecting to SSID
[4113] AT version:1.2.0.0(Jul  1 2016 20:04:45)
SDK version:1.5.4.1(39cb9a32)
Ai-Thinker Technology Co. Ltd.
Dec  2 2016 14:21:16
OK
[9335] +CIFSR:STAIP,"192.168.1.105"
+CIFSR:STAMAC,"XX:XX:XX:XX:XX:XX"
[9335] Connected to WiFi
[19432] <[02|00|01|00] THIS PART PRINTS MY AUTH TOKEN
[29636] <[02|00|01|00] THIS PART PRINTS MY AUTH TOKEN...

I’m on the same wifi as the raspberry pi and input the local IP address on my Blynk.begin() code:
Blynk.begin(auth, wifi, ssid, pass, "192.168.1.140");
I’m also a little confused about which port I should be using. Currently I’m using 9443 but I saw in videos they used 8443 and others. Should I also be specifing the 9443 port in the Blynk.begin code?

Here are the ports from the server.properties file:

#hardware mqtt port
hardware.mqtt.port=8440

#hardware ssl port
hardware.ssl.port=8441

#http, plain web sockets and plain hardware port
http.port=8080

#secured https, web sockets and app port
https.port=9443

#application ssl port
app.ssl.port=8443

#address to bind to. by default bounded to all interfaces
listen.address=

I’m trying to connect to a Teensy 3.5 with ESP8266 wifi controller but haven’t been able to connect yet.

Devices now connect with port 8080 (in the script) the App connects with port 9443

1 Like

Thank you very much! I changed the port to 8080 in the Blynk.begin() and this solved my problem

Best option is forget the port number.

The libraries are designed in such a way that next time Blynk changes the port number your MCU will connect to the required port without it being in Blynk.begin() i.e. it will use the latest default port.

Entering a port number in Blynk.begin() is an advanced setup for Blynkers that already have systems using the Blynk default ports.