pervasive-systems / eSense-Data-Visualiser

A node.js app to visualise and configure eSense sensory streams at real-time
http://www.esense.io/
Apache License 2.0
8 stars 7 forks source link

How can I turn on Motion Unit sampling ? #1

Closed zhangxiann closed 4 years ago

zhangxiann commented 5 years ago

I hava connected to my left eSense earbud. Then I can turn on Microphone sampling and BLE Advertisement RSSI sampling. But I can not turn on Motion Unit sampling. Why is that ?

As shown in the picture. The switch button of "Motion Unit" is not clickable.

image

alessandro-montanari commented 5 years ago

From the picture I can see that the button is saying "Scanning..." which means that the earbud is not connected yet. The Motion Unit button gets enabled only after the connection is successful. Could you check in the console at the bottom of the page if the earbud is connected correctly?

p4vlos commented 5 years ago

Hey! I have a similar issue.

As you can see at the screenshot I can get audio from the mic and visualise it but I couldn't get Accelerometer, Gyroscope, RSSI data.

Can you please advice me on what I should use to make the collecting data process smooth? ( I'm looking into the Android lib now)

P.S you can see that it is saying "Scanning" at the top but apparently it is getting the microphone data. And if I select 10Hz sampling rate, 16g Accel Range, 100deg/s Gyro Range and so on I cannot enable the Motion Unit.

screencapture-localhost-5000-2019-10-13-14_24_42

alessandro-montanari commented 5 years ago

The microphone data and the motion/rssi data come from two different interfaces on the earbud. The microphone data is delivered through the Bluetooth Classic interface for bandwidth reasons, while the motion and rssi data come from the Bluetooth Low Energy (BLE) interface (only on left earbud). In our documentation we recommend to pair the right earbud via BT Classic and use that for the microphone data. This is why I guess you are getting microphones samples even if the button says Scanning... The scanning on the dashboard is for the BLE interface and the left earbud (which is the only one to have the IMU sensor). Please have a look at the documentation if the distinction BT Classic/BLE and left/right earbud is not clear.

There might be two reasons why you are not able to connect to the left earbud. 1) Maybe the ID you are using (eSense-0531) is not correct. Make sure this is the ID of the BLE interface of the left earbud. You can find that ID by doing a scan with any BLE app on iOS or Android. 2) When you first turn on the left earbud it takes a few minutes to start broadcasting the ID publicly. Try to wait a bit before scanning for it.

Another reason might be that by default the broadcasting rate of the earbud is quite low (~1.5s) therefore the BT stack on the Mac might take time to discover the device. The only way is to try several times and once you are connected, update the Adv Interval in the top right corner, put something like min=100ms and max=100ms. This will increase the broadcasting rate and should make the discovery faster.