Page 4 of 10

Re: [App] libRunWidget D/E/F/H

Posted: Tue Jul 28, 2015 9:59 pm
by smart_lover
zoelechat wrote:
smart_lover wrote:Whenever I run manually CP command that exists in init script( I mean 'cp -rf /dtv/usb/sda1/MyWidget/MyWidget /mtd_rwcommon/widgets/user'). It works well and my file contents copy also successfully. But my problem is when the init script wants to run above CP command.
Precisely because environment (->PATH) might not be exactly the same whether you're in-Telnet or in-Script, and possibly the "wrong" cp is used if no path specified :)
I follow your suggestion but unfortunately your provided suggestion did not help me.

Finally after some try and error and with helps of sleep command ,I find out my strange problem!!!

Whenever I use

Code: Select all

micom reboot
right after using CP command, Although all files contents successfully copied but also after restarting TV suddenly all files contents goes away and I encountered with many empty (0 byte) files!!!!!!!

My solution is remove 'micom reboot' and instead of it, use

Code: Select all

samyGOrc -p $(pidof exeTV || pidof exeDSP) 1 152
to automatically power off TV!

Thats it!

Anyway. Thanks for your help.

Re: [App] libRunWidget D/E/F/H

Posted: Tue Jul 28, 2015 10:17 pm
by juusso
Sometimes sync after each cp command may help too. At least it definitely will not harm :)

Re: [App] libRunWidget D/E/F/H

Posted: Tue Jul 28, 2015 10:18 pm
by zoelechat
(edit) Faster than me juuso ;)

Code: Select all

sync
micom reboot
(worth the try if you still prefer reboot to power off...)

Re: [App] libRunWidget D/E/F/H

Posted: Wed Jul 29, 2015 5:34 pm
by smart_lover
juuso wrote:Sometimes sync after each cp command may help too. At least it definitely will not harm :)
Thanks for your both great helps, you and zoelechat are always my all times heros.

This combination greatly

Code: Select all

sync
micom reboot
solve my problem.
Dear zoelechat, Of course I need to restart my TV instead of power it off and your suggestion works like a charm!

Re: [App] libRunWidget D/E/F/H

Posted: Fri Jul 31, 2015 11:45 am
by smart_lover
zoelechat wrote:(edit) Faster than me juuso ;)

Code: Select all

sync
micom reboot
(worth the try if you still prefer reboot to power off...)
Although my widget run at startup successfully, but some times it exit automatically without any user command!
After that, I can run it once again remotely(samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libRunWidget.so ID:widgetID) and this time widget will remain steady on screen!

here is my RunWidget log file:

Code: Select all

[RunWidget] SamyGO D/E/F/H libRunWidget v0.1.0 - (c) zoelechat 2015
[RunWidget] _ZNSsC1EPKcRKSaIcE [0xd96e6c].
[RunWidget] _ZN17CInfoLink2Wrapper9RunWidgetESsiSs [0x13e7f58].
[RunWidget] dlsym '_ZN17CInfoLink2Wrapper9RunWidgetESsiSsb' failed.
[RunWidget] dlsym '_ZN15CCDebugInfoLink15m_TestRunWidgetESsl' failed.
[RunWidget] _ZNSsD1Ev [0xd95ffc].
[RunWidget] lib_init, >>>
[RunWidget] Launching widget with ID: MyWidget
[RunWidget] <<< lib_deinit
My guess:
Is this because of difference between below two commands?
1:samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libRunWidget.so ID:MyWidget (execute with rcRemap with help of SamyGOrc)
2:samyGOso -A -B -l /mnt/opt/privateer/usr/libso/libRunWidget.so ID:MyWidget (execute in init file)

What is -d switch in first command?

Re: [App] libRunWidget D/E/F/H

Posted: Fri Jul 31, 2015 12:23 pm
by zoelechat
-d is just debug output of samyGOso, it doesn't matter if you use it or not.
Maybe add some sleep before launching widget, in case Smarthub is not fully loaded at this point, or launch it twice :D

Re: [App] libRunWidget D/E/F/H

Posted: Fri Jul 31, 2015 12:50 pm
by smart_lover
zoelechat wrote:-d is just debug output of samyGOso, it doesn't matter if you use it or not.
Maybe add some sleep before launching widget, in case Smarthub is not fully loaded at this point, or launch it twice :D
Launching it twice will exit widget if it is running properly!!
How can I make sure(remotely) my widget is up and running?(I have no access to my TV and it is located far far away from my sight!) And after make sure my widget is not running, run my widget remotely once again.

Does libRunWidget run based on Smarthub!? Does libRunWidget run my widget after loading Smarthub? Does Smarthub run during startup of TV?
I think it will not run(Smartub) until I press Smarthub button on my remote control!

Re: [App] libRunWidget D/E/F/H

Posted: Fri Jul 31, 2015 12:59 pm
by zoelechat
smart_lover wrote:How can I make sure(remotely) my widget is up and running?
No way, unless your widget itself write some file/flag for example :)
smart_lover wrote:Does libRunWidget run based on Smarthub!? Does libRunWidget run my widget after loading Smarthub? Do Smarthub run during startup of TV?
Not on Smarthub but WidgetEngine which is loaded during TV boot and takes some time. That's why you should try to add some sleep...

Re: [App] libRunWidget D/E/F/H

Posted: Fri Jul 31, 2015 1:00 pm
by sectroyer
zoelechat wrote: Not on Smarthub but WidgetEngine which is loaded during TV boot and takes some time. That's why you should try to add some sleep...

Code: Select all

sleep 3600
"INJECT_RUN_WIDGET"
this should do the trick and make sure you don't run widget to quickly :)

Re: [App] libRunWidget D/E/F/H

Posted: Fri Jul 31, 2015 1:08 pm
by smart_lover
sectroyer wrote:
zoelechat wrote: Not on Smarthub but WidgetEngine which is loaded during TV boot and takes some time. That's why you should try to add some sleep...

Code: Select all

sleep 3600
"INJECT_RUN_WIDGET"
this should do the trick and make sure you don't run widget to quickly :)
3600 is in millisecond or second?!