BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Getting started on local server

I’m trying to get a local Blynk server up-and-running, and a couple of questions have come up for me:

  1. Use of Blynk.begin() in my Arduino Uno sketch. I have a starter sketch running using BLE. It has the following global definition in it:
Adafruit_BluefruitLE_SPI ble(BLUEFRUIT_SPI_CS, BLUEFRUIT_SPI_IRQ, BLUEFRUIT_SPI_RST);

and then in “setup()”:

Blynk.begin(auth, ble);

I looked in https://github.com/blynkkk/blynk-server#app-and-sketch-changes, but saw nothing for BLE. I tried:

  char auth[] = "auth token from app";
  IPAddress serverAddr(192, 168, 1, 76);
  int port = 9443;
  Blynk.begin(auth, serverAddr, port, ble);

also

  char auth[] = "auth token from app";
  char ssid[] = "admin@blynk.cc";
  char pwd[] = "server password specified in server.properties file";
  Blynk.begin(auth, ssid, pwd, ble);

In both cases, the compiler is complaining. What is the correct signature for calling “begin” for use with BLE?

  1. I’m trying to bring up the admin console for the server in Chrome. When I enter the URL: https://192.168.1.76:9443/admin (using the URL the server indicated on startup) Chrome gave me a page saying “Connection is not private” and would not load the admin console. When I tried https://127.0.0.1:9443/admin, I get a green screen with “Blynk Administration” in the upper left corner, and a login box. When I enter “admin@blynk.cc” and the password I stored in server.properties, the console rejects them (blinks and resets). How can I get logged in?

Thanks very much for helping me get up-and-running!

SOLVED. 1) This was a mis-understanding on my part. The Blynk.begin(auth, ble) that I started with is exactly what’s needed for EITHER cloud server or local server. I’m concluding that bluetooth connects directly between hardware and app, not through the server. 2) The TextEditor program I was using on the Mac was hiding a bunch of markup in the server.properties file. When I did a “cat” in the terminal, I could see it. The result was to garble the server password. The fix was to delete the file, then re-create it by typing “cat > mail.properties” in the terminal, type in all the correct lines, then cntl-D to complete the file. With the server re-started I could login to the server using 127.0.0.1 The URL indicated by the server is still not working in Chrome, but I have a work-around.