Acceleration Config Put 400 Bad Request

Issue #104 resolved
Timo Lassila created an issue

Smart Phone: Samsung A40 with Android 10.0 os
Mdslib 1.39
Sw version 1.9.4

Movesense device is connected to phone. Subscribing sensor and sensor info works well. The Problem occurs when trying to set Acceleration, gyroscope or magnetometer config.

Example putting Acceleration GRange config:

String jsonConfig = "{"GRange":2}"



Mds.builder().build(context).put("suunto://" + movesenseSerial + "/Meas/Acc/Config/",
                jsonConfig, new MdsResponseListener() {
                    @Override
                    public void onSuccess(String s) {
                    }

                    @Override
                    public void onError(MdsException e) {
                    }
                });

Everytime response is code 400 Bad request.

Is my config syntax right? or should i update to latest mds version if available.

Comments (1)

  1. Petri Lipponen

    The reason is that the parameter json must include the name of the parameter, as specified in the .yaml-file:

    {
      "config": {
         "GRange":2
       }
    }
    

    Marking as resolved.

  2. Log in to comment