Not Auto-Start Python Codes

Hi All,
I’m Using Digi Connectport X4 H
I’m Developing software that collect data from some nodes and send it by GPRS connection to my server
Here comes the problem [:(] that i uses auto-start my python code by the dpdsrv.py command and reboot on exit (so its infinite loop)
but from 5 days there is a problem facing me
that the system stop sending any data or collecting the data after some time (by other ways: its not running my python code on start-up or exit it and didn’t reboot)
what i think that it tries to connect to internet but after many tries it reboot but it don’t auto start the code
when i reboot the device from Idigi it works again.
and is there any way to monitor the running Python program from Idigi Web site or by any other means?
so how to fix this?
i attached the last 2 logs that contains the problem
Thanks In Advance
Islam Galal

Hello

You can monitor your program by setting following with python or iDigi console interface:

import sys,os,string,digicli st = "set trace state=on mode=concurrent syslog=on loghost=123.123.123.123 mask=printf:*" try: success, response = digicli.digicli(st) except: print "Setting trace failed..."

Of course you need to have some printing commands in your code to receive output from your python program. And you would also need a syslog server to receive the log.

Another what might help with your problem is try to set socket timeout. For example: “socket.setdefaulttimeout(10)” in your code.

Your CPX4 internet connection is not lost if you can access your device via iDigi.

Juha