[App] libSambilight E/F/H (MST-only)

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.

tasshack
SamyGO Project Donor
Posts: 65
Joined: Thu Aug 23, 2018 5:54 am
Location: Istanbul, TURKEY

Re: [App] libSambilight E/F/H (MST-only)

Post by tasshack »

Subject: [App] libSambilight E/F/H (MST-only)
TorbenMue wrote: Mon Sep 05, 2022 8:41 am
tasshack wrote: Sun Sep 04, 2022 8:43 pm
I don't know is it possible to run this library on non mst device because i don't have one but maybe we will figure it out.
Can you share the /dtv/sambilight.log and /dtv/sambilight.bmp files with an actual photo of the screen after you run that command and also without TEST_FRAMES:1 with a short video.
I tried to change to WLED from your script because i have some projects done with this and i wanted to know if WLED would work. When my ESP controls the LED with WLED everything works. all LEDs shine.

No i plugged my FTDI into the ESP (on RX and GND Pin) and i could control the lights via prismatic from my pc. all LEDs shine.

But when i plug the FTDI into my TV and run this command

Code: Select all

samyGOso -d -T -B -l /mnt/opt/privateer/usr/libso/libSambilight.so H_LEDS:44 V_LEDS:22 BOTTOM_GAP:11 START_OFFSET:75 CLOCKWISE:0 CAPTURE_POS:0 COLOR_ORDER:RGB BAUDRATE:921600 TEST_FRAMES:1 TEST_PATTERN:0 TEST_PROFILE:0 TEST_SAVE_CAPTURE:1
only 50 LEDs shine. They are changing a with different images on screen but it looks a bit off.

Colors and position is not correct but i think its a better to look at this when all LEDs shine and positioning is correct.

Log is attached but i even don't get a .bmp file when running this command.

Maybe its better to write in private message because we dont want to spam this topic?
I found a bug on v1.3.0 with the single shot mode, that's why library is not working properly on your TV right now. You need to download new version from first post and update your TV.

1. Please determine following values using hypercon (link is at the first post), H_LEDS, V_LEDS, BOTTOM_GAP, START_OFFSET, CLOCKWISE

2. Make sure you do not place the init file to /mnt/etc/init.d/ yet.

3. Run commands below with the values you determined with the hypercon

Code: Select all

samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libSambilight.so H_LEDS:xx V_LEDS:xx BOTTOM_GAP:xx START_OFFSET:xx CLOCKWISE:x BAUDRATE:921600 TEST_FRAMES:1 TEST_PATTERN:1 TEST_PROFILE:0 TEST_SAVE_CAPTURE:0
samyGOso -d -T -B -l /mnt/opt/privateer/usr/libso/libSambilight.so H_LEDS:xx V_LEDS:xx BOTTOM_GAP:xx START_OFFSET:xx CLOCKWISE:x BAUDRATE:921600 TEST_FRAMES:1 TEST_PATTERN:0 TEST_PROFILE:0 TEST_SAVE_CAPTURE:1
If your TV reboots or become unresponsive after that means testing feature is not possible on a non-mst device so you can skip to the next step. If your TV is still functioning after you run those commands, there should be a test pattern on screen and sambilight.log and sambilight.bmp files on dtv folder.

4. Update your sambilight.init file with a file editor from telnet/ssh on TV. If you edit the init file on a windows pc, it will not work on TV and library does not auto start.

5. Restart your TV and wait for it to complete boot (About 1 min).

6. If sambilight automatically starts after boot there should be sambilight.log file dtv folder, please send it to me. If sambilight does not start you can call command below to start it and if it still does not start you should see the error on output.

Code: Select all

/mnt/etc/init.d/01_99_Sambilight.init start

TEST_FRAMES:1, TEST_PATTERN:1 or TEST_SAVE_CAPTURE:1 may not be functioning on non-mst devices but the library should work when you run it from init.d.if you observe constant communication on serial converter but leds are wrong color that can be fixed. If your TV crashes, become unresponsive or leds are not changing after you run sambilight from init file that means library is not compatible with non-mst devices and may or may not will be in the future.
TorbenMue
Posts: 6
Joined: Mon Aug 29, 2022 6:41 am

Re: [App] libSambilight E/F/H (MST-only)

Post by TorbenMue »

Thanks for the reply. I struggled a bit with the starting LED but i downloaded hypercon and changed my LED counts.
New version 1.3.1 is giving me a bmp file but it looks not that good. I attached it in the zip file.

There is also the log file from capturing the bmp file.

So both commands you gave me worked. I see a test pattern on tv screen and see the bmp file.

Then i copied the .init file to my tv and restarted. But nothing changed. It wont autostart. I edited all lines with nano editor via telnet. and i also gave permission to all files.

when i try to run this command

Code: Select all

/mnt/etc/init.d/01_99_Sambilight.init start
i get an error that the file does not exist. so i don't have a log file from starting with .init file.

I think i am a step closer but not done yet. Thank you for your help.

EDIT: uploaded a picture with the starting command error
You do not have the required permissions to view the files attached to this post.
tasshack
SamyGO Project Donor
Posts: 65
Joined: Thu Aug 23, 2018 5:54 am
Location: Istanbul, TURKEY

Re: [App] libSambilight E/F/H (MST-only)

Post by tasshack »

TorbenMue wrote: Tue Sep 06, 2022 8:14 am Thanks for the reply. I struggled a bit with the starting LED but i downloaded hypercon and changed my LED counts.
New version 1.3.1 is giving me a bmp file but it looks not that good. I attached it in the zip file.

There is also the log file from capturing the bmp file.

So both commands you gave me worked. I see a test pattern on tv screen and see the bmp file.
Looks like screen capture does not work correctly that's why you are getting only half of the leds are lit. You can try to take capture with libScreenShot E/F/H. This library supposed to be working on non-mst devices and sambilight uses the same method with it on H series to take capture of the screen. If libScreenShot works correctly on your TV than i can fix the sambilight capture too.
TorbenMue wrote: Tue Sep 06, 2022 8:14 am Then i copied the .init file to my tv and restarted. But nothing changed. It wont autostart. I edited all lines with nano editor via telnet. and i also gave permission to all files.

when i try to run this command

Code: Select all

/mnt/etc/init.d/01_99_Sambilight.init start
i get an error that the file does not exist. so i don't have a log file from starting with .init file.

I think i am a step closer but not done yet. Thank you for your help.

EDIT: uploaded a picture with the starting command error
If you are getting file not found when file exists that means your line endings are not correct and linux cannot execute that file. You can try to create a new empty init file on the TV with nano, copy its contents from PC and paste it to editor with right click over telnet.

Library acts differently when it is being run over init.d so maybe capture will work too if you manage to fix the auto start.
TorbenMue
Posts: 6
Joined: Mon Aug 29, 2022 6:41 am

Re: [App] libSambilight E/F/H (MST-only)

Post by TorbenMue »

Yes, the screenshot works great for me with this command.

Code: Select all

samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libScreenShot.so ALT
Should i add the "ALT" key to sambilight capture?


Regarding the init.d file. I also tried the file you provided without a single change. I assume this file should work when nothing was changed by me?

I try to make the init file on tv but i am only having windows pcs right now. but notepad++ should do the work to edit the init content or will this still not work?

EDIT: i created the file and copied all text from the init file but i get some strange line breaks in the file so the code is faulty.
i will delete all comments and check that again later.

EDIT2: the "ALT" key did not really work i only get a black screen. you have an idea how to get the same result as from libscreenshot?

EDIT3: i changed the init file and my tv crashed

Code: Select all

#!/bin/sh
#
# (c) Copyright 1996 - 2022, SamyGO
#
#
. /dtv/SGO.env


# Required Parameters
H_LEDS=39;
V_LEDS=22;
BOTTOM_GAP=11;
START_OFFSET=37;

# Optional Parameters
CLOCKWISE=0;
BLACK_BORDER=1;
TV_REMOTE=0;
BAUDRATE=921600;
CAPTURE_FREQ=30;
CAPTURE_SIZE=5;
FORCE_UPDATE=1;



PID=A
if [ $TV_REMOTE -eq 0 ]
then
	PID=T
fi

START_SAMBILIGHT="samyGOso -$PID -B -r -l 
/mnt/opt/privateer/usr/libso/libSambilight.so H_LEDS:$H_LEDS 
V_LEDS:$V_LEDS BOTTOM_GAP:$BOTTOM_GAP START_OFFSET:$START_OFFSET 
BAUDRATE:$BAUDRATE CLOCKWISE:$CLOCKWISE COLOR_ORDER:$COLOR_ORDER 
CAPTURE_POS:$CAPTURE_POS BLACK_BORDER:$BLACK_BORDER 
CAPTURE_FREQ:$CAPTURE_FREQ TV_REMOTE:$TV_REMOTE EXTERNAL:$EXTERNAL 
CAPTURE_SIZE:$CAPTURE_SIZE OSD_CAPTURE:$OSD_CAPTURE GFX_LIB:$GFX_LIB 
TEST_FRAMES:$TEST_FRAMES TEST_PROFILE:$TEST_PROFILE 
TEST_PATTERN:$TEST_PATTERN TEST_SAVE_CAPTURE:$TEST_SAVE_CAPTURE";


case $1 in 
	start)
	$START_SAMBILIGHT
	;;
	stop)
	;;
	status)
	echo "No status info"
	;;
	*)
	echo "Usage: $0 {start|stop|status}" 1>&2
	exit 0
	;;
esac
EDIT 4: forget 3rd edit

i got the auto start running with:

Code: Select all

#!/bin/sh
#
# (c) Copyright 1996 - 2022, SamyGO
#
#
. /dtv/SGO.env

##############################################################################################################################################

# Required Parameters
H_LEDS=39;
V_LEDS=22;
BOTTOM_GAP=11;
START_OFFSET=37;

# Optional Parameters
CLOCKWISE=0;
BLACK_BORDER=1;
TV_REMOTE=0;
#EXTERNAL=0;
BAUDRATE=921600;
#GFX_LIB=1;
#CAPTURE_FREQ=30;
#CAPTURE_SIZE=5;
#OSD_CAPTURE=1;
#FORCE_UPDATE=0;

# For Testing
#TEST_FRAMES=30;
#TEST_PROFILE=0;
#TEST_PATTERN=0;
#TEST_SAVE_CAPTURE=0;
##############################################################################################################################################



PID=A
if [ $TV_REMOTE -eq 0 ]
then
	PID=T
fi

START_SAMBILIGHT="samyGOso -$PID -B -r -l /mnt/opt/privateer/usr/libso/libSambilight.so H_LEDS:$H_LEDS V_LEDS:$V_LEDS BOTTOM_GAP:$BOTTOM_GAP START_OFFSET:$START_OFFSET BAUDRATE:$BAUDRATE CLOCKWISE:$CLOCKWISE COLOR_ORDER:$COLOR_ORDER CAPTURE_POS:$CAPTURE_POS BLACK_BORDER:$BLACK_BORDER CAPTURE_FREQ:$CAPTURE_FREQ TV_REMOTE:$TV_REMOTE EXTERNAL:$EXTERNAL CAPTURE_SIZE:$CAPTURE_SIZE OSD_CAPTURE:$OSD_CAPTURE GFX_LIB:$GFX_LIB TEST_FRAMES:$TEST_FRAMES TEST_PROFILE:$TEST_PROFILE TEST_PATTERN:$TEST_PATTERN TEST_SAVE_CAPTURE:$TEST_SAVE_CAPTURE";


case $1 in 
	start)
	$START_SAMBILIGHT
	;;
	stop)
	;;
	status)
	echo "No status info"
	;;
	*)
	echo "Usage: $0 {start|stop|status}" 1>&2
	exit 0
	;;
esac
now the only thing is taht only 50% of the leds are lightning. maybe the only thing is connecting the screenshot lib "ALT" key with your sambilight

EDIT5: i also attached the log of the running init with autostart
You do not have the required permissions to view the files attached to this post.
tasshack
SamyGO Project Donor
Posts: 65
Joined: Thu Aug 23, 2018 5:54 am
Location: Istanbul, TURKEY

Re: [App] libSambilight E/F/H (MST-only)

Post by tasshack »

TorbenMue wrote: Tue Sep 06, 2022 6:48 pm now the only thing is taht only 50% of the leds are lightning. maybe the only thing is connecting the screenshot lib "ALT" key with your sambilight
I have checked the libScreenShot source but unfortunately it is not possible to implement ALT method to sambilight because of two reasons. Firstly, ALT method returns jpeg format but sambilight requires bmp format and converting jpeg to bmp not easy without a dedicated image processing library. Secondly, ALT method takes too much time while capturing and that means you cannot get decent frame rate with it.

Without correctly captured image you cannot get correct colors even if all leds are lightning. It looks like a pixel format problem with the current capture method but to fix it i need to decompile and reverse engineer non-mst binaries extracted from your TV. It is very hard and time consuming to do that without having the actual device.

If you send me /mtd_exe/exeAPP and /mtd_exe/exeTV with all the files on /mtd_exe/lib/ folder, i will take a look when i am available.
TorbenMue
Posts: 6
Joined: Mon Aug 29, 2022 6:41 am

Re: [App] libSambilight E/F/H (MST-only)

Post by TorbenMue »

Thank you for this amazing work. I sent you a one drive link to the files due to size restrictions in this forum.
Even if this wont work i am very happy that you put that much effort into this. You are the best!!

If you need anything else let me know.
User avatar
brunogts77
Posts: 768
Joined: Sat Feb 18, 2012 8:34 pm

Re: [App] libSambilight E/F/H (MST-only)

Post by brunogts77 »

Hi, I have the sambilight installed on my H-series TV. It works very well but I notice that the colors on the TV do not match those of the LED strip! Any way to fix this?
You do not have the required permissions to view the files attached to this post.
UE42F5570 T-MST12DEUC_1119] [OTN=OFF] [OSCAM=ON]
UE55JU6870 T-HKMDEUC-1480 [OSCAM=ON]
User avatar
brunogts77
Posts: 768
Joined: Sat Feb 18, 2012 8:34 pm

Re: [App] libSambilight E/F/H (MST-only)

Post by brunogts77 »

Any help???
UE42F5570 T-MST12DEUC_1119] [OTN=OFF] [OSCAM=ON]
UE55JU6870 T-HKMDEUC-1480 [OSCAM=ON]
User avatar
brunogts77
Posts: 768
Joined: Sat Feb 18, 2012 8:34 pm

Re: [App] libSambilight E/F/H (MST-only)

Post by brunogts77 »

Hello, is it possíble to use a Raspberry Pico W to Control the LED's?
UE42F5570 T-MST12DEUC_1119] [OTN=OFF] [OSCAM=ON]
UE55JU6870 T-HKMDEUC-1480 [OSCAM=ON]
User avatar
brunogts77
Posts: 768
Joined: Sat Feb 18, 2012 8:34 pm

Re: [App] libSambilight E/F/H (MST-only)

Post by brunogts77 »

Hello guys. I have an H series TV and I have been having problems with sambilight. The TV is always freezing. Someone with the same problem? Below I have attached the sambilight log.
You do not have the required permissions to view the files attached to this post.
UE42F5570 T-MST12DEUC_1119] [OTN=OFF] [OSCAM=ON]
UE55JU6870 T-HKMDEUC-1480 [OSCAM=ON]

Post Reply

Return to “[F] Software”