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
|
|
OP | Post 2 made on Sunday December 1, 2013 at 19:45 |
yonubear Lurking Member |
Joined: Posts: | November 2013 5 |
|
|
|
Post 3 made on Wednesday June 4, 2014 at 11:38 |
I'm getting the same "400 Bad Request" what did you do to fix it?
|
|
Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our
Marketplace. For information on how to advertise your service or product
click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.