Your Universal Remote Control Center
RemoteCentral.com
RS-232 & IP Control Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 1 made on Thursday November 28, 2013 at 22:04
yonubear
Lurking Member
Joined:
Posts:
November 2013
5
Hi,

All I am attempting to control my sony bluray player with Lua socket however I have a little issue and I am hoping someone here can help me out the get command I am sending is the same one used in the sony ip thread found in this section.

here is the code I am using

local socket = require("socket")
client = socket.connect("192.168.1.115", 50002)
client:send("GET /register?Name=MyDeviceName®istrationType=initial&deviceId=MediaRemote%3A00-1C-25-89-D8-F2 HTTP/1.1\r\nHost: 192.168.1.115:50002\r\nUser-Agent: MediaRemote/3.0.1 CFNetwork/548.0.4 Darwin/11.0.0\r\nX-CERS-DEVICE-INFO: iPhone OS5.0.1/3.0.1/iPhone3,3\r\nConnection: close\r\n\r\n")
while true do
  s, status, partial = client:receive(2048)
  --print(s.. " s")
  print (status.. " status")
  print (partial.. " part")
  if status == "closed" then 
    break 
  end
end
client:close()


Here is what I get in response

HTTP/1.1 400 Bad Request
Connection: close
Date: Fri, 29 Nov 2013 03:00:25 GMT
Server: Linux/2.6 Sony-BDV/2.0


Thanks,
Yonu


Hosting Services by ipHouse