synchronize the systemclock with python

Hallo,
I tried to synchronize the systemclock of an Connectport X4.

os.system() will not work.

Is there a possibility?

As of the “C” revision of the 82001536 (ConnectPort X4) firmware, the embedded Python has supported a module named “digicli”. The module has one method: “digicli”. The function accepts a Digi CLI command string and executes the string, return a tuple with a boolean success status and a list of the lines of CLI output. This can be used to execute the “set time” command.

Untested example:

from digicli import digicli
status, output = digicli(“set time date=04.14.08 time=12:34:02”)

Can you clarify your intent?

When you say “synchronize”, are you attempting to “set” the time that is returned by, for instance, the time module? I assume that you would (in this case) already be retrieving the time from some external source.

i had wrote a python programme, which will get the time from an NTP-Server once a day.
In the programme I use the localism()-function with the ConnectPort X4 rtc.
For time correction i want to synchronize the RTC to the NTP-time once a day.

Current Version of Firmware supplies the feature.
Thanks!

Message was edited by: arndt.rinne

Does this also apply to the ConnectPort X2? I have

Model: ConnectPort X2
Firmware: 2.6.4 (Version 82001596_A 09/27/2007)
POST: 1.1.3 (release_82001229_D)

but can’t import digicli …

Can you confirm that the X2 doesn’t have a “set time” or “set date” command?

Based on the change histories for the X2 firmware, it appears that the first version of X2 firmware to incorporate the digicli module is “B”, which is currently pending release. I do not, however, know the release schedule… contacting Digi sales or technical support directly would be a good way to try to determine this information.

The rev. B firmwares are now available on the Support website for both the Ethernet and Wi-Fi variants of the ConnectPort X2.

Thanks for the “heads-up” …

The X2 does not have a “set time” command.

I thought not. In case it is of use to others, I uploaded a little helper class that provides a reasonably accurate time() method. Assumes you have a network connection to the outside …

http://www.digi.com/support/forum/viewthread_thread,905#3424

i want to programmer my cateway CPX4 to collect data from network xbee …withou usinig cloud idigi
You can help me , i dont find any solution in the net …