Smart tv send command

sigster

Active Member
Licensed User
Longtime User
Hi

Do anyone have Samsung Smart Tv and have try to send
command to the TV from Basic4Android

I use = Developer Tools - Open Software Projects
to send command to my TV and it work well

I can see the XML in Explorer
http://192.168.1.66:7676/smp_7_

Was try to send the XML to the TV but nothing happened
B4X:
    URL = "http://192.168.1.66:7676"

    Dim XML As String

XML = ""
XML = XML & "POST /smp_8_ HTTP/1.1'"
XML = XML & "SOAPACTION: 'urn:samsung.com:service:MainTVAgent2:1#RunBrowser'"
XML = XML & "CONTENT-Type: text/XML; charset='utf-8'"
XML = XML & "HOST: 192.168.1.66:7676"
XML = XML & "Content-Length: 342"
XML = XML & "<?xml version='1.0' encoding='utf-8'?>"
XML = XML & "<s:Envelope s:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>"
XML = XML & "<s:Body>"
XML = XML & "<u:RunBrowser xmlns:u='urn:samsung.com:service:MainTVAgent2:1'>"
XML = XML & "<BrowserURL>mbl.is</BrowserURL>"
XML = XML & "</u:RunBrowser>"
XML = XML & "</s:Body>"
XML = XML & "</s:Envelope>HTTP/1.1 200 OK"
XML = XML.Replace("'", Chr(34))

This is from Device Spy
B4X:
POST /smp_8_ HTTP/1.1
SOAPACTION: "urn:samsung.com:service:MainTVAgent2:1#RunBrowser"
CONTENT-TYPE: text/xml; charset="utf-8"
HOST: 192.168.1.66:7676
Content-Length: 357

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <u:RunBrowser xmlns:u="urn:samsung.com:service:MainTVAgent2:1">
         <BrowserURL>www.basic4android.com</BrowserURL>
      </u:RunBrowser>
   </s:Body>
</s:Envelope>HTTP/1.1 200 OK
Content-Length: 313
Content-Type: text/xml; charset="utf-8"
EXT:
SERVER: UPnP/1.0
Connection: close

<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:RunBrowserResponse xmlns:u="urn:samsung.com:service:MainTVAgent2:1"><Result>OK</Result></u:RunBrowserResponse>
</s:Body>
</s:Envelope>

Regards
Sigster
 
Top