[SOLVED] Can't connect hardware to local server


i have a server running on RPI zero which has an wifi dongle and successfully running on and app connected to it , also admin page working fine.

trouble shoot i have done

  • my hardware is connected to the WIFI and has taken an IP
  • my server is running as my app connected to it also admin page working fine from my laptop.
  • my RPI server has ports (22 , 5900) for ssh and vnc , (8080 , 8443) for Blynk exposed.

my sketch is

    Downloads, docs, tutorials: http://www.blynk.cc
    Sketch generator:           http://examples.blynk.cc
    Blynk community:            http://community.blynk.cc
    Follow us:                  http://www.fb.com/blynkapp

  Blynk library is licensed under MIT license
  This example code is in public domain.


      This sketch shows how to read values from Virtual Pins

      App project setup:
        Slider widget (0...100) on Virtual Pin V1

    /* Comment this out to disable prints and save space */
    #define BLYNK_PRINT Serial

    #include <ESP8266WiFi.h>
    #include <BlynkSimpleEsp8266.h>

    // You should get Auth Token in the Blynk App.
    // Go to the Project Settings (nut icon).
    char auth[] = "6c4c75ae3ca341efb931c70e457fb0ef";

    // Your WiFi credentials.
    // Set password to "" for open networks.
    char ssid[] = "HomeWifi";
    char pass[] = "a123456789";

    // This function will be called every time Slider Widget
    // in Blynk app writes values to the Virtual Pin V1

    void setup()
      // Debug console

      //Blynk.begin(auth, ssid, pass);
      // You can also specify server:
      //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
      Blynk.begin(auth, ssid, pass, IPAddress(192,168,0,222));

    void loop()

i have tried to change blynk.befin with port 8443 also not work and my my serial monitor is just showing Connecting to HomeWifi

is any change to the sketch or settings on the server required ?

thanks in advance

you need to define your rpi’s ip in your code

missing the port

Wait he did have his ip ? wow i must be tired…

Thanks but in my post i mentioned i have tried it both with ports 8843 and 8842 akso without port.
All same results

Fyi i left the token and tbe ip in my code here because it’s local server so i am sure you can’t get access to it.:grin::grin:

How am i gonna access your wifi anyway ?

You will need to add port 8442 actually in the shown script, otherwise someone else will probably point it out as well :wink:

What versions App, Server and Library are you using?

The below piece of code is the one I use always with my local server (already with your data ready to copy/paste)

#define server "" 
char auth[] = "6c4c75ae3ca341efb931c70e457fb0ef";
char ssid[] = "HomeWifi";
char pass[] = "a123456789";

void setup()
  Blynk.begin(auth, ssid, pass, server);

Give it a try…

1 Like

Thanks, man :joy:.

then you are welcome to Egypt :grin:

i am using library v0.4.7 , and server-0.24.3 , and for some reason which i don’t know :joy: it’s now working.
here is the config part Blynk.begin(auth, ssid, pass, IPAddress(192,168,0,222), 8442);

I would never post my own data… too risky…:joy:

So this not your home I’m controlling right now? Hm… :joy:


If someone in have the same token in you Blynk cloud :sun_behind_large_cloud: which is almost impossible the you arr controlling his home.
My ssid which you see in my code is totally isolated and has no Internet connection. So good luck trying. :cry: