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

How to get Blynk running on OpenWrt?

#1

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.

0 Likes

#2

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!

0 Likes

#3

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!

0 Likes

#4

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.

0 Likes

#5

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?

0 Likes

#6

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

0 Likes

#7

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

0 Likes

#8

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

0 Likes

#9

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

0 Likes

#10

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

0 Likes

#11

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.

0 Likes

#12

@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.

0 Likes

Blynk device on openwrt
#13

Did you finally test it on real hardware?

0 Likes

#14

Yes it was tested

0 Likes

#15

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

0 Likes

#16

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

0 Likes

#17

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

0 Likes

#18

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

0 Likes

#19

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

0 Likes

#20

@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