Another way to do this if you're running a Windows PC is to set up an ad-hoc network (or "hostednetwork" as they call it now on Windows 8 ), along with ICS (Internet Connection Sharing). Configure your Roku to connect to this network. Now all your Roku traffic will be going through your PC's wireless card, and you can use Wireshark to examine it. As long as your network adapter supports hosted networks this may be the way to go, since you don't need any additional hardware or proxies or APIs. You can capture any traffic going to/from your Roku, not just your own development channel, but other channels as well.
I'm not sure how you'd do this on a Mac or Linux system, but if you have Windows (I've been using it under Windows 8.1), then here are the steps involved:
First, set up the ad-hoc network:
- Start a Windows command prompt (as Administrator!!)
- Type:
netsh wlan show drivers
- Find the entry for your wireless interface and look for something that says "Hosted Network Supported: Yes". If it says "Yes" then this should work, otherwise your wireless adapter does not support hosted networks.
- Type:
netsh wlan set hostednetwork mode=Allow ssid="my-ssid" key="my-password"
where my-ssid is the name of the new network's ssid and my-password is the password
- Type:
netsh wlan start hostednetwork
[Note that each time you restart your computer, or resume from Sleep state, you'll have to reissue the above start hostednetwork command]
Next, set up Internet Connection Sharing:
- Right-click on the wi-fi network icon in the system tray, then select 'Open Network and Sharing Center'
- Click on 'Change Adapter Settings'
- Right-click on the entry for your Wi-Fi adapter (NOT the new ad-hoc network), then click on 'Properties'
- If you successfully started the ad-hoc network you will see a 'Sharing' tab. Click the 'Sharing' tab
- Check the box labelled 'Allow other network users to connect through this computer's Internet connection', then click 'OK'
Next, configure your Roku to connect to the new ad-hoc network:
- Settings>Network>Wireless (Wi-Fi)>Set up new Wi-Fi connection
- Select the ssid you specified above (my-ssid) for the new ad-hoc network, enter the password (my-password), then select Connect
Next, install Wireshark if you haven't already installed it:
- Download from
https://www.wireshark.org/download.html. You can use the Windows Installer 64-bit version if you have a 64-bit PC
- Run the installer selecting all default options, making sure to install WInPcap when asked
Finally, capture and examine your Roku traffic:
- Run Wireshark
- In the 'Capture' pane, select your Wi-Fi interface
- Click the green 'Start' icon to start capturing
- You can use the 'Filter' box to filter the traffic you're interested in, e.g. to capture Http traffic to/from my Roku's ip address, I'd type:
http && ip.addr==192.168.0.8
then click 'Apply'
- When you find an entry you're interested in (e.g. an Http GET command), right-click on it and select 'Follow TCP Stream'. This will bring up a window containing the entire Http dialog with options to display it in various formats, save it, etc.