I have most of these hubs and motors and have made a somewhat useable Python library for them. There are some limitations beyond LEGO's software, they're noted in the comments for the hub and device files.
https://github.com/mutesplash/legomario/tree/main/BTLego