Mount external dvd/bd-rom

Here for general support for F series TVs, request and problem solve area.

sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Mount external dvd/bd-rom

Post by sectroyer »

Ehh first write TUTORIAL for others :) That will also help us understand what EXACTLY did you do :)
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 !!!!
matrixabc
SamyGO Project Donor
Posts: 81
Joined: Wed Jan 29, 2014 11:03 am

Re: Mount external dvd/bd-rom

Post by matrixabc »

This is tutorial How Compilation of modules for F-Series and how mounting cd/dvd/bd.
To the compilation I used the CentOs 5.0 system
You do not have the required permissions to view the files attached to this post.
matrixabc
SamyGO Project Donor
Posts: 81
Joined: Wed Jan 29, 2014 11:03 am

Re: Mount external dvd/bd-rom

Post by matrixabc »

Now i write simple widget in one button and when i click on i want to execute skript.sh but a don't know how to do. I write function in Main.js (clickbutton) but i dont know how i can run skript in function(clickbutton)?
wluczykijwf
Official SamyGO Developer
Posts: 1051
Joined: Sat Sep 21, 2013 5:07 pm
Location: Poland

Re: Mount external dvd/bd-rom

Post by wluczykijwf »

matrixabc wrote:Now i write simple widget in one button and when i click on i want to execute skript.sh but a don't know how to do. I write function in Main.js (clickbutton) but i dont know how i can run skript in function(clickbutton)?
A script sh on widget mode run via local php server.
I think a simpler solution (without to write a widget) will run your script via the RCremap with CMD support.
However, if you continue to insist on the widget then I suggest you see my solution OnlineTV and listCH.
There, run scripts sh.
sorry for my english
UE40F8000 (T-FXPDEUC-1136.0), BD-D5500
wluczykijwf
Official SamyGO Developer
Posts: 1051
Joined: Sat Sep 21, 2013 5:07 pm
Location: Poland

Re: Mount external dvd/bd-rom

Post by wluczykijwf »

A description: How run sh script via php in widget.
The description on request @matrixabc
Procedure on TV
  • 1. Create php script yourScript1.php

    Code: Select all

    <?php
    exec('nohup ./yourScript1.sh >> /dev/null 2>&1 echo $!');
    ?>
    2. Create php script yourScript2.php

    Code: Select all

    <?php
    exec('nohup ./yourScript2.sh >> /dev/null 2>&1 echo $!');
    ?>
    Of course it can be done in a single script with the flow parameters, but it is easier to describe :D
    3. Create directory on TV (root for E/F series): /mnt/phpsysinfo/yourScripts
    4. The files copy to the directory:
    • yourScript1.php
    • yourScript2.php
    • yourScript1.sh
    • yourScript2.sh
    5. Via telnet set permissions for two scripts:
    • Code: Select all

      chmod +x /mnt/phpsysinfo/yourScripts/yourScript1.sh

      Code: Select all

      chmod +x /mnt/phpsysinfo/yourScripts/yourScript2.sh
6. Restart TV.
Procedure on widget (Main.js)
  • 1. Create function
    • Code: Select all

      Main.runPHPScript = function(phpURL) 
      {
      	var req = new XMLHttpRequest();
      	req.open("GET", phpURL, true);
      	req.onreadystatechange = function (aEvt) {
      	  if (req.readyState == 4) {
      	     if(req.status == 200){
      	    	 	return(req.responseText);
      	    	 }
      	  }
      	};
      	req.send(null);
      };
    2.Create funtion
    • Code: Select all

      Main.runScriptSHviaPHP = function(name)
      {
          if (name != null && name != "") {
              var ip = '192.168.0.2';// IP TV, it set manualy or it can get via function GetIP() in Network plugin
              var phpURL = 'http://' + ip + ':1080/phpsysinfo/yourScripts/' + name + '.php';
              Main.runPHPScript(phpURL);
          }
      };
    3. Use function Main.runScriptSHviaPHP in your code e.q.:
    • Code: Select all

      Main.runScriptSHviaPHP("yourScript1");
sorry for my english
UE40F8000 (T-FXPDEUC-1136.0), BD-D5500

Post Reply

Return to “[F] Support”