Bluetooth connection to Nordic Thingy:52 Sensor

0
I am trying out the first test mentioned in the IoT Mendix video video (https://www.mendix.com/videos/getting-hands-on-with-iot-examples-real-apps-and-demos/) I realised bluetooth connector (BLE) is only supported in lower version of Mendix (8.18.2), is there anything else in the newer version? I could not find any alternative in the mendix marketplace in Mendix Studio Pro 10.0. As a workaround I got the Mendix 8.18.2 and did the above steps. However I am unable to add the MeasurementWrapper (mentioned in 8.45 minutes of the video). I am following the steps exactly as how it is shown in the video however stuck at this point.   It does not allow me to run the project with this error. If I were to continue without adding the measurement wrapper at the nanoflow and continue with the next steps of adding the UUID and running the project, it allows me to connect to the device but there is no result. The final page just shows as connect to device. In the Mendix, error shown is ‘characteristic is not defined’.   Could you please advise the solution in order to get the sensor readings in 8.18.2. My preference is to work with the Nordic thingy sensor in Mendix studio pro 10.0 if possible as future work will be with the new version.    
asked
5 answers
0

MeasurementWrapper is the name of the parameter object passed into the microflow. Check this is being passed into the microflow as a parameter, and if it is being passed, check the spelling.

Good luck!

answered
0

Hi Robert, Thanks for your reply. The MeasurementWrapper is already passed into the nanoflow and it is the same spelling as mentioned.

 

 

 

 

Only at this point it has the error with MeasurementWrapper. Till 8.45 minutes of the video it works well. Kindly advise if there is any issue.

answered
0

You are missing the MeasurementWrapper parameter in your ConnectToDevice Nanoflow. 

Have a look at at 6:45 in the video, in the top left of the Nanoflow there should be a parameter called MeasurementWrapper. This is not present in your Nanoflow and you need to add it.

 

I hope this helps. Good luck!

answered
0

Dear Robert,

I added the parameter you mentioned. I missed it as it was not mentioned in the video. Thanks for higlighiting it to me.

I am now able to add the MeasurementWrapper and also completed the nanoflow with all the other measurements such as humidity, CO2 and temperature (with their respective UUIDs).

I am able to run the project without any issue and connect to the device but the readings does not show properly still. I have provide the screenshots in the following for your further feedback, thank you.

For Device connect:

 

For Pressure:

 

 

Next for temperature:

 

In the same way I have added UUID for humidity and CO2 to the nanoflow.

The UUIDs are stated here for your reference: https://nordicsemiconductor.github.io/Nordic-Thingy52-FW/documentation/firmware_architecture.html

 

 

 

 

Here is the output of the microflow:

 

Bluetooth Data Page in which ConnectToDevice Nanoflow is called

 

And the Home_Web where the ShowBluetoothData microflow is called

 

My current output is as the following:

 

When I click show bluetooth data

 

When I click Connect to device, I am able to pair the device

 

Only shows the Pressure without any readings and does not shows the other readings (Humidity, CO2 and temperature).

This is the error message at the Mendix Studio Pro:

 

 

answered
0

We managed to resolve this issue.

 

There was an issue with the Javascript action code that was automatically created with the bluetooth connector app store module (GetNotifications).

The characteristic variable was not declared

In line 30 instead of  characteristic = c; it should be  var characteristic = c;

Once this was added, the demo worked and the measurements were shown in real time with Nordic Thingy!

image.png

answered