Custom Script block Boot of TRB142

with an older Firmware i use the following Script:


With the older Firmware it works fine.

Now i updated the Firmware of the TRB142 and noch my modem doesnt boot up.
It helps only a Reset to bring the Modem back to a running status.

When i use this commands manually in the cli all works fine.

Could someone help me to solve this problem?


I assume the script is continuosly running?

I am not aware of the contents of your script, but could you try the following methods to see if they work?

cd /storage
# Run mqtt-serial-converter in the background
./mqtt-serial-converter &


(sleep 20 &&
cd /storage &&
./mqtt-serial-converter) &

exit 0

The second option introduces some delay in form of a ‘sleep’ command to ensure that the services are started before executing the script.

Kind Regards,

thanks for your answer.

I tried this. Then the Modem starts but i dont see the process with ps.

yes, the script is continuosly running.

Best regards

i tested a little bit.

When i start it with sh /etc/rc.local it works fine.

In the normal Boot-Process it doesnt work.


Have you tried increasing the delay?

Could you please tell more about the contents of the script? What does it use?

I assume that the device is running the latest firmware version. Correct?

Kind Regards

its a Script that reads out Data with Modbus over Serial-Connection and sends this Data to a MQTT-Broker.

I will try increasing the delay. I tested it only with the 20 Seconds.

I updated to the last Firmware. With the new Firmware it doesnt work.
With an old Firmware all works fine. (TRB1_R_00.07.01.4)

Thanks in advance.


You mentioned that the TRB was not booting with the script. Does it boot fine when you changed the rc.local?

Could you add something like this in the beginning of your coverter script?

echo "hello" > /etc/result

And check if it executed after the boot? This would help to see if the script is executed on boot or not.

Kind Regards,

this is something i tried before.
This is working fine.

i find a solution.

Seems that the output is in the new firmware the problem.

I get a running State wie the following script:

(sleep 20 &&
cd /storage &&
./mqtt-serial-converter > /dev/null 2>&1) &

exit 0
1 Like

This topic was automatically closed after 15 days. New replies are no longer allowed.