"Hack" Wifi RGB Bulb?

Stuck with a problem in your code? Seek help here.

"Hack" Wifi RGB Bulb?

Postby burton666 » July 28th, 2015, 2:06 pm

I just bought a couple of semi-expensive Wifi-RGB-Led bulbs from aliexpress. They work Ok but the big problem is that I have to use a crappy app that is only avalible on chinese. I have been trying to find any way to control them without the app.

I know the IP of the bulb but no ports are open. I have tried using the app and wireshark without success (Probably because I suck at using wireshark)
I have tried using alot of packet capture apps on a rooted phone with the bulb app installed. And have tried looking at the app manifest.xml to understan how to use intents.

Can anyone point me in the right direction or am I over my head in this?
burton666
 
Posts: 4
Joined: July 28th, 2015, 1:59 pm

Re: "Hack" Wifi RGB Bulb?

Postby st2000 » July 29th, 2015, 6:14 am

Are you using wireshark on the computer that you are using to control the bulbs?

Looking at traffic with a separate computer is difficult because most people use network switches and just don't see the traffic that is not intended for the separate computer. That's why most people who do network programming carry around old fashion hubs (they look like switches but are not) and guard them jealously. Alternatively, you can drop some $$$ on a high end managed-switch and then you can do all kinds of routing tricks.

Also, are you sure no one has already done what you want to do? I'd google a bit more.
st2000
 
Posts: 1453
Joined: February 3rd, 2011, 6:10 pm

Re: "Hack" Wifi RGB Bulb?

Postby burton666 » July 30th, 2015, 3:31 am

st2000 wrote:Are you using wireshark on the computer that you are using to control the bulbs?

Looking at traffic with a separate computer is difficult because most people use network switches and just don't see the traffic that is not intended for the separate computer. That's why most people who do network programming carry around old fashion hubs (they look like switches but are not) and guard them jealously. Alternatively, you can drop some $$$ on a high end managed-switch and then you can do all kinds of routing tricks.

Also, are you sure no one has already done what you want to do? I'd google a bit more.


Thanks for the answer, the bulbs are generic and made by vstarcam so support is very limited online.
burton666
 
Posts: 4
Joined: July 28th, 2015, 1:59 pm

Re: "Hack" Wifi RGB Bulb?

Postby st2000 » July 30th, 2015, 6:34 am

Assuming this is a locked-android-wifi to off-the-shelf-router-wifi to light-bulb-wifi then... I would think about...

1) If an unlocked android device would allow logging of the phone's wifi traffic.

2) If a router reprogrammed with an open source distribution like OpenWRT would allow logging of the wifi traffic.

3) Running an Android emulator on your PC that is running the Android application in question while running wireshark on that PC at the same time.

Alternatively, if you had enough wifi-routers, routers and a hub (and they were flexible enough) you might hit upon a connection scheme where you force traffic between the android and bulb through the hub where you can tap in with a computer running wireshark. Note in this scheme the bulb and android would be on 2 different wifi networks. This may be tricky to setup.

Just a side note: Running Wireshark in windows has always been difficult for me. Especially if you are messing with the network devices and connections. The result - windows will start turning off network connections and not tell you. In other words - your network and network devices might be fine at the moment but windows has decided at some point in the past that they were not and has disable the windows network interface. And the window's version of "ping" is misleading. It does not expose the problem of a windows disabled networks. In fact, window's "ping" prints what it is doing but often does not put the corresponding traffic on the network.
st2000
 
Posts: 1453
Joined: February 3rd, 2011, 6:10 pm

Re: "Hack" Wifi RGB Bulb?

Postby jongscx » July 31st, 2015, 1:47 pm

Set port mirroring on your router so that any packets going to the light bulb are forwarded to a port on your PC running wireshark, monitoring just that port.

Also, if you're trying to run wireshark on a windows PC, did you "right click and run as administrator"?
jongscx
 
Posts: 81
Joined: March 9th, 2011, 8:26 pm

Re: "Hack" Wifi RGB Bulb?

Postby burton666 » August 9th, 2015, 6:52 am

Ok I have mede some more attempts and I think I am a litte closer but I still have no clue to what I need to do.

I have torned the light on and off and think I have capture the packets using wireshark.

It looks like this:

Image
When I was trying it out it looked like every time I hit on or off four identical(?) packets where sent, I got one extra packet this time tho.

When looking at the packets I get this:
Image
Image
Image

Image
I don´t really know what to do with the info.


I have been playing around with a software called "Packet Sender" but have not managed to turn the light on or off.

Image
burton666
 
Posts: 4
Joined: July 28th, 2015, 1:59 pm

Re: "Hack" Wifi RGB Bulb?

Postby st2000 » August 10th, 2015, 6:42 am

@burton666, I have not had a chance to plow through all your wireshark images - but thought to respond regardless. Really briefly,I think at the bottom of your 5th image is a MAC broadcast packet. (I think the LSbit of the MSbyte is zero therefore a broadcast??) I would keep looking at the data inside this packet to see if any patterns emerge for different activities like turning on or off the light. Which is, I think, what your 2nd and 3d images are all about. However I only saw 1 pattern - and I don't know what you were doing at the time w/the controller at the time. Keep in mind that the data is probably a protocol w/in its self designed by the light-bulb people. If I did this I would put in a header at the beginning and a checksum at the end at the very least.
st2000
 
Posts: 1453
Joined: February 3rd, 2011, 6:10 pm


Return to Help Me! Software

Who is online

Users browsing this forum: Google [Bot] and 1 guest