skajake
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2011
12:57 PM
ECP Flaky?
Hey folks,
Is the Roku ECP protocol flaky or am I just doing something wrong? Half the time my commands are never processed by the Roku. This leads to key presses on my remote doing nothing and other times my keyup command is never received the Roku to scroll forever. The keyboard functionality is horrendous, over half the keys are never processed by the roku. I get no indication that the commands were not processed, there are no exceptions being thrown.
My code looks something like this, any thoughts? the message string is obviously altered for the specific command that i am trying to invoke.
Thanks!
Is the Roku ECP protocol flaky or am I just doing something wrong? Half the time my commands are never processed by the Roku. This leads to key presses on my remote doing nothing and other times my keyup command is never received the Roku to scroll forever. The keyboard functionality is horrendous, over half the keys are never processed by the roku. I get no indication that the commands were not processed, there are no exceptions being thrown.
My code looks something like this, any thoughts? the message string is obviously altered for the specific command that i am trying to invoke.
try {
String message = "POST /keydown/" + keyCode + " HTTP/1.1\r\n\r\n";
Socket socket = new Socket(activeIP, 8060);
DataOutputStream dataout = new DataOutputStream(socket.getOutputStream());
dataout.flush();
byte bdata[] = message.getBytes();
dataout.write(bdata, 0, bdata.length);
dataout.flush();
} catch (IOException e) {
Log.e(tag, "Failed to send command", e);
} catch (Exception e) {
Log.e(tag, "Failed to send command", e);
}
Thanks!
1 REPLY 1
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2011
02:35 PM
Re: ECP Flaky?
You are probably shoving in commands too fast. Yes, overflows get dropped silently. Try using /keyPress; put some delay between sending /keydown and /keyup