Part 2: Setup the Blynk server on your PC
1-Java instalation
- Download and install Java 11.0.7
Download and install Java 11.0.7 from their official website below:
java 11.0.7
- Set Java as a user variable
After that, you have to set Java as a system path. Just type in the search box of windows “path”, and click on “Edit the system…” as follow:
A new window will pop-up. bypass all things and go to “Environment variables”, then create a new user variable as follow:
BTW, The variable value it’s where the Java bin folder located. That’s completely related to where you’ve installed the Java file.
So the full scheme would be: Start>Edit the system environment variables>Environment variables>New(under user variables)>Write down Your Java bin folder location and the name as well.
3. Download Blynk server
-
Download server-0.41.13.jar (for my case) from:
Blynk server
-
Steps to run the server:
1-First of all, you should confirm that Java is already installed by the following command in the CMD: java -version
And as a result you should get :
2-Put the downloaded server file into a new folder named as per you preferences. I named it “MyBlynkServer”.
We are all set to start the server, yet, you should check out the server.properties file if it looks like mine. You can access to the file by opening the server file with an archive software “Winrar my case”, then double click on the file.
If you want to change it, you can extract the file from the archive, edit it and then reimport it inside the archive.
4-Run the server
-Now you can start the server by entering this CMD command:
java -jar server-0.41.13.jar -dataFolder E:\MyBlynkServer\MyPath
This part “E:\MyBlynkServer\MyPath” means where do you want to output the results of the Blynk app actions like who has logged in …etc
In my case I’ve created a new folder inside the first one and named it: MyPath.
If a firewall window pops-up, just grant the access. if not, then try to disable your firewall or add the Java to the allowed apps list.
For a successful start of the blynk server, you should obtain:
or even some other lines that tell you your default login credentials.
Now your local server is running.
- Connect your PC to the WI-FI hotspot named: “AP no internet access” that we’ve created it already in Unit 1.
- Change your IPv4 settings:
Before you make changes, you have to figure out you local IPv4 address from CMD command as follow: ipconfig
mine is: 192.168.43.108 from: Control Panel>Network and Internet>Network and Sharing Center>Left click on your Wi-Fi name:
It will appear a new window, go to properties and continue you procedures same as the image bellow.
Ps: Ip address should be the same as your Ipv4 address.