msoon / PyMonsoon

Monsoon Power Monitor Python Library
MIT License
55 stars 23 forks source link

Getting it to work on Modern Linux (with firmware upgrade) #38

Open andrewferguson opened 1 year ago

andrewferguson commented 1 year ago

I wanted to leave a brief note here, to save others the trouble of searching for things manually (as I had to do).

I needed to use my Monsoon FTA22D after a long period of it sitting in a box. No longer having access to a Windows machine, I tried using Linux with the PyMonsoon library. I therefore also needed to upgrade the firmware to support PyMonsoon.

A couple of notes on what is needed to do this:

  1. PyMonsoon has a bug that prevents writing the firmware in Python 3. Something to do with not converting the bytes correctly when reading the firmware file (see #12 ). So you need to use Python 2, at least for the firmware upgrade.
  2. But there is a bug in libusb1 that prevents it from installing correctly. libusb1 now seems to only support Python 3, and installation errors occur if you try to install it on Python 2. What you need to do is install libusb1==1.9.3 (i.e. version 1.9.3 of libusb1) and that seems to work. Then (and only then) install PyMonsoon. Then things should work!

Oh, and another note - the API uses the lowercase monsoon to describe the package (e.g. import monsoon.LVPM as LVPM but the package is actually with an uppercase 'M', i.e. import Monsoon.LVPM as LVPM).

Hopefully this note will help folks in the same position as me get up and running faster!