Roku development II: unlock your device!

by Niels Brouwers 12. August 2014 22:46

Ok, so I got the Roku and after playing around with it for a while I decided to see if I could download the Carter Jones Adventures on the little device. I fired up Visual Studio, then did a fresh build and hit publish. The marmalade deployment tool popped up and after configuring the deployment for Roku the package was successfully built.

I then started reading on how to get the zip file to the device (of course I could have done that already...) . To start with, you need a Roku developer account which you can request / configure through the Roku website. Through the same website, you can enable your device for development, which I also did.

Once your device is configured for development, you can telnet to it (for debugging, you can open telnet on port 8085). Also, enabling your Roku for develpoment, opens up a neat little webservice that enables you to download your application to it. I figured I was all set and ready now, so I downloaded the executable to the Roku, that worked fine. Then on the device (on my TV using the Roku remote), I went to 'My Channels' and selected the app I just downloaded.

The result was an endless 'Loading' in the top left bottom of the screen.....huh?

So I tried the 'Hello World' example, same thing....weird! Then I checked the debug information in the telnet, it said this:

------ Running ------
BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.

Current Function:
001: Sub Main()
002:     print "Starting."
003:     ndk = CreateObject("roNDK")
004:     retval = ndk.start("pkg:/app",["--debug"])
005:     print "Returned - " ; retval
006: End Sub
'Dot' Operator attempted with invalid BrightScript Component or interface refere
nce. (runtime error &hec) in ...AAU2vt0i/pkg:/source/main.brs(4)
004:     retval = ndk.start("pkg:/app",["--debug"])
Function main() As Void
   file/line: /tmp/plugin/KBAAAAU2vt0i/pkg:/source/main.brs(4)

Local Variables:
global   &h0020 rotINTERFACE:ifGlobal
m        &h0010 bsc:roAssociativeArray, refcnt=2
ndk      &h0080 Invalid val:invalid
retval   &h0000 <uninitialized> val:Uninitialized
BrightScript Debugger>

------ end ------

The above message is pretty non-descriptive, but as I learned, it means that the Roku device is not yet enabled for development by the Roku team. So, just beware, if your device is not white-listed by Roku for development, you can 't actually use it to deploy / side load your application!

After figuring that out, a quick email exchange with Roku whitelisted my device, and I was ready to go!


Roku development I: unboxing

by Niels Brouwers 8. August 2014 20:40

The great people at MadeWithMarmalade sometimes collaborate with platform vendors who wish to increase the amount of Apps / Developer adoption of their platforms, this results in the so called developer offers. The Carter Jones Adventures was initially released under such an offer (for the BB10 platform).

It is pretty safe to say that without these kinds of incentives, my endeavours in the games/app development would never have been made public like The Carter Jones Adventures is now. I am just the kind of person that needs some external pressure to get things finished and pushed out to the public.

So, now there is a new developer offer and it involves the Roku - a pretty unknown device in the Netherlands but in the US it apparantly is, it is often compared to the Apple TV or Google Chomecast line of products. In short, it is a small device that plugs in your TV through HDMI and makes your TV smart by adding media streaming capabilities (netflix, hulu, etc.)!

I will be porting the Carter Jones Adventures to this little box, using the crossplatform MadeWithMarmalade SDK. To get started, I received my Roku 3 last week.



The connector was flat, so that required a converter but that was quickly solved. Once I hooked it up, I noticed that this device is rather snappy - unlike, for example, the Sony Bravia smart televisions that we use at our office, this device responds instantly to a button press. Setting up for consumer usage is pretty easy and I was quickly adding channels and checking out the features. Impressive little device, so far.


In my next post, I will get a bit more in-depth describing how to set the thing up for development and some issues that I ran into with that.