Page 1 of 6

[App] libLogChannel B/D/E/F/H

Posted: Sun Feb 08, 2015 10:33 pm
by zoelechat
This lib extracts and logs some infos about current TV state (source, channel, program, volume, resolution).
Can be useful if you'd like to retrieve/parse such "real-time" infos remotely.

Code: Select all

[LogChannel] SamyGO D/E/F/H libLogChannel v0.1.0 - (c) zoelechat 2015
[LogChannel] >>>
[LogChannel] Source: TV (0)
[LogChannel] TV mode: Air (0)
[LogChannel] Volume: 12 (mute)
[LogChannel] Channel number: 1
[LogChannel] Channel name: TF1 HD
[LogChannel] Program name: Les bronz?s font du ski
[LogChannel] Resolution: 1920x1080
[LogChannel] <<<
Usage:
*For D series (arm), replace every instance of /mnt below by /mtd_rwcommon/widgets/user/SamyGO/SamyGO
*For B series, latest samyGOso is there and lib version to use is there.
  • Get latest samyGOso from there and copy/overwrite samyGOso file (not folder) to /mnt/opt/privateer/usr/bin
  • Set permissions if needed (usually not if overwritten)

    Code: Select all

    chmod +x /mnt/opt/privateer/usr/bin/samyGOso
  • Extract attached archive and copy libLogChannel.so to /mnt/opt/privateer/usr/libso (create folder if needed)
  • Execute

    Code: Select all

    samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libLogChannel.so
    Logfile containing informations is written to /dtv/LogChannel.log
*Changelog:

Code: Select all

19/2/2015
v0.1.1 - Quicker TV series detection
8/2/2015
v0.1.0 - First release

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

Posted: Mon Feb 09, 2015 9:40 pm
by oldman
Nice work, zoelechat!

Here is my result (F series)

a) volume 3

Code: Select all

[LogChannel] >>>
[LogChannel] Source: TV (0)
[LogChannel] TV mode: Air (0)
[LogChannel] Volume: 3
[LogChannel] Channel number: 1
[LogChannel] Channel name: CT 1 HD
[LogChannel] Program name: Report??i ?T
[LogChannel] Resolution: 1920x1080
[LogChannel] <<<
b) volume 3 + mute

Code: Select all

[LogChannel] >>>
[LogChannel] Source: TV (0)
[LogChannel] TV mode: Air (0)
[LogChannel] Volume: 3 (mute)
[LogChannel] Channel number: 1
[LogChannel] Channel name: CT 1 HD
[LogChannel] Program name: Report??i ?T
[LogChannel] Resolution: 1920x1080
[LogChannel] <<<
c) after switch to hdmi1 source

Code: Select all

[LogChannel] >>>
[LogChannel] Source: HDMI1 (57)
[LogChannel] TV mode: Air (0)
[LogChannel] Volume: 3 (mute)
[LogChannel] Channel number: 1
[LogChannel] Channel name: CT 1 HD
[LogChannel] Program name: Report??i ?T
[LogChannel] Resolution: 1920x1080
[LogChannel] <<<
One question... what is the number 57 in brackets in the Source line ?

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

Posted: Mon Feb 09, 2015 9:53 pm
by zoelechat
Thanks report ;)
oldman wrote:One question... what is the number 57 in brackets in the Source line ?
Source "ID" reported by TV, I first wanted to use it to detect source in use, but it seems to be different depending on TV (HDMI1 is 67 on mine, 59 on sectroyer's...). So I've ended in detecting only HDMIx using another trick for now, other external sources being "undefined (*random number*)" . TV will always be "TV (0)" though :)
The same way but with accurate values this time, TV mode is: air=0, cable=1 and sat=3

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

Posted: Mon Feb 09, 2015 10:05 pm
by oldman
Understood!

Do you planning to prepare a version of libLogChannel with output to the console instead of a file? It might be more convenient and faster for parsing e.g. for rc.

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

Posted: Mon Feb 09, 2015 10:56 pm
by zoelechat
Just asked to "the master" :P , it's obviously not easily possible to output anything to stdout when injecting a lib, so nothing better at once than:

Code: Select all

samyGOso -A -B -l /mtd_rwcommon/libLogChannel.so ; sleep 0.5 ; cat /dtv/LogChannel.log

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

Posted: Mon Feb 09, 2015 11:04 pm
by oldman
There is too much unnecessary chars, but it looks much better. Thanks

Code: Select all

root@tv:/mnt $ samyGOso -A -B -l /mtd_rwcommon/libLogChannel.so ; sleep 0.5 ; ca
t /dtv/LogChannel.log
samyGOso v1.2.4 (c) bugficks 2013, sectroyer 2014
Injecting '/mtd_rwcommon/libLogChannel.so' resident: '0'
Succeeded.
[LogChannel] SamyGO D/E/F/H libLogChannel v0.1.0 - (c) zoelechat 2015
[LogChannel] >>>
[LogChannel] Source: TV (0)
[LogChannel] TV mode: Air (0)
[LogChannel] Volume: 5
[LogChannel] Channel number: 10
[LogChannel] Channel name: SMICHOV
[LogChannel] Program name: TELE TELE
[LogChannel] Resolution: 720x576
[LogChannel] <<<

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

Posted: Mon Feb 09, 2015 11:06 pm
by zoelechat

Code: Select all

samyGOso -A -B -l /mtd_rwcommon/libLogChannel.so >/dev/null ; sleep 0.5 ; cat /dtv/LogChannel.log
:)

I've especially inserted

Code: Select all

[LogChannel] >>>
...
[LogChannel] <<<
for you to parse more easily ;)

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

Posted: Mon Feb 09, 2015 11:10 pm
by oldman
zoelechat wrote:

Code: Select all

samyGOso -A -B -l /mtd_rwcommon/libLogChannel.so >/dev/null ; sleep 0.5 ; cat /dtv/LogChannel.log
Better!

Yes, '>>> <<<' separator is a good idea. What about compatibility for C series?

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

Posted: Mon Feb 09, 2015 11:14 pm
by zoelechat
For now I'm nearly beginner and I've absolutely no idea on how to develop for C nor Dmips (Dmips must not be too different, but AFAIK C is), and I'm not sure it will interest me one day, too outdated. :D
So, in state and since you already do a firmware/TV series check, I guess it means no real-time infos on C/Dmips :)

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

Posted: Mon Feb 09, 2015 11:24 pm
by oldman
Clear. Suporting mentioned series is not so important to me, but I'm already thinking about how to implement libLogChannel.so to WinSamyGOrc. Forget it. You've already done a great job.