Matchstick Emulator on Raspberry Pi 2

by KevinK6 in Circuits > Raspberry Pi

2119 Views, 7 Favorites, 0 Comments

Matchstick Emulator on Raspberry Pi 2

matchstick-firmware.jpg

I saw many people are asking for a Matchstick emulator for their app development or any other reason.

Especially, the Matchstick team announced that they will delay their device shipping until sometime in August.

Today I would like to show you how to run Matchstick on your Raspberry Pi 2, so that you don't have wait for the dongle shipping delay. :)

Prerequisite

I will assume that you have:

  • Raspberry Pi or Pi2 with Raspbian installed
  • Your Pi is connected to Internet via wired or wireless
  • Prepared an Android phone to run sender app
  • Eclipse + ADT is ready to build sender app code

In the following sections, we will:

  • Install Node.js
  • Install CoffeeScript
  • Install firefox browser
  • Install flingd
  • Install Android camera sharing example on your Android phone

Install Node.js

# curl -sL  https://deb.nodesource.com/setup  | sudo bash -
# sudo apt-get install -y build-essential python-dev python-rpi.gpio nodejs
# apt-get install -y build-essential python-dev python-rpi.gpio nodejs
# nodejs --versionv
0.10.37
# npm --version
1.4.28

Install Coffee-Script

# npm install -g coffee-script
# coffee --version
CoffeeScript version 1.9.1

Install Firefox Browser

# sudo apt-get install iceweasel

Install Flingd

# git clone git://github.com/openflint/flingd-coffee.git
# cd flingd-coffee
# npm install

Specify firefox browser

 # export RECEIVER_CONTAINER=firefox

Run It

You have to start X window system first.

# startx

let's start it up

# export RECEIVER_CONTAINER="firefox"
# cd flingd-coffee/bin
# ./flingd

You will see logs output and it tells you that it began to broadcast mDNS packets for device discovery.

It is waiting for sender app to connect it.

Build and Run Android Camera Sharing Example Code

1. Follow the instruction to download and import the Android sender API to your Eclipse.

https://github.com/openflint/openflint.github.io/w...

2. Clone and Import the sender app project into your Eclipse

# git clone https://github.com/openflint/android-webrtc-demo

Build and run it, and you got it!