Search code examples
samsung-smart-tvsmart-tv

How to get the IP address of a Samsung Smart TV


I am creating an application for a Samsung Smart TV. In my app, I need to get the Smart TV's IP address. Does anyone know how to get it?


Solution

  • You need to use the SEF NETWORK to do that, make sure you're include this line in index.html

    <object id='pluginObjectNetwork'    classid='clsid:SAMSUNG-INFOLINK-NETWORK'    style='opacity:0.0; background-color:#000000;width:0px;height:0px;'></object>
    

    Then somewhere in your code you can use function:

    var GetIPAddress = function(){
        var network = document.getElementById('pluginObjectNetwork');
        return network.GetIP(network.GetActiveType());  
    };
    

    More information can be read at samsung docs: http://samsungdforum.com/Guide/ref00014/sef_plugin_network.html