2025-02-05 08:16 AM
Hello, I am testing STEVAL-MKSBOX1V1 connected via USB to a Raspberry Pi4. On the SensorTile.Box I have installed the firmware version 3.4.6 or 3.4.7 (tried both these versions), since the last version 3.4.9 has a bug with the application I am running.
The application is the classic "Vibration Monitor" app that is present by default on the SensorTile.Box, with some little modifications (expert mode): instead of sending data over BTLE interface, I have defined to send the output data of this application over the USB port, which is connected with the Raspberry PI4.
After creating my custom application on my Android app, I click on PLAY and the custom firmware is flahed via BT on the SensorTile.Box. On Raspberry Pi Terminal interface the device is recognized from that moment on as "ST Virtual COM Port". All perfectly working, since the red led on the device starts flashing (i presume it means: "sending data") and I am able to read in my Python script the sent data over USB port (the TRUE/FALSE value for detection of anomaly vibrations and the vector of differential vibrations over the three axis).
However a problem arises when I power off my Raspberry:
step 1) the SensorTile.Box powers off too, soon or after a while (depending on the battery level);
step 2) the problem is not that the SensorTile.box powers off too, but that, after I turn on again the Raspberry, the SensorTile.Box starts flashing again with the red led (as it was doing before power off), but the SensorTile.box is no more recognized as Virtual COM Port. Now it is recognized as "STMicroelectronics Mass Storage Device".
This prevents to my script to access again the data sent over the USB port. The only way to recover from this situation is the "PLAY" again the custom application from Android App over the SensorTile.box. In this case, after a new flash, the virtual COM port magically appears again and the script works again.
But in real conditions, I cannot be available to upload again the firmware every time the electrical power goes down or someone shuts down the Raspberry.
Is there any way to program the app in order it can be always detected as Virtual COM Port by the Raspberry?
Thanks,
Francesco