⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
vishnuatdialog
Offline
Last seen:8 months 4 weeks ago
Joined:2017-07-25 07:44
DA1453 IoT Sensor Dongle RAW data values

Dear Dialog,
This is Vishnu, we purchased IoT Sensor Dongle Module long back in July. Initially, we tried to connect this Senor Dongle to our smartphone by provided IoTsensor app, we are able to see the 3D movement and graphs of raw data. After a while, we thought that we want to read raw data values of each sensor which presents in Sensor Dongle module. For that, we used an external module to read the raw sensors data via a Bluetooth connection. We successfully connected to the external module and able to display some data on our debug window of the external module.

32 byte of data in my debug window shows as: 02 01 06 03 02 a7 2e 0b 09 49 6f 54 2d 44 4b 2d 53 46 4c 06 ff d2 00 00 d4 d9 00 00 00 00 00 00
The problem is how should I make sure that the data which shown above is the data of Sensor Dongle which was connected? One more thing this data is not changing when I move, rotate the sensor dongle module.
In any manuals Is there any specifically defined the raw data values of IoT Sensor Dongle.

The way which I followed is correct or by any other method, I can read the raw sensor data? please mention if any other method exists.

Thank you.
Vishnu

Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
Hi vishnuatdialog,

Hi vishnuatdialog,

I dont quite get the external module that you are describing, but you can connect to a generic BLE application and get the raw values that device sends over bluetooth (you will have to trigger the appropriate commands that the IoT sensor application sends). This is allready explained how to do it in an older post, on point (7).

https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...

Regarding the printing of the values on UART and be able to be aware that the values that are send through the BLE interface are identical to what is printed on the UART side, there is no default functionallity that will allow you to do so, but you can add some code in order to print the values that are send through the BLE, for example you can place some printing instructions in the user_add_sensor_report_acc_gyro_mag() function in order to print the data that are pushed towards the BLE interface. For example by placing the following code (DBG_MSG3("Acc data x:%i, y:%i, z:%i \n\r", sensor_data.accel_xyz.x, sensor_data.accel_xyz.y, sensor_data.accel_xyz.z);) right below the pdrc->val_z = sensor_data.accel_xyz.z; instruction will print the values that are pushed in the BLE report.

Thanks MT_dialog

vishnuatdialog
Offline
Last seen:8 months 4 weeks ago
Joined:2017-07-25 07:44
Dear Dialog,

Dear Dialog,
As you mentioned in point no:7 in my older post, I connected IoT-DK-SFL sensor dongle module to a generic app(nrfconnect). By using control point WR command I wrote 0x01, after that I able to see the live characteristics value changes of all sensors in hexadecimal formats. I attached the pictures here shows in highlighted the log information of accelerometer(acc_hexdecimal_data) and temperature sensor(Temp_hexdecimal_data). If I want to convert these hexadecimal values to raw data ex: 2g for acc, 10 deg for temp.
How should this conversion happen?

My second question is, before connecting IoT-DK-SFL sensor dongle module to the nrfconnect app, nrfconnect shows the nearby advertising devices like in the attached picture(advertising_devices). When I tap on the IoT-DK-SFL it showing the all device information. In that what is mean by RAW and Incomplete list of service UUID, which I was highlighted in the picture(advertisng_devices)?
After taping on RAW it shows me 32 bytes of data which was mentioned in my first comment of this post. I am attaching a picture of this RAW data also, please find it with the picture name "RAW 32-bytes data".

现在来开始这篇文章,我是mentioned is I connected the IoT-DK-SFL module to an external Bluetooth module via a Bluetooth connection in a server-client way. In the debug window of my external Bluetooth module I able to see the name, RSSI value, Bluetooth address and 32-byte RAW data of IoT-DK-SFL sensor dongle module. But I am not able to see services and characteristics UUID and values of our sensors.

The attachment consists of all pictures in zip format.
Thank you.
Vishnu

Attachment:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
Hi vishnuatdialog,

Hi vishnuatdialog,

That depends on the application that you are using on the other end of the connection (the client that connects with the IoT), the values that you get are in hexadecimal little endian format, and also the application applies a header to the value send in order to tag the data that are send from the peripheral to the device (you will be able to find the structure of the data and the values in a notification packet in the UM-B-063 DA14583 IoT Sensor Development Kit). So lets take for example the first data that you get from the acc_hexadecimal_data.png, the first notification is (0x)01-02-03-1F-03-CA-FF-30-40, if you decode that you will get:

  • 01 -> Report ID - What kind of data are in this specific packet, 0x01 indicates that these are accelerometer data (Table 9 on the document previously mentioned)
  • 02 -> Sensor State - Always 0x02
  • 03 -> Sensor Event - Always 0x03
  • 1F-03 -> X axis value - That means that the actual value is 0x031F and the decimal value 799
  • CA-FF -> Y axis value - That means that actual value is 0xFFCA and the actual value is -54
  • 30-40 -> Z axis value - That means that actual value is 0x4030 and the actual value is 16432

Regarding interpreting those data as acceleration, temperature and angular velocity, that depends on the settings that you have on each sensor, the datasheet of the sensor indication the proper conversions in order to get what you need.

Regarding the values that you get on the device, i suppose that the RAW is a functionallity of the application and if you press it will indicate the advertising data of the device without the application parsing the tags of the advertising string, for example the tag 0x02 means that the following data are a list of 16-bit UUID services that the device supports but the there are also additional services not mentioned in this list. Please check the advertising flags in the BLE specification.

我不确定我得到了最后一个问题,我增刊ose that you connect your device to a generic bluetooth client dongle, so you where able to connect to the device but you are not able to see the services and the data, well in order to be able to see the services of a peripheral the client should initiate a discovery procedure in order to "discover" the characteristics of the peripheral device, after the client device knows the available characteristics of the device then it should send a few commands in order for the IoT sensor dongle to start reporting to the client (exactly as you did with the phone with the generic application).

Thanks MT_dialog

Divya Panchal
Offline
Last seen:3 years 1 month ago
Joined:2017-10-31 08:37
Hello Vishnu,

Hello Vishnu,

can you please tell us how to get the log file using nrfconnect app?

If you can provide us a steps we can get the logs.

have you tried to capture sensor fusion data as well or you just capture raw data?

Thanks,
Divya

vishnuatdialog
Offline
Last seen:8 months 4 weeks ago
Joined:2017-07-25 07:44
Hi Divya Panchal,

Hi Divya Panchal,
First, you have to install nRF connect, nRF Logger app on your android mobile.
Now connect your IOT sensor dongle to the nrfconnect app. Then by using control point WR command write 0x01 in nRF connect app, with this you have triggered the sensor dongle for sending the raw data to the nRF connect app. Now go to individual UUID of sensors and it the down arrow for reading raw sensor data. The raw sensor data is in hexadecimal format and it is changing rapidly. After this when disconnecting the dongle from the nRF connect app there you will get a message on the screen for saving the log, click yes. Now the log data saved in the nRF Logger app. That's it there you can see your log information.

No, I haven't tried for capturing the sensor fusion data.

Thank you
D.Vishnu