cancel
Showing results for 
Search instead for 
Did you mean: 

SensorTile.Box no more sending data to Raspberry Pi 4 after RPi reboot

francus76
Associate III

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

 

6 REPLIES 6
Federica Bossi
ST Employee

Hi @francus76 ,

Unfortunately, I do not have a Raspberry Pi board to directly diagnose the problem. However, it appears there may be two distinct issues.

Firstly, the flow sent via the app is saved to the SD card to be read upon the next reboot. It is possible that the SD card is not functioning correctly. Please check the insertion and formatting of the SD card.

Secondly, if the SensorTile powers off when not connected via USB, it is likely that the battery is not charging properly. Please verify the connector and the battery status.

Additionally, if the SensorTile restarts with the USB plugged in and the flow read from the board is incorrect, the board may be starting in mass-storage mode.

By addressing the SD card and battery issues, you should be able to resolve the problem.

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

Thanks, I will investigate about it

Hello Federica,

I have made some investigations and I would like to ask you your opinion on this subject:

- the SD card seems to work correctly. If I ask to save output data on the SD card instead of sending them on the USB port, data are correctly saved on the SD card. Also csv configuration files are correctly saved on the card (for example in the vibration monitoring app), so I don't think the SD card has any problem.

- while working my custom vibration monitoring app sends data on the USB port instead of using the BLE interface. In this configuration a red led blinks on the SensorTile.Box until the RPi is on and stops blinking when the Rpi is shut down. I supposed the SensorTile.box board was going off together with Rpi, but now, checking better, the red blinking stops because the USB port has no more power when the RPi shuts down. The battery however is charged and the SensorTile.Box continues to stay on.

- About the third point "if the SensorTile restarts with the USB plugged in and the flow read from the board is incorrect, the board may be starting in mass-storage mode": how can I check if the flow read from the board is incorrect? If it is incorrect, which could be the causes of this failure?

Thanks,

Francesco

Hi @francus76 ,

in this type of "Stream USB" application the sensortile installs a serial communication with the PC. When the sensortile restarts it does not install the serial communication but installs the mass storage by default. Then the communication is interrupted. The only way to restart it is to reload the app in the sensortile.

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

Hi Federica,

thanks for the reply. It's a bit a problem for my application. I have found indeed there is a limitation on SensorTile.Box: if I choose "Vibration monitor - Compare" prebuilt application, it streams data over BLE, but when I simply click "Edit" on this application (i need to customize some parameters), the "Stream to Bluetooth" is no more available among possible Outputs.

Trying to understand why it is not possible to stream over Bluetooth, I found that, if in the VIBRATION ACCELEROMETER SENSOR settings the  OUTPUT DATA RATE is set to a value higher than 52Hz, it says "Stream to BLE is not available". And i don't understand why, since the prebuilt "Vibration Monitor - Compare" application has for this parameter 6666Hz and correctly streams over Bluetooth.

In order to bypass this limitation, I decided to choose the "Stream to USB" output to customize the application, but now there is the problem that after any reboot I have to manually reupload the application.

Is there any way to enable the "Stream to Bluetooth" at 6666Hz even when customizing the "Vibration Monitor - Compare" application?

Thanks for attention and patience you could accord to this problem.

Francesco

Hi Federica, 

do you know the existence of any script or application that I can run on Linux to upload my "Expert View" application on the SensorTile.Box using the USB cable in the same way it is uploaded through the ST BLE Sensor Classic app?

I saw that any custom application I create in the "Expert View" mode saves a json config file on the phone, so if I could programmatically upload the application via USB, I could solve my problems...

Thanks again for the support,

Francesco