Skip to main content
EP.4
Associate
April 27, 2023
Question

How do I record all sensors on the STEVAL-STWINBX1?

  • April 27, 2023
  • 4 replies
  • 3920 views

I have a STEVAL-STWINBX1 (released a few weeks ago). It sports a STM32U585AI MCU.

  • The Android app fails to connect to the device.
  • An iPhone app connected but was never able to upgrade its firmware or turn on/off data logging.

I found is repository that claims it is an SDK for my exact device model (STWINBX1), but when I run the recorder suggested here it complains that no device has been detected.

I connected it to my Debian 12 machine via USB-C. The kernel log says:

[945818.718642] usb usb2-port1: attempt power cycle
[945827.214601] usb usb2-port1: unable to enumerate USB device

Or, if I put it in firmware upgrade mode, it says:

[934225.084403] usb 3-8: new full-speed USB device number 44 using xhci_hcd
[934225.306745] usb 3-8: New USB device found, idVendor=0483, idProduct=df11, bcdDevice= 2.00
[934225.306756] usb 3-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[934225.306759] usb 3-8: Product: DFU in FS Mode
[934225.306762] usb 3-8: Manufacturer: STMicroelectronics
[934225.306765] usb 3-8: SerialNumber: 2075337F5752
 

How do I manually verify if the device connected successfully? For example I don't see any new files like /dev/ttyUSB0 or anything.

This topic has been closed for replies.

4 replies

SimonePradolini
ST Technical Moderator
April 27, 2023

Hello @Community member​ ,

STEVAL-STWINBX1 board default firmware is not DATALOG2.

Have you already flashed the right firmware on the board before running the python SDK or the recorder?

You can update the firmware both via USB through STM32CubeProgrammer or via BLE through ST BLE Sensor app, as explained in Quick Start Guide (link).

I shared your feedback with the app developer and we found a bug in iOS version, that will be soon fixed in the next version of the app.

Android version seems working as expected. Can you share with us app version and the phone you are testing?

Once shared with us all the information, we can debug together the issue on your Linux machine.

Best regards

Simone

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
EP.4
EP.4Author
Associate
April 28, 2023

Hi Simone.

Thank you very much for your reply. The quick start guide you linked was very helpful!

I think I figured out why Android had trouble connecting. There was another device in the area, and eventually I noticed that the pairing PIN kept appearing on its screen. It seems that it was interfering with the process somehow.

I was able to connect, and I flashed DATALOG2. I've tried some of the device_config.json files from your repo. The data is successfully getting recorded.

The config file in Utilities/STWIN.box_acquisition_examples/ seems to record 9 separate data files, which seems like the complete set. Where could I find the explanations of the parameters in config file?

Could you also give me some guidance on whether the board would be able to continuously record for 12 hours non-stop (while powered)? I did the math and I think that'll require ~35 GB of data, which my SD card can support. Hopefully the board is OK with large SD cards.

SimonePradolini
ST Technical Moderator
April 28, 2023

Hello,

I suggest you to configure the board via ST BLESensor app, where all the sensors parameters are showed in a easy and human-readable way.

Once the setup is done, you can start the acquisition session directly through the app or simply save the configuration file on the SD card.

Follow the steps provided in the Quick Start Guide.

Have a look also to the User Manual (link), where you can find all the details about the fields available in the JSON config files.

Regarding long-time sessions, I suggest you to enable the automode mode via SD card, so to setup an automatic saving period and avoid losing data.

It is a huge amount of data: file handling on SD card is critical and you should avoid saving too much big files.

It is better to make more consecutive acquisitions rather than a unique big one.

Another tip to reduce data amount. STWIN.box mounts different accelerometers, microphones and environmental sensors: maybe you can let switched on only 1 microphone and 1 accelerometer.

Still refer both to Quick Start Guide and User Manual for the full details.

Best regards

Simone

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
EP.4
EP.4Author
Associate
April 28, 2023

I enabled automode (see attached config) and have tried 3000 ms and 10000 ms recording periods, but I only end up seeing a single folder, and all files are empty.

Only if I repeatedly start and stop the recording every 10-20 seconds do I see proper data recorded.

How much RAM does this device have? I want to calculate the time before it has to write to disk.

All the numbers I see in the data brief are too small (2 MB) to be the real RAM, unless I am wrong.

2 MB at 6 Mbps = 2666 ms. So realistically 2000 ms assuming RAM partially used for other data structures?

EP.4
EP.4Author
Associate
May 31, 2023

So far the longest recording was about 12 hours. I think I stopped it manually.

But I had to disable the microphones, and unfortunately it also requires a 5s idle time between recordings.

SimonePradolini
ST Technical Moderator
May 31, 2023

Hello @Community member​ 

during the last days we were able to replicate your setup using different STWIN.box samples and with all the SD card part number suggested in our user manual.

We received also your detailed support request by mail, with the device_config.json to be tested.

From our side all the acquisitions were successful, also using microphones.

Can you resume which are the remaining issues you are still facing and the missing features you are expecting to be added in FP-SNS-DATALOG2?

We are working on the function pack continuously, so your feedback is really appreciated.

Best regards

Simone

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.