javascriptnetwork-programmingweboslgsmart-tv

How to get MAC address Of LG-WebOS smart-tv?


I want to get MAC address of my webOS smart-tv pragmatically to send on api request but i can not find how to get . please Help

I used luna service api but it only gives device unique ID

var request = webOS.service.request("luna://com.webos.service.sm", {
    method: "deviceid/getIDs",
    parameters: { 
        "idType": ["LGUDID"]        
    },
    onSuccess: function (inResponse) {
        console.log("Result: " + JSON.stringify(inResponse));
        // To-Do something
    },
    onFailure: function (inError) {
        console.log("Failed to get system ID information");
        console.log("[" + inError.errorCode + "]: " + inError.errorText);
        // To-Do something
        return;
    }
});

I expect the output 74:40:BE:2A:B2:4A type Mac address


Solution

  • The API does not seem to expose the mac address of the interfaces. Note that there are two mac addresses (one for the wired and one for the wireless connection).

    But you may be able to query ARP to get the mac address for the ip address of the tv, if you are on the same network segment.