To debug the error, we need output screenshot of sudo journalctl -u rc-local.service | tail -100 command. please provide it.
Meanwhile, you can test the python program run_pkt_fwd.py manually. Check if there are any syntax errors or any logical errors and ensure that it is running without any errors.
We run it manually and its works as expected. Also, the same python program the functions like led control work, and the function for executing shell commands not working.
I suggest you make these changes to the python program.
import os
# Path to the packet forwarder program
packet_forwarder_path = "/home/pi/SX1303_hal-main/packet_forwarder/lora_pkt_fwd"
# Path to the packet forwarder config file
packet_forwarder_config_path = "/home/pi/SX1303_hal-main/packet_forwarder/global_conf.json.sx1250.IN865"
# Command to start the packet forwarder program
packet_forwarder_cmd = f"{packet_forwarder_path} -c {packet_forwarder_config_path}"
# Start the packet forwarder program using os.system
os.system(packet_forwarder_cmd)