OpenWrt Forum Archive

Topic: Problem running an application

The content of this topic has been archived on 8 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

I have a "crazy" problem with OpenWRT (White Russian RC4). I have written an application that is transfering data between WAN/LAN and a USBbridge for our sensor network.

When I start this application manually (via SSH), it runs for hours without problems. But when I start it automaticly at system start (script in /etc/init.d/) or when I plugin the USB device (script in /etc/hotplug.d/usb/), it crashes within a very short period of time. It does not exit via one of the returns in the source code, there seems to be something in the system that stops the application, but I don't know what?!?

can anyone help me?

PLease post more information.

like your script you want to run
and the starup script.

I don't run a script, I run a C application build with the OpenWRT-SDK.

the script in /etc/init.d/ was named S60runapp and does only contain the line

/usbapp/usbbridge &

for /etc/hotplug.d/usb/ I have copied the 01-... script, deleted most lines and put in the same command.

Here's the complete code of the file 02-usb located in /etc/hotplug.d/usb/

case "$ACTION" in
    add)
        /usbapp/usbbridge &
    ;;
esac

Sorry, i missed one line in S60runapp, but I think this one was natural:

#!/bin/sh

/usbapp/usbbridge &

The discussion might have continued from here.