Corrupted data sent by device

I'm scanning four MetamotionR boards
_ Hardware revision [0.4]
_ Firmware revision [1.5.0]
_ Model number [5]
with the integrated bluetooth of a RaspberryPI 3 model B+. On the raspberry pi was flashed the image received from Mbientlab by email ( The python code is attached, it is the same code in the python SDK example folder on git.

In the image below you can see that the first scan completed successfully, but in the second scan I received an error from two board: "Corrupted data sent by device ...".

Could you help me?

At the moment I'm testing only four boards, but I bought 12 MetamotionR boards for my complete application. I want to be sure that the final system will be reliable.

Thank you,


  • The second test executed after the first explained in the post above

    then, the thirst test. Now I am blocked!
    Nothing is changed between the tests, same code, same hardware and same distance between Metamotion boards and RaspberryPi (less than 1 meter)

    • Does resetting the bt radio help?
    • Do you see the same behavior when using command line to do a ble scan?
    • I used 'hciconfig hci0 reset' command, but it doesn't resolve the issue.
    • When I used 'sudo hcitool -i hci0 lescan --passive' command I have always no issues.

    I tried to apply to the first (A) and second (B) board s new advertise interval. I used the command:

    But now I have a BIG problem. When I start the scanning I can see only the third (C) and the fourth board (D), but I can't see the first two boards (A,B).

    Now, only when I press the button of the first (A) and the second board (B), they become visible.

    Moreover I can't connect to them with the Android App and the python code.
    The Android App replies me "Failed to connect to device. Would you like to try again?

    I tried to do a soft reset as explained here (, but nothing is changed.

    I paid these boards! Now, what I can do?

  • Please reset your system. It seems something is corrupted.

    You can reset your board using the MetaBase App and you can reset your Bluetooth and Pi with some simple system commands (google this).

  • Sorry, but you understand my words?

    • I've already tried the soft reset ((, but nothing. Could you explain me with more details this procedure? I've some doubts about it: I need to press the button for a minimum time? I need to start pressing the button when the power cable is unplugged? I read "This will cause the device to reset for 60 seconds", is the led flashing to notify the success?
    • How I can reset my board with MetaBase App if I've already explained that I cannot connect to the board? (read "The Android App replies me "Failed to connect to device. Would you like to try again?")
    • I've already explained that I used the command "hciconfig hci0 reset" (, to reset the bluetooth adapter.
    • I've already power cycle the RaspberryPi, but the problem I think is on the MMR board. (I explained what I've done).

    Sorry, read carefully my answer and, please, don't say me "google this" only to make me happy because of I've already done it more and more time. I hope you reflect and make me clever questions that can guide us to a solution.

    Thank you.

  • Hey @FraSabba,

    I would have done everything that you did, reset the board, use hci reset, reboot the Pi.

    You are still seeing issues after all this?

  • edited January 2020

    Yes! I still have a blocking problem with two boards.
    The current behavior is that when I press the white button on the board, it become visible. But, then, I can't connect to it! I tried to connect from AndroidApp and two different PCs, but nothing, same issue.

    Before of this problem I applied to these two boards this command:
    The problem could be third parameter of this command? ( What is "MblMwBleAdType"?
    The firmware on the board is 1.5.0 (see the first post).

    However I want to repeat the "soft reset", could you explain me with more details this procedure (see my question above)? I don't want make mistakes.

    I hope we can restore this two boards! (But what about the message "Corrupted data sent by device ..."?)

  • Try to use an iOS device with a fresh MetaBase install to reset the board:

  • edited January 2020

    Ok, I resume the current situation.

    1 - Two MMR boards are blocked in this state: "The board becomes visible to the bluetooth adapter only when I press the button on the board". Moreover, I can't connect to them with Android App and python code.

    2 - I think the problem is due to the execution of this command mbl_mw_settings_set_ad_parameters(500,0,0) with these parameters: interval=500, timeout=0, type=0.

    3 - Now, I need to reset the two board as soon as possible. I've a tight deadline for an important project. So, could you explain me how I can reset correctly the board?

    Thank you, I'm looking forward for your answer.

  • Can you update the firmware on the boards, make sure they are fully charged, and let us know if they work fine with the MetaBase Android app.
    After that is done, you can resume your Python tests and let us know how that goes (I think your Python is corrupting the boards somehow).

  • @FraSabba The APIs expose powerful raw configuration options for the sensors, and in this case you may have unintentionally set a mode that interferes with normal operation.

    If your only goal is to change the advertising interval, I would recommend using mbl_mw_settings_set_ad_interval instead, so that the advertisement type is not impacted. Note that changing ad intervals may make the devices connect very slowly on some platforms -- iOS for example specifies certain recommended values. Also note that it is possible for the linux ble scanner to see radio interference in the ad packet.

    For the devices that you are having issue with, I would again suggest attempting to connect with a mobile device. In the absolute worst case. i.e. the device was set to an unconnectable mode, you may need to wait for the device to power cycle (and clear the improper setting) before you can connect.

Sign In or Register to comment.