I run local sever on my Raspberry, it works ok. But I have an issues with local clients (C++ one to be more exact). JS client works ok. But I prefer C++ client. Alas, it eats 100% of one of CPU cores when I start it. Why?
You have like 20 instances of what I’m guessing is java -jar /PATH/BlynkServer.jar Perhaps that interfere? If you use top instead of htop, does it show the same CPU utilization? htop can be a bit funky
distans, Didn’t you never know that blynk local server creates lot of sub-threads? Contgrats! vhymanskyy, any progress? Well, it is not so urgent, but I hope to resolve this. I tried to check with top, with same result.
I can confirm this too on my RasPi3. It shows 100% CPU. I just run the client, local server is on another Pi, so it is definitely somewhere in the client side of things.
Neither, I just compiled with the buildscript, so I guess that makes a C++ client, nothing to do with WIringPi or NodeJS. It’s a standalone client Like the topic starter does
-edit
Build.sh shows wiringpi to be installed. I thought it would build a C++ client, lol.
Well, JS-client works well on same board with server. Moreover, I checked it today on my Cubieboard 2. Same 100%!
So the issue definitely lies inside C+±mode client.
That I know… bracketed version# was in ref to the WiringPi… and yes, it is a BETA library, so probably the root of the issue.
Yes, I see now what you mean with HTOP… but most don’t seem to be really doing much, so not sure what all the seperate indications actually represent… more Linux crap to learn
And here I thought that WiringPi was the only way to run C++ in the RPi… a bit-o-Googling later and apparently C and C++ is readily compilable on the RPi… natively??
OK… now I know a bit more… but i think I will stick with learning JS on the RPi so as to broaden my horizons a bit.
Guys wiringPi is a C++ library, that makes rpi coding very similar to Arduino.
our C++ library can be built either with or without it. There are 2 build flavours:
Linux - without wiringPi (i.e. for Ubuntu)
Raspberry - with wiringPi.
hense, vanilla linux version can’t perform direct pin operations.
100% cpu issue is on the library side, almost certainly. I’ll take a look at it soon. Sorry
Of course I know it creates threads… I’m just trying to exclude one possibility at time. If you had hit F5 in htop, the threads would actually have been shown, sparing you from uneducated guesses from my part.
The state of the process:
S for sleeping (idle)
R for running
D for disk sleep (uninterruptible)
Z for zombie (waiting for parent to read its exit status)
T for traced or suspended (e.g by SIGTSTP)
W for paging
It appears to be stable. The RasPi also doesn’t go offline anymore (which it did about 5 seconds after connecting). CPU consumption is next to nothing now. You did great! (as if we ever doubted you… ha, not!).