Sensors stop advertising

Hi there,

we have a problem with some of our sensors (MetaMotionR), in that we
sometimes are unable to reconnect to them after a connection loss.

To explain in more detail:
We connect to the sensor using the Android API and activate various
modules on the board (LED, Haptic, Sensor Fusion) to stream them
continuously.

Sometimes we unexpectedly lose connection (e.g. when moving too far
away), but are then no longer able to reconnect.
The sensor keeps its internal configuration (LED still on, presumably it
is also still sampling data), but it does not start advertising again,
so we cannot connect. We then have to wait until the battery runs out,
and after charging we can use the sensor again.
This is not a problem that happens every time we lose connection, only
sporadically.

We tried using a disconnect handler on board to deactivate sampling on
connection loss, but this does not solve the problem that the board no
longer advertises.

We were hoping to solve the problem using a soft reset, so our questions
are:
1. Is it possible to reset the board on connection loss using a
registered disconnect handler? We were unable to use the
mbl_mw_debug_reset command when recording a disconnect event.

  1. Is it possible to reset the board when pressing the button for a
    longer time (10s)?

Of course we are also open to other suggestions on how we could solve
our problem.

Thank you very much!
Best regards,
Marcus

Comments

  • edited June 28
    1. I don't see why it wouldn't work; post your code. I'm also a bit confused about this point. You said you used the Android API but you are referencing C++ functions.
    2. No. You could do something like press the button X times to reset.

    Confirm that the sensor has indeed stopped advertising by scanning with another device. If it is in fact not advertising, try pushing the button to force an advertisement command.

Sign In or Register to comment.