Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mjrtoo
Binge Watcher

External Control changes?

I developed a program for a third party control system to query the Roku 3, parse the channel data, etc. Everything has been working great for at least a year, until the other day. Now when I use the command.

GET /query/apps no longer replies with the app list, it gives me a 400 error. Has something changed with the external control protocol since the last firmware update on the device itself? Is there something I can check on the Roku 3 that maybe has blacklisted my controller for some reason?

I use my windows phone app and things seem to work fine, and the control I dev'd worked fine until a couple days ago and that programming hasn't changed.
0 Kudos
14 REPLIES 14
RokuMarkn
Visitor

Re: External Control changes?

This still works for me on 6.2. Do you get an error from this command?

curl http://192.168.1.xxx:8060/query/apps


--Mark
0 Kudos
mjrtoo
Binge Watcher

Re: External Control changes?

No, I get the same error.

HTTP/1.1 400 Bad Request

I send

"curl http://192.168.1.233:8060/query/apps HTTP/1.1\r\n"

I receive

"HTTP/1.1 400 Bad Request"
"Server: Roku UpnP/1.0 MiniUPnPd/1.4
"Content-Length: 0"
0 Kudos
RokuMarkn
Visitor

Re: External Control changes?

I'm not sure why you added the "HTTP/1.1" etc after the command. The command I quoted ("curl" followed by one URL parameter) is the complete curl command. Nevertheless, something's not right. What model are you using and what firmware version is it running?

--Mark
0 Kudos
mjrtoo
Binge Watcher

Re: External Control changes?

Yes, I tried it without the HTTP as well and I get the same results.

I'm running a 4200X - Roku 3 with software v6.2 build 3332.

I'm opening a client to the IP address port 8060, if that's not correct please let me know.
0 Kudos
RokuMarkn
Visitor

Re: External Control changes?

Strange, that's the same model and firmware I tested. Can you PM your serial number to me?

--Mark
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: External Control changes?

"mjrtoo" wrote:
Yes, I tried it without the HTTP as well and I get the same results.

I'm running a 4200X - Roku 3 with software v6.2 build 3332.

I'm opening a client to the IP address port 8060, if that's not correct please let me know.


Did you try the command exactly as shown by Mark? I.e. no "HTTP/1.1\r\n" at the end...that is not part of a curl command.

The problem is probably that the HTTP parser is requiring CR-LF line endings now. It was not intentional to affect any clients.

If you use curl or any standard HTTP tool or library, it should do that correctly, but if you have custom code you may need to modify it so it outputs a CR-LF after each line and an empty line after the last line.
0 Kudos
mjrtoo
Binge Watcher

Re: External Control changes?

"RokuKC" wrote:
"mjrtoo" wrote:
Yes, I tried it without the HTTP as well and I get the same results.

I'm running a 4200X - Roku 3 with software v6.2 build 3332.

I'm opening a client to the IP address port 8060, if that's not correct please let me know.


Did you try the command exactly as shown by Mark? I.e. no "HTTP/1.1\r\n" at the end...that is not part of a curl command.

The problem is probably that the HTTP parser is requiring CR-LF line endings now. It was not intentional to affect any clients.

If you use curl or any standard HTTP tool or library, it should do that correctly, but if you have custom code you may need to modify it so it outputs a CR-LF after each line and an empty line after the last line.



Yup, that's there, if you don't terminate it properly you get nothing. I only have one line that looks like this.

curl http://192.168.1.233:8060/query/apps[0d][0a][0a], same 400 error result. I've tried several different combinations of the line terminators and always get the 400 error.
0 Kudos
EnTerr
Roku Guru

Re: External Control changes?

"mjrtoo" wrote:
I'm running a 4200X - Roku 3 with software v6.2 build 3332.

I'm opening a client to the IP address port 8060, if that's not correct please let me know.

Just open that URL in a web browser - click http://192.168.1.233:8060/query/apps - and you should see the listing, it is that simple. If it shows in browser, then there is some quirk in your client. Btw I have an ECP app and if this broke, i'd be having a few complaints in my inbox already... nope, nothing - weather is clear!
0 Kudos
RokuMarkn
Visitor

Re: External Control changes?

The curl command you posted is not valid. The HTTP stuff you typed after the URL is not sent to the unit. That's not how curl works. If you type the command EXACTLY the way I typed it (replacing xxx with your IP address), it should work. Also note that you need TWO CR-LF sequences (four characters) after the GET line, one to terminate the line and one to indicate an empty line. If you still think it's not working correctly, please post the complete shell session that you're using to demonstrate the problem.

--Mark
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.