Question

I would like to ask, how this wireless socket communicates with android phone?

I am trying to buy a wireless socket, that I could control through my own code. These all wireless socket already has app developed for them. It is possible to get source code or know how to communicate with this wireless socket and control?

Was it helpful?

Solution

As mentioned, use Wireshark (or Shark for Root if you have an Android device that is rooted). That socket looks very similar to one Aldi Australia are selling (under the brand name Bauhn, but it's actually an Orvibo socket, just rebranded). If it is the same, then check out the sample node.js code I've posted over on GitHub (This code actually controls an Orvibo AllOne, but also controls Orvibo S10 / S20 sockets too)

The short of it is:

  • The socket communicates via UDP on port 10000
  • You need to know the MAC address of your socket
  • You send a discovery packet to which the socket replies
  • You then 'subscribe' to the socket in order to control it
  • When you send on / off packets to the socket, it replies in turn with it's current state

EDIT: There's a further breakdown of the protocol here: http://pastebin.com/0w8N7AJD . Credit goes to Nozza87 on the Ninja Blocks Forum

2016 EDIT: The code mentioned is no longer up to date. You can now install node-orvibo, which controls this, the AllOne IR blaster, and can (sort of) do schedules and such. Either install via npm install --save node-orvibo or check out the code here: http://github.com/grayda/node-orvibo

Note that the Orvibo S10 / S20 sockets are sold under a variety of names, including Arlec PC180. See the GitHub page for an (incomplete) list of brand names and places to buy them.

OTHER TIPS

I found a solution to this. You could use wireshark to track packets. But also you could try to user browser's show source ability and look into methods that are being executed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top