EnotYoyo / pysphero

Unofficial Sphero V2 api for bluetooth low energy toys
MIT License
40 stars 16 forks source link

Sphero BOLT Magnetometer #21

Open gazialankus opened 4 years ago

gazialankus commented 4 years ago

I can use Sphero BOLT's magnetometer value just fine in Sphero Edu App using getCompassDirection() in the JavaScript code in the app. But I can't find magnetometer sensor reading in this library. All I could do was to run the calibration procedure where the robot turns around itself.

What's the easies way to reverse engineer BOLT to figure out how to get magnetometer readings? I can decompile the app, but the relevant parts are minified with ProGuard, it seems. Should I try to intercept BLE messages? Could you lead me in the right direction to get this to work?

Thank you for this awesome library!

EnotYoyo commented 4 years ago

Should I try to intercept BLE messages?

Yes, that's a good way. I think you should try to use the magnetometer_north_yaw_notify command

MatP-MatP commented 3 years ago

This could help you to get BT log from an Android phone https://medium.com/@charlie.d.anderson/how-to-get-the-bluetooth-host-controller-interface-logs-from-a-modern-android-phone-d23bde00b9fa