[App] libAirToSat D/E/F/H

Here are software that related with Samsung F series TVs.
Please don't create any new topic here unless you have software to post/release.
Post Reply

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

[App] libAirToSat D/E/F/H

Post by zoelechat »

Lib allows to switch directly from air/cable to sat (to air/cable) source without having to explore TV menus or use any key macro to do so. Mainly designed to be used with libRCremap with CMD support. Of course no need to try it if you have no sat tuner on your TV.

Usage:
*For D series (arm), replace every instance of /mnt below by /mtd_rwcommon/widgets/user/SamyGO/SamyGO
  • 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 libAirToSat.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/libAirToSat.so
    Commandline can take 'CABLE' arg if you prefer to switch between cable/sat instead of air/sat

    Code: Select all

    samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libAirToSat.so CABLE
    TV should switch to sat if on air/cable, and to air/cable if on sat

    Logfile is written to /dtv/AirToSat.log
*Do not ask me for a switch between AIR and CABLE, a built-in key already exists in TV: KEY_ANTENA=54

Usage with libRCremap with CMD support:
  • Do not directly inject libAirToSat as CMD, a little intermediate script is needed to prevent consecutive injections, depending on how long you press remote button. Here's sample script (D/E/F only):
    SpoilerShow

    Code: Select all

    #!/bin/sh
    [ $(pidof ${0##*/}) ] 2>/dev/null || exit 0
    SODIR=/mnt/opt/privateer/usr/libso
    SAMYGOSODIR=/mnt/opt/privateer/usr/bin
    
    	$SAMYGOSODIR/samyGOso -A -B -l $SODIR/libAirToSat.so
    	sleep 2				# no new execution allowed before 2 seconds
    Script is attached in archive (CMD_libAirToSat), edit paths in it if needed.
  • H-series users have to use another script:
    SpoilerShow

    Code: Select all

    #!/bin/sh
    [ -e /tmp/.${0##*/} ] && exit 0
    echo OK > /tmp/.${0##*/}
    SODIR=/mnt/opt/privateer/usr/libso
    SAMYGOSODIR=/mnt/opt/privateer/usr/bin
    
    (echo "$SAMYGOSODIR/samyGOso -A -B -l $SODIR/libAirToSat.so" ; sleep 2) | /mnt/bin/telnet localhost 23
    rm /tmp/.${0##*/}
  • Copy script to /mnt/opt/privateer/usr/bin
  • Set permissions

    Code: Select all

    chmod +x /mnt/opt/privateer/usr/bin/CMD_libAirToSat
  • and remap expected key in libRCremap.config to

    Code: Select all

    CMD:/mnt/opt/privateer/usr/bin/CMD_libAirToSat
  • Check libRCremap with CMD support for more infos :)
  • Other example scripts:
    • In case you have 3 active sources (Air/Cable/Sat) and you want to cycle them:
    SpoilerShow
    You need to have already installed both:
    • libLogChannel in /mnt/opt/privateer/usr/libso
    • samyGOrc in /mnt/opt/privateer/usr/bin with correct execution rights (chmod +x ...)
    Then use that script as RCremap CMD (E/F version script):

    Code: Select all

    #!/bin/sh
    [ $(pidof ${0##*/}) ] 2>/dev/null || exit 0
    SODIR=/mnt/opt/privateer/usr/libso
    SAMYGOSODIR=/mnt/opt/privateer/usr/bin
    
    # Detect current antenna mode using libLogChannel
    	$SAMYGOSODIR/samyGOso -A -B -l $SODIR/libLogChannel.so
    	sleep 0.5
    	CUR_ANT=$(grep "TV mode" /dtv/LogChannel.log | sed 's/\(.*\)(\(.*\))/\2/')
    
    # Send the right command depending on detected antenna mode
    	case $CUR_ANT in
    		0)	#TV mode: send KEY_ANTENA with samyGOrc
    		$SAMYGOSODIR/samyGOrc -p $(pidof exeDSP || pidof exeTV) 54
    		;;
    		1)	#Cable mode: launch libAirToSat in CABLE mode
    		$SAMYGOSODIR/samyGOso -A -B -l $SODIR/libAirToSat.so CABLE
    		;;
    		3)	#Sat mode: launch libAirToSat in TV mode
    		$SAMYGOSODIR/samyGOso -A -B -l $SODIR/libAirToSat.so
    		;;
    	esac
    	sleep 1.5				# to prevent consecutive injections
    
    • If you want TV to quickly display antenna name on switching:
    SpoilerShow
    You need to have already installed:
    • libAlert in /mnt/opt/privateer/usr/libso
    • Current libAirToSat v0.2.9 or higher
    Then use one of following scripts as RCremap CMD, according to your TV series
    • E/F version:

    Code: Select all

    #!/bin/sh
    [ $(pidof ${0##*/}) ] 2>/dev/null || exit 0
    SODIR=/mnt/opt/privateer/usr/libso
    SAMYGOSODIR=/mnt/opt/privateer/usr/bin
    
    	$SAMYGOSODIR/samyGOso -A -B -l $SODIR/libAirToSat.so
    	sleep 0.5
    	alert=$(grep antenna /dtv/AirToSat.log | sed 's/\(.*\)\: \(.*\)/\2/')
    	$SAMYGOSODIR/samyGOso -A -B -l $SODIR/libAlert.so "TEXT:$alert"
    	sleep 1
    
    • H version:

    Code: Select all

    #!/bin/sh
    [ -e /tmp/.${0##*/} ] && exit 0 
    echo OK > /tmp/.${0##*/} 
    SODIR=/mnt/opt/privateer/usr/libso
    SAMYGOSODIR=/mnt/opt/privateer/usr/bin
    
    echo "$SAMYGOSODIR/samyGOso -A -B -l $SODIR/libAirToSat.so; sleep 0.5; alert=\$(grep antenna /dtv/AirToSat.log | sed 's/\(.*\)\: \(.*\)/\2/'); $SAMYGOSODIR/samyGOso -A -B -l $SODIR/libAlert.so \"TEXT:\$alert\"" | /dtv/bin/nc localhost 2023
    sleep 2
    rm /tmp/.${0##*/}
*Changelog:

Code: Select all

22/5/2015
v0.2.9 - Logging antenna name in local language
21/5/2015
v0.2.7 - Rewrote whole lib, fix no signal issue on concerned TVs
8/2/2015
v0.2.3 - Fixed: sometimes erased sat channel name when switching to
       - Switches faster ;)
5/2/2015
v0.2.1 - Added 'CABLE' switch
v0.2.0 - First release
You do not have the required permissions to view the files attached to this post.
I do NOT receive any PM. Please use forum.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

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

Post by juusso »

Welcome and thanks! :)

I`m not true D series tester, my tv has built in sat tuner, but it is not used and here is no sat channels at all. Usually i`m on DVB-C 99.9% of the time. Ran this to give you some log:

Code: Select all

root@[TV] /> . /dtv/SGO.env
root@[TV] /> samyGOso -A -B -l /mtd_swu/libAirToSat.so
samyGOso v1.2.4 (c) bugficks 2013, sectroyer 2014
Injecting '/mtd_swu/libAirToSat.so' resident: '0'
Succeeded.
root@[TV] /> cat /dtv/AirToSat.log
[AirToSat] SamyGO D/E/F/H libAirToSat v0.2.0 - (c) zoelechat 2015
[AirToSat] dlsym '_ZN16CChannelListUtil9SetTvModeEi' failed.
[AirToSat] _ZN10CCMUtilAce9SetTvModeEi [0x1809164].
[AirToSat] dlsym '_ZN5TCAPI9GetWindowEN8TCWindow7EWindowE' failed.
[AirToSat] _ZN9TCChannelC2Ev [0xbe8ae8].
[AirToSat] _ZN9TCChannelD2Ev [0xbe5884].
[AirToSat] _ZNK9TCChannel5MajorEv [0xbe77a8].
[AirToSat] _ZN8TCWindowC1Ev [0xba0cfc].
[AirToSat] _ZN8TCWindow6CreateEi [0xba362c].
[AirToSat] _ZN8TCWindow12GetTVChannelEP9TCChanneli [0xba0fa4].
[AirToSat] _ZN8TCWindow40SetChannelWithoutChangingPreviousChannelEPK9TCChannel [0xba2eb4].
[AirToSat] _ZN8TCWindow7DestroyEv [0xba0d40].
[AirToSat] _ZN8TCWindowD1Ev [0xba0d2c].
[AirToSat] _ZN8TCWindow9GetTvModeEPii [0xba0e74].
[AirToSat] dlsym '_ZN13TCWindowProxy12GetTVChannelEP9TCChanneli' failed.
[AirToSat] dlsym '_ZN13TCWindowProxy40SetChannelWithoutChangingPreviousChannelEPK9TCChannel' failed.
[AirToSat] dlsym '_ZN13TCWindowProxy9GetTvModeEPii' failed.
[AirToSat] lib_init, Switched to antenna: 1, channel: 3
[AirToSat] init done...
[AirToSat] >>> lib_deinit
[AirToSat] <<< lib_deinit
root@[TV] />
Sure, TV didn`t switch to any other mode, stayed on DVB-C.. and each time i activate patch, i get channel info bar active :)
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

In current state, patch is not expected to switch from cable to sat, but only air to sat. I assumed that cases of people having both DVB-C and DVB-T are very rare. But it's easy to change it and I could do so if any request. :)

Now patch only looks for:

Code: Select all

#define TV_MODE_AIR 0
#define TV_MODE_SAT 3
So that's normal behavior you have no switching but only "refresh", because you're on TV_MODE_CABLE=1 and patch doesn't check such case at all.
I do NOT receive any PM. Please use forum.
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

Because I want to use the same unique command (defined in RCremap) to switch 'to' and to switch 'back'.
What would be worth is maybe to cycle available modes (at least the ones where channels are available).

Then if ever you'd like to easily switch from AIR to CABLE. There's already an existing key to do so

Code: Select all

KEY_ANTENA = 54
ps: mode 2 = TV crash :) (at least here...)
I do NOT receive any PM. Please use forum.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

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

Post by sectroyer »

zoelechat wrote:Because I want to use the same unique command (defined in RCremap) to switch 'to' and to switch 'back'.
What would be worth is maybe to cycle available modes (at least the ones where channels are available).

Then if ever you'd like to easily switch from AIR to CABLE. There's already an existing key to do so

Code: Select all

KEY_ANTENA = 54
ps: mode 2 = TV crash :) (at least here...)
but juuso is right you could add an option:

Code: Select all

USE_CABLE_INSTEAD_OF_AIR
:)
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 https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

Ok, due to the huge profusion of requests, I'm going to add a CABLE switch ;)
I do NOT receive any PM. Please use forum.
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

Done :)

Code: Select all

samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libAirToSat.so CABLE
@juuso: now should switch to sat on your TV, showing "no signal" if no sat channels
I do NOT receive any PM. Please use forum.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

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

Post by juusso »

oh yes, works like you said. Switching to SAT and back to Cable easily!
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

Cool, still needs testing on F but I'm almost sure it works. I'm going to update RCremap thread from Extras to make it more understandable, then release :)
I do NOT receive any PM. Please use forum.
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

Updated to v0.2.3. Fixed a small but potentially annoying bug :)

Code: Select all

Fixed: sometimes erased sat channel name when switching to
I do NOT receive any PM. Please use forum.

Post Reply

Return to “[F] Software”