Page 1 of 1

LuaSocket on Synology DS716+ with a 64 bit Intel Celeron N3150 processor

Posted: Sunday 28 February 2016 12:25
by mhwlng
to get the LuaSocket library working on a Synology DS716+ with a 64 bit Intel Celeron N3150 processor

take usrlocalliblua5p2.tar.gz and usrlocalsharelua5p2.tar.gz from this thread :
http://www.domoticz.com/forum/viewtopic ... 638#p22638

which contains core.so for raspberry pi ARM processor.

Then replace these core.so with the 64 bit versions from this github project :

https://github.com/pkulchenko/ZeroBraneStudio
\ZeroBraneStudio-master\bin\linux\x64\clibs52\mime\core.so
\ZeroBraneStudio-master\bin\linux\x64\clibs52\socket\core.so

(note that I have not tested the 32 bit versions of core.so from above github project on other Synology NAS devices with a 32 bit intel processor.)

Put the files here (directories didn't exist) :

/usr/local/lib/lua/5.2/mime/core.so
/usr/local/lib/lua/5.2/socket/core.so

/usr/local/share/lua/5.2/*.lua
/usr/local/share/lua/5.2/socket/*.lua
/usr/local/share/lua/5.2/socket/core.so


This now works :

Code: Select all

local socket = require("socket")
local http = require("socket.http")
print(socket._VERSION)
print(http.request("http://w3.impa.br/~diego/software/luasocket/"))

Re: LuaSocket on Synology DS716+ with a 64 bit Intel Celeron N3150 processor

Posted: Wednesday 25 May 2016 18:05
by ricvee
Hi,

What do you mean with:

/usr/local/share/lua/5.2/*.lua
/usr/local/share/lua/5.2/socket/*.lua

Do I have to delete these files?

I followed your instructions, an now I get this error:
2016-05-25 18:06:05.282 Error: EventSystem: in pv.lua: error loading module 'socket.core' from file '/usr/local/lib/lua/5.2/socket/core.so':
/usr/local/lib/lua/5.2/socket/core.so: invalid ELF header

Re: LuaSocket on Synology DS716+ with a 64 bit Intel Celeron N3150 processor

Posted: Wednesday 25 May 2016 18:09
by mhwlng
create the directories and put all the lua files in there

(don't make a directory with the name '*.lua')

invalid elf header probably means that you use 32 bit executable files on a 64 bit processor or the other way around (or you have an arm processor instead of an intel processor)

Re: LuaSocket on Synology DS716+ with a 64 bit Intel Celeron N3150 processor

Posted: Saturday 18 February 2017 15:06
by Gravityz
Can anybody help me out with the correct lua socketlibrary for a synology 112+ (MARVELL Kirkwood 88F6282 cpu)

i tried above suggestions and took the 32 bit core.so form github but apparently that one is not for this cpu.

thanks

Re: LuaSocket on Synology DS716+ with a 64 bit Intel Celeron N3150 processor

Posted: Tuesday 09 May 2017 14:40
by TroisSix
Hi, I also followed instructions of mhwlng, but no luck on my DS412+ (Atom 2700 cedarview 64bits), the two core.so files are not functional for my syno: neither 64b nor 32bits... I get the same error as ricvee, has anyone found a solution?
Thanks for you help

Re: LuaSocket on Synology DS716+ with a 64 bit Intel Celeron N3150 processor

Posted: Monday 29 May 2017 10:03
by TroisSix
Has someone any idea please? :roll:
My Pi3 works well with the philips hue script, but I'm still searching for a compatible solution on my NAS ;)