How to get Blynk running on OpenWrt?

OpenWrt is open source firmware that runs hundreds of devices, so by enabling support for OpenWrt we could have Blynk support for hundred devices…

How can this be done? I’m embedded linux developer who uses OpenWrt a lot and this would be an awesome combination.

I was able to build library for my host linux (Ubuntu) and for Raspberry Pi.
Cross-compilation is currently not supported, but you could easily modify the Makefile in the linux directory to build it for OpenWRT.

After compiling you will be able to use virtual pins. For Analog/Digital operations, more modifications in the library are needed (it’s a rather easy step, just implementing the proper handlers for your platform).

Please tell us how it goes. Thanks!

I am also willing to help.
To begin with recommended to connect the Arduino for USB (blynk-library-master \ examples \ BoardsAndShields \ Arduino_Serial_USB \ Arduino_Serial_USB.ino) to execute a script on the router (blynk-library-master \ scripts \ blynk-ser.sh).
The next step is to use the built-in serial- port (UART- console) , and then integrated GPIO.
Thank you!

Hi all, here is an Instructable how to run JS libraary on linux-based boards:


I was able to run in on VoCore (OpenWRT) using Espruino.

is that will make the local server fully running on the Openwrt Router , or just as client which will need to
have a server and Auth token to communicate with?

An integrated solution would be nice. Like on the Pi platform. Running both client and server on one device.

Pi has an issue with SD card getting corrupted after some time , if no option to use Openwrt router.
i will install it on my Old case which is running as NAS

After initial SD card boot run Blynk on a USB or external hard drive?

Or get a specialized read/write SD card. They cost a bit more, but they are better than cheap crap from China :wink:

Do you have a source / url for the special cards @Lichtsignaal ?

No, not really, but I see companies like HPE use them for their vmware servers. I have a couple of those. The ones I have are really rotten expensive, like 50 euro’s each, but that’s retail price.

@valent @DJ_Wever @scropion86 @Lichtsignaal @Costas, check this out: https://github.com/vshymanskyy/blynk-library-openwrt

I didn’t test it on real hardware yet, but will do soon.

Did you finally test it on real hardware?

Yes it was tested

BTW, OpenWRT has Lua by default, maybe the Lua protocol implementation can be ported to OpenWRT… - that would be awesome!

I took a glance at Lua for OpenWRT, and unfortunately it doesn’t support creating tcp/ssl connections out of the box.
What a disappointment…

P.S. I may be wrong here - just found that luasocket and luasec are available from opkg

In addition to luasec and luasocket there is also a package called lua-openssl.

@raphik you look to have some experience with this. Between luasec and lua-openssl, which one is better?

Actually I have no experience, but it seems that luasec integrates well with luasocket.

@raphik I was able to create a Lua script that runs fluently on OpenWrt.
I’m planning to publish it soon. Would you be willing to test it?

2 Likes