[App] Get/Set Current Time From TV C/D/E

Here are software that related with Samsung C series TVs, applications, programs that will run in your TV or computer...:!:This forum is NOT FOR USER QUESTIONS or Problems.

zoelechat
SamyGO Moderator
Posts: 7678
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] Get/Set Current Time From TV C/D/E

Post by zoelechat » Mon Aug 10, 2015 2:22 pm

smart_lover wrote:I have two question:
1:Is there any possibilities to set Date/Time on TV init after TV power on with helps of remote server (remote server will set it in TV)within Telnet in NO INTERNET access network?
2:Does your lib supports H series TVs? Is there any plan for close future support?
Here's a minimal lib I did that should work to set time from B to H.
By default, it first tries to get time from TV and if result is inaccurate (what often happens, especially if on external source) it gets it from file. You can also force it to get it only from file using FROMFILE arg:

Code: Select all

samyGOso -A -B -l /mnt/opt/privateer/usr/libso/libSetTime.so SET FROMFILE
File have to be /tmp/ntp_time, a text file containing time from epoch e.g:

Code: Select all

1439212253
That way you can create file using any method you want before injection.
Is also included a sample startup script, writing file after getting time from NTP server.

For localtime offset, if needed, check "Bonus" spoiler there.
You do not have the required permissions to view the files attached to this post.
I do NOT receive any PM. Please use forum.

smart_lover
SamyGO Project Donor
Posts: 158
Joined: Sun May 03, 2015 6:11 am

Re: [App] Get/Set Current Time From TV C/D/E

Post by smart_lover » Mon Aug 10, 2015 11:00 pm

zoelechat wrote: Here's a minimal lib I did that should work to set time from B to H.
By default, it first tries to get time from TV and if result is inaccurate (what often happens, especially if on external source) it gets it from file. You can also force it to get it only from file using FROMFILE arg:
I created a file named 'ntp_time' and filled it with '1439212253' and put it in '/tmp/' path. After that I run

Code: Select all

samyGOso -A -B -l /mnt/opt/privateer/usr/libso/libSetTime.so SET FROMFILE
and I got following log file

Code: Select all

[SetTime] SamyGO B/C/D/E/F/H libSetTime v0.0.6 - (c) zoelechat 2015
[SetTime] _ZN6PCTime9EpochTimeEv [0x15e444c].
[SetTime] clock_settime [0x4248d2e0].
[SetTime] lib_init, >>>
[SetTime] Got time from file!
[SetTime] Epoch time: 1439212253
[SetTime] <<< lib_deinit
but whenever I call 'date' command or I use menu/system/time with remote control, TV's datetime is still 'Thu Jan 1 00:44:23 UTC 1970' or '--:--'.
what is my problem? Why set date not works properly in my TV.

Note:My TV is H series.

zoelechat
SamyGO Moderator
Posts: 7678
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] Get/Set Current Time From TV C/D/E

Post by zoelechat » Tue Aug 11, 2015 8:25 am

It's a lib I quickly did for myself, possible it doesn't work on H... Maybe try to inject -T instead of -A.
I do NOT receive any PM. Please use forum.

smart_lover
SamyGO Project Donor
Posts: 158
Joined: Sun May 03, 2015 6:11 am

Re: [App] Get/Set Current Time From TV C/D/E

Post by smart_lover » Tue Aug 11, 2015 11:42 am

zoelechat wrote:It's a lib I quickly did for myself, possible it doesn't work on H... Maybe try to inject -T instead of -A.
I test it with -T instead of -A. But same result.
Is there any hope for support in H series?

I have another problem, Although I set my clock to auto mode(get datetime from broadcasting channels) but I get same result 'Thu Jan 1 00:14:08 UTC 1970' with date command. In other hand, In clock setting in menu I get proper and right datetime!! Why?!! How I can get datetime with telnet in the state that TV set its datetime from channels automatically?

zoelechat
SamyGO Moderator
Posts: 7678
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] Get/Set Current Time From TV C/D/E

Post by zoelechat » Tue Aug 11, 2015 12:12 pm

No idea if it could be supported on H, I'd need H to tell you :) . Maybe sectroyer had a good reason for not to port his patch to F/H, mine was even not meant to be released...
System and TV date/time are independant settings. TV (mostly) doesn't care of system time which remains and restarts at epoch every reboot and handle its own retrieved from channels. You still can use patch without arg to GET time then parse log when needed.
I do NOT receive any PM. Please use forum.

sectroyer
Official SamyGO Developer
Posts: 5623
Joined: Wed May 04, 2011 5:10 pm

Re: [App] Get/Set Current Time From TV C/D/E

Post by sectroyer » Tue Aug 11, 2015 4:09 pm

zoelechat wrote:No idea if it could be supported on H, I'd need H to tell you :) . Maybe sectroyer had a good reason for not to port his patch to F/H, mine was even not meant to be released...
On H it breaks PVR !!!! :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

smart_lover
SamyGO Project Donor
Posts: 158
Joined: Sun May 03, 2015 6:11 am

Re: [App] Get/Set Current Time From TV C/D/E

Post by smart_lover » Wed Aug 12, 2015 8:47 am

sectroyer wrote:On H it breaks PVR !!!! :)
PVR is not important for me. Is there any hope to have proper version for H support(Even without need of PVR)?

sectroyer
Official SamyGO Developer
Posts: 5623
Joined: Wed May 04, 2011 5:10 pm

Re: [App] Get/Set Current Time From TV C/D/E

Post by sectroyer » Wed Aug 12, 2015 10:23 am

smart_lover wrote:
sectroyer wrote:On H it breaks PVR !!!! :)
PVR is not important for me. Is there any hope to have proper version for H support(Even without need of PVR)?
PVR is only ONE of features that don't work. IIRC others were reminders, widgets, etc. :) If you don't plan to use ANY features that require "accurate" time than this patch is for you :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

smart_lover
SamyGO Project Donor
Posts: 158
Joined: Sun May 03, 2015 6:11 am

Re: [App] Get/Set Current Time From TV C/D/E

Post by smart_lover » Sat Jul 23, 2016 7:18 pm

sectroyer wrote:Simple App that just gets Current Time directly from TV (based on hedaks findings)
I use your lib in following way:
timezone.png
How can I find what is my timezone? (F.Y.I: I am not in GMT!)
My current and correct time is the one in 'The current date/time is:' line and not the one int 'date/time+offset' line. How can I make my TV to use proper one?
As you can see I already used -U to set UTC with no luck!
You do not have the required permissions to view the files attached to this post.

zoelechat
SamyGO Moderator
Posts: 7678
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] Get/Set Current Time From TV C/D/E

Post by zoelechat » Sat Jul 23, 2016 8:51 pm

Use only -u switch (-s does crap) to set correct UTC, then rename/copy right localtime file to expected path :)
I do NOT receive any PM. Please use forum.

Post Reply

Return to “[C] Software”