Tian stops working after some hours

I know nothing about the Tian but it is not a good idea to use the String (capital S) class on an Arduino as it can cause memory corruption in the small memory on an Arduino. Just use cstrings - char arrays terminated with 0.

Your symptoms could be caused by memory becoming corrupted after a large number of String operations.

...R