xueliu / lora-feed

Semtech packages and ChirpStack Network Server stack for OpenWRT
GNU General Public License v2.0
76 stars 55 forks source link

Cannot load the JSON package #2

Closed cretingame closed 6 years ago

cretingame commented 6 years ago

Hi,

Althougth selected the json lua library in menuconfig. It can't load the JSON library. The logread below:

Sun Jan  1 02:14:46 2012 user.notice root: SX1301 reset completed
Sun Jan  1 02:14:46 2012 user.notice root: Generate /etc/global_conf.json
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd: lua: /usr/sbin/gen_lora_global_conf:3: module 'JSON' not found:
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        no field package.preload['JSON']
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        no file './JSON.lua'
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        no file '/usr/share/lua/JSON.lua'
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        no file '/usr/share/lua/JSON/init.lua'
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        no file '/usr/lib/lua/JSON.lua'
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        no file '/usr/lib/lua/JSON/init.lua'
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        no file './JSON.so'
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        no file '/usr/lib/lua/JSON.so'
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        no file '/usr/lib/lua/loadall.so'
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd: stack traceback:
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        [C]: in function 'require'
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        /usr/sbin/gen_lora_global_conf:3: in main chunk
Sun Jan  1 02:14:46 2012 daemon.notice procd: /etc/rc.d/S99lora_pkt_fwd:        [C]: ?

Checking the folders, I got this:

root@OpenWrt:~# ls /usr/lib/lua
iwinfo.so          json.lua           luci               mime               mime.so.1.0.3      nixio.so           socket.lua         ubus.so
json               ltn12.lua          lucihttp.so        mime.lua           nixio              socket             socket.so.3.0-rc1
root@OpenWrt:~# ls /usr/lib/lua/json
rpc.lua
cretingame commented 6 years ago

I finally found the module: http://regex.info/code/JSON.lua

xueliu commented 5 years ago

Sorry. I did not notice your issue.

I will update this package to use the lua json library in the OpenWRT and push to the mainline.

cretingame commented 5 years ago

Hi,

No worries, I just included the libraries in my custom openwrt.

Thank you for all the work done, your packages are very convenient to use!

Le sam. 18 août 2018 à 23:31, Xue Liu notifications@github.com a écrit :

Sorry. I did not notice your issue.

I will update this package to use the lua json library in the OpenWRT and push to the mainline.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/xueliu/lora-feed/issues/2#issuecomment-414087495, or mute the thread https://github.com/notifications/unsubscribe-auth/AVgWPkSrJ1muL-YL4SL5T0CbiZkbjc3Vks5uSIeigaJpZM4UIi9e .