I am running blynk local server on Windows 7 machine without self signed cert. Next I am running a nodejs script on PI to connect to the server[local ip,port=8443].
The output of rpi while running script is:
Connecting to SSL :192.168.0.101:8443
Error DEPTH_ZERO_SELF_SIGNED_CERT
Now I think it is not able to find self signed cert on Windows server. So i tried to create .crt and .pem file and also edited the server.properties file. But when I check log it says
C:\Users\Karan\Desktop\openssl-0.9.8k_X64 and key C:\Users\Karan\Desktop\openssl-0.9.8k_X64 paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
So some one please tell me how to resolve the depth zero error, and if I am right about the self signed cert then tell me how to mention the path of server.crt and server.pem files in server.properties. [remember i am using Windows]
i get the same error on raspberry pi 2. I have installed a local server. If i start a programm on arduino with the local server on raspberrry all works well.
But if i start a programm directly on raspberry i get the errror:
@Dmitriy So i removed the port no from script and its automatically assigning 8441 as the port. But still i am get this error DEPTH ZERO SELF SIGNED CERT. I even tried running the server on ubuntu and creating the certificates.
In logs it shows found server certificates but no client certificates using one way ssl.
Please tell me if i need to create certificate on rpi where i am running my node js script?
thats already my client code on raspberry. I would like to start the programm kodi with blynk by pressing a button in the ios app.
var Blynk = require('/usr/local/lib/node_modules/blynk-library');
var sys = require('sys')
var exec = require('child_process').exec;
var AUTH = 'XXXXXXXXXXX'; //uncomment ;)
var blynk = new Blynk.Blynk(AUTH,options= {addr:"192.168.10.7",port:8443});
var v9 = new blynk.VirtualPin(9);
v9.on('write', function(param) {
console.log('V9:', param);
function puts(error, stdout, stderr) { sys.puts(stdout) }
exec("kodi", puts);
});
client:
var Blynk = require(’/usr/local/lib/node_modules/blynk-library’);
var AUTH = ‘somecode’;
var blynk = new Blynk.Blynk(AUTH, options= {addr:“192.168.0.10”,port:8441});
CLIENT:
OnOff mode
Connecting to SSL: 192.168.0.10 8441
Error undefined
Connecting to SSL: 192.168.0.10 8441
Error undefined
Connecting to SSL: 192.168.0.10 8441
Error undefined
SERVER: blynk.log
21:57:55.446 INFO - Using data dir ‘/home/pi/Blynk’
21:57:55.514 DEBUG - Starting reading user DB.
21:57:57.795 DEBUG - Reading user DB finished.
21:57:58.263 INFO - Initializing mail transport. Username : example@gmail.com.
SMTP host : smtp.gmail.com:587
21:57:59.650 DEBUG - hard.socket.idle.timeout = 15
21:57:59.651 INFO - Plain tcp/ip hardware server port 8442.
21:58:03.413 INFO - SSL hardware port 8441.
21:58:03.434 INFO - Enabling SSL for application.
21:58:03.436 WARN - Found server certificates but no client certificate for ‘/h
ome/pi’ path. Using one way ssl.
21:58:03.487 DEBUG - app.socket.idle.timeout = 600
21:58:03.488 INFO - Application server port 8443.
21:58:03.501 INFO - Administration server port 8777.
21:58:10.197 TRACE - Hardware channel disconnect.
21:58:14.744 TRACE - Hardware channel disconnect.
21:58:19.725 TRACE - Hardware channel disconnect.
root@raspberrypi:/home/pi/BlynkScripts# ./blynk-start-Kodi.js
OnOff mode
Connecting to SSL: 192.168.10.7 8441
Error undefined
Connecting to SSL: 192.168.10.7 8441
Error undefined
After that i have the following lines in log:
root@raspberrypi:/home/pi# cat ./logs/blynk.log
16:08:15.677 INFO - Using data dir '/home/pi/Blynk'
16:08:15.726 DEBUG - Starting reading user DB.
16:08:17.992 DEBUG - Reading user DB finished.
16:08:18.469 INFO - Initializing mail transport. Username :xxx@xxx.com. SMTP host : mail.gmx.net:587
16:08:19.742 DEBUG - hard.socket.idle.timeout = 15
16:08:19.742 INFO - Plain tcp/ip hardware server port 8442.
16:08:23.323 INFO - SSL hardware port 8441.
16:08:23.345 INFO - Enabling SSL for application.
16:08:23.347 WARN - Found server certificates but no client certificate for '/home/pi' path. Using one way ssl.
16:08:23.400 DEBUG - app.socket.idle.timeout = 600
16:08:23.402 INFO - Application server port 8443.
16:08:23.416 INFO - Administration server port 8777.
16:09:27.188 TRACE - Hardware channel disconnect.
16:09:31.864 TRACE - Hardware channel disconnect.
Yes and using below server properties. Tried using complete path as well but getting the same error.
I’ve tried using newly created jessie and wheezy images for raspberry pi thinking it may not be compatible to the latest debian version but still getting the same error on each version.
When generating the certificate in the local server, make sure to use the hostname of the local server under Common Name (e.g. server FQDN or YOUR name). eg. raspberrypiserver
Copy the server certificate(eg. server.crt) at client’s folder “/usr/local/lib/node_modules/blynk-library/certs”.
In the client’s /etc/hosts file, insert the ip-address and hostname of the local server. eg. “192.168.0.10 raspberrypiserver”.
In the client’s app, use the hostname instead of the IP-address. eg. addr:“raspberrypiserver”,port:8441