Raspberry pi 3 + Windows IoT + MetaMotionR
Hi,
basically I've written a UWP app wich can stream the sensor data (Gyro, B-field, Accelerometer and sensor fusion) and since it worked very well I wanted to run the app on the raspberry pi 3 with a windows IoT. After the board didn't initialize at all, I tried to run the CS Template of the UWP starter app with one difference: a toggle to switch the LED on and off.
https://github.com/mbientlab/MetaWear-UwpStarter
Again it worked perfectly on my computer (Visual Studio 2017, Windows 10), but the board couldn't initialize when running on the raspberry pi. When running it as a remote device on Visual studio I get always an error at the initialize function (System.InvalidOperationException: 'TaskT_TransitionToFinal_AlreadyCompleted.)
I've already seen some discussions in the forum about a similar issue, but since there wasn't any solution it would be great if someone could help me!
basically I've written a UWP app wich can stream the sensor data (Gyro, B-field, Accelerometer and sensor fusion) and since it worked very well I wanted to run the app on the raspberry pi 3 with a windows IoT. After the board didn't initialize at all, I tried to run the CS Template of the UWP starter app with one difference: a toggle to switch the LED on and off.
https://github.com/mbientlab/MetaWear-UwpStarter
Again it worked perfectly on my computer (Visual Studio 2017, Windows 10), but the board couldn't initialize when running on the raspberry pi. When running it as a remote device on Visual studio I get always an error at the initialize function (System.InvalidOperationException: 'TaskT_TransitionToFinal_AlreadyCompleted.)
I've already seen some discussions in the forum about a similar issue, but since there wasn't any solution it would be great if someone could help me!
This discussion has been closed.
Comments
Thank you for the quick response!
When running the code on the computer I get the status 0 at the initialize
function. While for the managed Array I get 26 characters.
While when running on the raspi3 I get the status 16 first. So basically I
get the Error timeout: "API initialization timed out. Try re-pairing
the MetaWear or moving it closer to the host device". After refreshing and
reconnecting to the sensor I get the status 0. This time the managed Array only
has 23 variables.
Afterwards I get the error as described above.
Still if I don't click on the refresh button and don't try to reconnect to
the board, the managed array finishes at 26 variables:
and I get an error at the mbl_mw_connection_notify_char_changed function
(Attempted to read or write protected memory). The variables of the managed array change every time I deploy the solution.
Computer managed array
212836064 212836056 212836112
212836008 212836088 212836000 212836016 212836032 212836248 212836168 212836176
212836128 212836136 212836216 212836144 212836200 212836224 212836184 212836160
212836192 212836208 212836232 212836240 212836152 212836296 319355944
Status 0
Raspi Managed array:
153146824 153146896 153146784
153146792 153146888 153146800 153146808 153146904 153146816 153146832 153146840
153146848 153146856 153146864 153146872 153146960 153146968 153146912 153146992 153147008
153146976 85193072 96728256
Status 16, then 0
Raspi managed array (without refreshing)
151009488 151009496 151009512
151009560 151009440 151009448 151009632 151009640
151009616 151009624 151009568
151009576 151009688 151009680 151009584 151009648
151009656 151009664 151009672
151009600 151009608 151009592 151009776 151009760
151009784 97776704
managedArray
variable. You have simply given me the addresses (or id?) assigned by the CLR for said variable.1,128 2,128 3,128 4,128 5,128 6,128 7,128 8,128 9,128 10,128 11,128 12,128 13,128 15,128 16,128 17,128 18,128 19,128 20,128 21,128 22,128 23,128 24,128 25,128 254,128 11,132
Afterwards the board initializes when using the computer, whereas I get an error at the mbl_mw_connection_notify_char_changed function (Attempted to read or write protected memory) when using the raspi 3
managedArray
is not necessarily 2 elements and array size should never be assumed unless it is explicitly initialized with a constant size.I can stream the sensor data too, but there is quite a delay when streaming on the raspi 3 (about half a sec). I tried to change the connection parameters and changed the connection interval to 7.5 ms, but the sensor fusion is still very slow. Is there any other way to improve the data streaming?