[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.

aimaim
SamyGO Project Donor
Posts: 70
Joined: Wed Jan 02, 2013 10:46 pm

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

Post by aimaim »

I changed it, but the leds are still all white.

I made a really short video of the two boards (not) working. Apparently video files aren't supposed to be attached here, so here's the link:
https://photos.app.goo.gl/QYVKWS677LU1ShXeA
The adapter is happily bliking away, but is the arduino's led supposed to be oncontinuously? Shouldn't there be some indications of "doing something"? :)
Last edited by aimaim on Thu Nov 11, 2021 11:57 am, edited 1 time in total.
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 »

Can you share the Sambilight.log file?
aimaim
SamyGO Project Donor
Posts: 70
Joined: Wed Jan 02, 2013 10:46 pm

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

Post by aimaim »

Sorry I misread. Here is the log:

Code: Select all

[Sambilight] SamyGO E/F/H libSambilight v1.0.6 - (c) tasshack 2019 - 2021
[Sambilight] dlsym '_Z23SdDisplay_CaptureScreenP8SdSize_tPhP23SdDisplay_CaptureInfo_t' failed.
[Sambilight] _Z23SdDisplay_CaptureScreenP8SdSize_tPhP23SdDisplay_CaptureInfo_t12SdMainChip_k [0x421b7d88].
[Sambilight] dlsym '_Z23SdDisplay_CaptureScreenP8SdSize_tPhP24SdVideoCommonFrameData_tP8SdRect_t12SdMainChip_k' failed.
[Sambilight] g_IPanel [0x42ec5e58].
[Sambilight] dlsym 'g_TaskManager' failed.
[Sambilight] g_pTaskManager [0x91f0da0].
[Sambilight] dlsym 'g_TVViewerMgr' failed.
[Sambilight] g_pTVViewerMgr [0x91fb4dc].
[Sambilight] g_TVViewerWStringEng [0x8f524d4].
[Sambilight] dlsym 'g_WarningWStringEng' failed.
[Sambilight] dlsym 'g_pCustomTextResMgr' failed.
[Sambilight] dlsym 'g_CustomTextWStringEng' failed.
[Sambilight] _ZN16CResourceManager10GetWStringEi [0x1812d00].
[Sambilight] _ZN9PCWString7ConvertEPtPKciiPi [0x112bd2c].
[Sambilight] _ZN12CTaskManager14GetApplicationE15DTV_APPLICATION [0x1815380].
[Sambilight] _ZN10CViewerApp16GetViewerManagerEv [0x22efd80].
[Sambilight] dlsym '_ZN10ALMOND030015CDesktopManager11GetInstanceENS_13EDesktopIndexE' failed.
[Sambilight] dlsym '_ZN10ALMOND030015CDesktopManager14GetApplicationEPKcS2_' failed.
[Sambilight] _ZN14CViewerManager15ShowSystemAlertEii [0x233e7a8].
[Sambilight] dlsym '_ZN14CViewerManager15ShowSystemAlertEi' failed.
[Sambilight] dlsym '_ZN14CViewerManager14ShowCustomTextEi' failed.
[Sambilight] _ZN14CViewerManager14ShowCustomTextEib [0x2346474].
[Sambilight] dlsym '_ZN14CViewerManager10ShowRCModeEi' failed.
[Sambilight] dlsym '_ZN14CCustomTextApp13t_OnActivatedEPKci' failed.
[Sambilight] MsOS_PA2KSEG0 [0x42cd758c].
[Sambilight] MsOS_Dcache_Flush [0x42cd73c0].
[Sambilight] MApi_MMAP_GetInfo [0x42b72ddc].
[Sambilight] MApi_XC_W2BYTEMSK [0x42cda984].
[Sambilight] gfx_InitNonGAPlane [0x42b81e38].
[Sambilight] gfx_ReleasePlane [0x42b8beac].
[Sambilight] gfx_CaptureFrame [0x42b91d84].
[Sambilight] gfx_BitBltScale [0x42b8a70c].
[Sambilight] MApi_GOP_DWIN_CaptureOneFrame [0x42bbf3e8].
[Sambilight] MApi_GOP_DWIN_GetWinProperty [0x42bc0048].
[Sambilight] -------------1-------------
[Sambilight] Name: 16:9
[Sambilight] Saturation Gain: 130%
[Sambilight] Value Gain: 90%
[Sambilight] Brightness Correction: -7
[Sambilight] Horizontal Depth: 26%
[Sambilight] Vertical Depth: 15%
[Sambilight] Overlap: 0%
[Sambilight] Horizontal Padding: 0%
[Sambilight] Vertical Padding: 0%
[Sambilight] -------------2-------------
[Sambilight] Name: 21:9
[Sambilight] Saturation Gain: 120%
[Sambilight] Value Gain: 90%
[Sambilight] Brightness Correction: -7
[Sambilight] Horizontal Depth: 15%
[Sambilight] Vertical Depth: 7%
[Sambilight] Overlap: 0%
[Sambilight] Horizontal Padding: 12%
[Sambilight] Vertical Padding: 0%
[Sambilight] -------------3-------------
[Sambilight] Name: 4:3
[Sambilight] Saturation Gain: 100%
[Sambilight] Value Gain: 100%
[Sambilight] Brightness Correction: 0
[Sambilight] Horizontal Depth: 12%
[Sambilight] Vertical Depth: 12%
[Sambilight] Overlap: 0%
[Sambilight] Horizontal Padding: 0%
[Sambilight] Vertical Padding: 12%
[Sambilight] -------------4-------------
[Sambilight] Name: 3:2
[Sambilight] Saturation Gain: 100%
[Sambilight] Value Gain: 100%
[Sambilight] Brightness Correction: 0
[Sambilight] Horizontal Depth: 12%
[Sambilight] Vertical Depth: 12%
[Sambilight] Overlap: 0%
[Sambilight] Horizontal Padding: 0%
[Sambilight] Vertical Padding: 8%
[Sambilight] 4 Profile(s) Loaded From Config
[Sambilight] Sambilight started
[Sambilight] Grabbing started

Also I edited my post above. I added a short video.
Last edited by aimaim on Thu Nov 11, 2021 12:21 pm, edited 3 times in total.
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 »

Problem may be on the arduino side. Is it possible you to test your arduino + ftdi setup on a PC with Prismatik? It is very easy to install and easy to configure.
By the way i wanted to check /dtv/Sambilight.log file for any errors, not the config file. According to the video it seems that USB Serial is working on your TV now.
aimaim
SamyGO Project Donor
Posts: 70
Joined: Wed Jan 02, 2013 10:46 pm

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

Post by aimaim »

I replaced the code-section above with the log, sry.

I'm trying to setup Prismatik.
Last edited by aimaim on Thu Nov 11, 2021 12:35 pm, edited 1 time in total.
aimaim
SamyGO Project Donor
Posts: 70
Joined: Wed Jan 02, 2013 10:46 pm

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

Post by aimaim »

I built a little test setup to try and get Prismatik to work. Since I was not sure if I could use the LEDstream_FastLED.ino I got the Adalight_WS2812.ino from https://github.com/Wifsimster/adalight_ ... WS2812.ino, added clock-pin, changed the led type to AP102 and adjusted the serial rate.
When I plug the usb serial adapter into usb, the leds do flash blue green red as they are supposed to. But then they stay off. The data from Prismatic does not seem to arrive. (COM-port is set correctly, since flashing the arduino does work.)
I'm puzzled.

EDIT:
I just changed the serial rate to 115200 in both Prismatic and the sketch. And it seems to work now. I'll try it with the tv setup now.

EDIT #2:
I flashed back the LEDstream_FastLED.ino with reduced serial rate and put the same rate into 01_99_Sambilight.init.
Unfortunately the leds stay dark.
Last edited by aimaim on Thu Nov 11, 2021 2:28 pm, edited 1 time in total.
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 »

Since you can flash the arduino without any problems, that means is your serial to arduino connection is correct. And if you see the red green blue colors, that means your arduino to led connection is good too. This means there is a problem with the serial connection.
I think 16mhz pro mini couldn't keep up with the high baudrates. You can try same sketch with serialRate 115200 (Don't forget to change on the Prismatik too). If it works, then you can edit the baudrate from the init file and it should work on TV too.
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 »

I found the issue and fixed it. BAUDRATE: Init file argument was missing on the START_SAMBILIGHT command. Because of that TV was still using the 921600 baudrate.
I have updated the files on first post, you can download and update it. You should replace your init file with the new one too and set your parameters.
aimaim
SamyGO Project Donor
Posts: 70
Joined: Wed Jan 02, 2013 10:46 pm

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

Post by aimaim »

tasshack's bugfix resolved my problem.

The baudrate, he had initially suggested (921600) didn't work for my arduino pro mini. I had to decrease it to 115200. Then it still wouldn't work, since the libSambilight.so had a bug, wich caused the tv not to adjust the baudrate to the value from the 01_99_Sambilight.init.
After tasshack found and fixed the bug, it worked, yet the backlight was somewhat sluggish.
That's why we switched the pro mini for an ESP8266. Here are the instructions tasshack gave me:

Code: Select all

Pro micro has a usb port but it does not have a usb to serial converter. It works like a software serial but it is embedded in arduino itself. Therefore you can use it's RX TX pins by changing the Serial to Serial1 in sketch. I have attached an example.

Yesterday i remembered that the esp8266 can swap the pins of serial to another gpios. Therefore you can fix it that is interfering with the onboard usb serial controller. You need to change the jumper on the FTDI to 3.3v and you have to power your ESP8266 from your PSU with 5V pin of the ESP8266. FTDI does not have enough output to power the esp directly from VCC pin.

You can use the following connection from FTDI and LED to ESP8266.

FTDI TX -> ESP8266 GPIO13
FTDI GND -> ESP8266 GND
LED GND -> ESP8266 GND
LED DATA -> ESP8266 GPIO5 (You can change that from sketch)
LED CLK -> ESP8266 GPIO4 (You can change that from sketch)
LED VCC -> ESP8266 5V

I am sending you a new sketch to test on the esp8266 board. I only changed the Serial.begin() line to swap serial pins and set rx buffersize to a high value (I think buffersize/ram is the problem with pro mini and not baudrate).

Serial.setRxBufferSize(4096);
Serial.begin(SerialSpeed);
delay(500);
Serial.swap();
delay(500);
Following these instructions I managed to get the ESP8266 setup, yet the light still looked jerky. Only after setting the baudrate back to the initial 921600, the backlight started behaving the way it is supposed to, as you can see in this short demo:
https://youtu.be/m_5iAqfV2N4

I attached the slightly modified sketch. I changed the ports to 2 (data) and 0 (clock) since my ESP8266 had wires connected there already and added "#define FASTLED_ESP8266_RAW_PIN_ORDER" since I had had trouble with the ESP8266's pinout in an earlier project. LED_TYPE and COLOR_ORDER are also adjusted for my setup.

Thanks for sharing your work and helping me to get it running @tasshack :)
You do not have the required permissions to view the files attached to this post.
Last edited by aimaim on Sun Nov 14, 2021 8:42 am, edited 2 times in total.
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 »

I have updated the post with ESP8266 connection diagram and attached a sketch for it.

Thanks @aimaim to help me find the bugs and get the library working with a ESP8266 board.

Post Reply

Return to “[F] Software”