Skip to content

Device pairing

Alberto Geniola edited this page Nov 24, 2018 · 5 revisions

Pairing

The pairing phase is performed via the Meross application. Its objectives are:

  • Configure the Wifi credentials on the switch
  • Configure the remote MQTT server that the switch whould connect to
  • Associate the switch to the user's Meross account

Scanning

Once we put the MSS310 into pairing mode (by simply pressing and holding the front button for 10 seconds), the switch will create an AccessPoint named MEROSS_SW_XXXX. The application will therefore scan all the nearby Wifi networks, and will connect to the first MEROSS_SW_XXXX network.

It appears that the MS310 runs a DHCP server on the network 10.10.10.0/24 binding on 10.10.10.1 and pooling addresses from 10.10.10.100 and upwards to every client. Once our application connects to the AP, it will probably be given the 10.10.10.100 address.

Configuration phase

The next step that the App Performs is to gather details about the Meross device. Such data exchange is performed via HTTP POST messages. All the local communication between the Meross Application and the Meross switch appears to rely to the same data-packets that are exchanged over the MQTT protocol, that is described in section ####. However, it seems that the device does not perform any signature validation check, nor it cares about the messageId/from header parameters of the request. All it takes into account are the namespace, the method and the payload attributes of the request. The rest of the parameters must be present into the message, but can be blank.

For instance, the following POST message will work and return all the information of the device.

POST /config HTTP/1.1
Host: 10.10.10.1
Content-Type: application/json
Connection: close
Accept-Encoding: gzip
User-Agent: okhttp/3.6.0

{"header":{"from":"","messageId":"","method":"GET","namespace":"Appliance.System.All","payloadVersion":0,"sign":"","timestamp":0},"payload":{}}`
Clone this wiki locally