Sitemap
Press enter or click to view image in full size
Holger Danske

Understanding the Greenwave Reality Gateway

4 min readOct 9, 2014

--

That magical black box.

I found out quickly that while TCP sells lightbulbs, it looks like they’ve just licensed the connected light bulb tech from Greenwave Reality and slapped their brand on it.

Now, bulbs don’t just work. They need a gateway to convert normal internet stack traffic to the JenNet-IP stack. They use different protocols and different communication technologies (802.11/ethernet vs 802.15.4).

Get Brian’s stories in your inbox

Join Medium for free to get updates from this writer.

The gateway runs a local web server to interpret commands from phones and the browser, which translates those into commands that are sent across the JenNet-IP network (NXP protocol stack for an enhanced 6loWPAN) to the bulbs (or anything else on that network).

In this diagram, the green circles represent the Greenwave Reality gateway. Blue and red represent bulbs. Multiple gateways are permitted on a subnet, and bulbs may act as routers.

What I know About the Gateway

  • It runs Linux! 400 MHz Power PC 40x Platform, 64 MB Memory and 32 MB Flash
  • This has been hacked before! sshd is enabled, and the root password is thinkgreen
  • Cherokee is the webserver. It rewrites a misleading .php file to a CGI file
  • This file, I THINK, uses NXP APIs to ultimately talk to a daemon, 6loWPANd, which kicks off at boot time
Press enter or click to view image in full size
  • There are web commands via GET and POST to list bulbs on the network, toggle bulbs, and set bulb brightnesss (and presumably more, probably to schedule stuff and configure higher level features like scenes etc, but I haven’t figured them out yet since I don’t have an Android or iPhone)
  • This Gateway phones home frequently (to Greenwave reality servers) with a program called holger, who in the Danish culture is known as a guy who is asleep and ready to wake up and protect the Danish people.
  • Holger also knows my GPS coordinates, and can do tons of logging about many things that I will probably find interesting later.

So, it’s a fully capable computer aware of your physical location and with complete access to your local network. It pings home often and has SSH enabled. In other words, this thing could be considered a bit of a trojan horse for your local network!

What I’ve Done

Well, I’ve mostly just poked around. The most interesting thing so far I think, from a user’s perspective, is a shell script I wrote that I scheduled with cron to increase the brightness my bulbs from 1–100 over a 10 minute period as a gentle wake up. It simply makes HTTP requests to the Gateway’s web server.

Since I don’t own an iPhone or Android device, I can’t actually configure the network properly as Greenwave would want me to. When I use their browser interface, it doesn’t let me add bulbs — only manage scenes. So for now, my only way to control these things is via shell scripts. ☺

What I’m Doing Next

I’m probably going to read NXP’s documentation to understand 6loWPANd’s role and what APIs are available. This will help me to write my own application.

I’m also going to try to sniff the 802.15.4 interface so I can attempt to reverse engineer the application layer protocol that Greenwave is using to communicate with these bulbs. I tried attaching to the TUN interface with tcpdump but so far have not had any luck getting anything. I could also try to receive network traffic with a spare XBee radio I have laying around.

Finally, I will probably attempt to analyze what is being sent to / from Greenwave servers. I may want to keep a channel open for potential firmware updates, but maybe not. We’ll see.

--

--