Arduino Uno /w w5100 shield not connecting to local server

full reedit:

concerns an Arduino Uno /w 5100 ethernet shield. Running following code:

void setup(){

  Serial.println("Deselect SD card...");
  digitalWrite(SDCARD_CS, HIGH); // Deselect the SD card
  Serial.println("Blynk Begin");
  Blynk.begin(auth, ssid, pass, server, port);
  Serial.println("Starting Blynk connection");
  Serial.println("Blynk connect");
  while (Blynk.connect() == false) {  }           // Wait until connected
  toTerminal(String("Blynk v") + BLYNK_VERSION + " started");
  initVPins();    //INIT VIRTUAL PINS
  timer.setInterval(TIME_RUN_FUNCTIONS, runFunctions);                               // every 1 minute: run time functions.
  runFunctions();                                                                    // make sure they also run on startup

void runFunctions(){
  Serial.println("run one minute functions");
  updateTerminalLAbel();                          // every 1 minute: update the label on the terminal (time/version)
  reconnectBlynk();                               // check every minute if still connected to server
  //checkDevices();                                 // do this also immediately on startup.

void loop(){;;

gives me:

Deselect SD card...
Blynk Begin
[0] Using static IP
[1560] IP:
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.5.3 on Arduino Uno

  Give Blynk a Github star! =>

[1756] Connecting to wolph42:670
[16819] Connecting to wolph42:670
etc. for every 10s or so. 

any clue what Im doing wrong?

Note that I have a bunch (12) or ESP’s connected to the server all working dandy, somehow this arduino doesnt want to play ball…

Are those relevant to your Ethernet setup? ))

during my sleep I gathered the same thing: no they’re not, do you think thats the issue?

ok replaced with:

  Blynk.config(auth, server, port);

and now I get:

Deselect SD card…
Blynk Begin
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
//_, /////_
__/ v0.5.3 on Arduino Uno

Give Blynk a Github star! => GitHub - blynkkk/blynk-library: Blynk library for IoT boards. Works with Arduino, ESP32, ESP8266, Raspberry Pi, Particle, ARM Mbed, etc.

[202] Connecting to
[5202] Connecting to
Starting Blynk connection
Blynk connect
[10203] Connecting to
[15204] Connecting to
[20205] Connecting to
etc. etc. etc;

I’d start with trying some of the basic code examples from the Sketch Builder to make sure it’s not a hardware issue.
These Ethernet shields are notoriously flaky and some don’t work with certain Ethernet switches.


1 Like

@wolph42, are you trying to use Blynk.begin() along with Blynk.config() and Blynk.connect() ?? If so, it is not a correct approach. I think you just forgot, that Blynk.begin() is a “combo” command and those latter are not necessary. You were active on this (below) topic too, so just a reminder:

@PeteKnight I did test the shield earlier on to see if I can ‘get connected’ this worked, I didn’t do this through blynk though, just created a simple webserver and checked that locally from another pc.

@marvin7, indeed I was, but not (yet) in the ethernet area. Thnx for the reminder.

are you trying to use Blynk.begin() along with Blynk.config() and Blynk.connect()

No im not. .config() and .connect() in setup .run() in the loop. I was using .begin() in my very first attempt, to which @vshymanskyy replied. I changed it in my second attempt. Nonetheless, are you suggesting that I should try this:

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };  //you can edit it to your needs

if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
 Blynk.config(auth, server, port);

I will test this evening. Thank you both.

You should start with plain simple example of Blynk and Ethernet, and not mixing stuff with WiFi, etc.