FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
187 views 7 comments
by anonymous

Hello

I can't run this STARTUP SCRIPT:

# Put your custom commands here that should be executed once

# the system init finished. By default this file does nothing.

gsmctl -S -s "[redacted by moderators] Inicio Equipo TRB245 LL"

lua /root/Loops2_5Feb23.lua

Somebody can help me?

Thanks and best regards.

FW: TRB2_R_00.07.03

1 Answer

0 votes
by anonymous

Hello,

  

A few things could be tried here:

  • Send SMS command requires the phone number to be in an international format and the + symbol should be replaced by two 0, e.g. 00370xxxxxxxx;
  • /root in /root/Loops2_5Feb23.lua is not needed at the beginning of the file, as /root directory is simply identified by / in OpenWRT
  • Make sure permissions are set for the lua file by running this command: chmod +x /Loops2_5Feb23.lua
If this does not help, logs could be checked for a hint of what could be wrong, by running a command logread using SSH or CLI.

  

Best regards,
DaumantasG

by anonymous

Hello again

I am returning to this topic with a RUT955  (RUT9_R_00.07.04.2) , it still does not run.

the rc.local :

# Put your custom commands here that should be executed once

# the system init finished. By default this file does nothing.

gsmctl -S -s "xxxxxxxxx Inicio Equipo TRB955 Desarrollo"

lua /root/Sistema.lua &

echo "FIN START UP"

exit 0

in the logread:

Sun Jun 11 21:25:51 2023 daemon.notice procd: /etc/rc.d/S16done: SMS sent: 1

Sun Jun 11 21:25:51 2023 daemon.notice procd: /etc/rc.d/S16done: FIN START UP

but "Sistema.lua" dont run in any moment.

Thansk and best regards

by anonymous
Hello,

  

Could you share the contents of the Lua file? It can be attached to the original post and will only be visible to the moderators.

  

Best regards,
DaumantasG
by anonymous
Ready, that's it, but it works without problem outside the script.

Thanks
by anonymous

Hello,

  

The file does not seem to be available.

If you wish to not share it, then it's hard to say what could be the issue. The startup script is a standard implementation from OpenWRT. More information can be found here.

  

Best regards,
DaumantasG

by anonymous
can you help me with an example that worked with lua?

I can´t made it work.

Thanks and best regards
by anonymous

Hello,

  

There seem to be some files missing for your application (at least on the default firmware).

You can see the errors by running your script when logged into the CLI of the device, so in your case:

lua /root/Sistema.lua

Could you post the output here?

  

Best regards,
DaumantasG

by anonymous
I certainly skipped the rest of the modules.

I'd be happy to get an error saying it can't find them since I'd know to start executing them.