sanevys sanevys - 5 months ago 41
Android Question

Wifi socket communication with android phone

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?


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: . 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:

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.