Joulescope Issues, Raspberry Pi OS 64-Bit

Hello,

Installing Joulescope on Raspberry Pi OS 64-Bit does not work. Target hardware platform is a Raspberry Pi 4 Model B.

Command:
pip3 install joulescope

Error comes up related to wheel building pyjls.

Hi @hownowbrowncow and welcome to the Joulescope forum!

I can say that we have not tested Raspberry Pi OS 64-bit, which is new as of Feb 2022. The Raspberry Pi 4 is arm64, which jls supports, but not sure about Raspberry Pi OS 64-bit.

Can you tell me what version of python it runs:

python3 -VV

That’s two “V”. Pywheels pyjls says it supports Raspberry Pi. If it’s a build issue, perhaps you can install from Pywheels? Looks like you can find instructions. Alternatively, it’s possible that Ubuntu 64-bit on Raspberry Pi 4 works.

Is it possible for you to post the full error while building pyjls on Raspberry Pi OS?

I imaged an SD card with the latest Raspberry Pi OS 64-bit using Raspberry Pi Imager. I popped it into a Raspberry Pi 4 rev B. python3 -VV shows runs python 3.9.2, which should be fine.

I did find that the architecture detection was not working correctly anymore for Raspberry Pi OS. I modified setup.py to properly detect aarch64, and released pyjls 0.4.2.

On Raspberry Pi OS 64-bit, this now works:

sudo pip3 install -U numpy
sudo pip3 install -U pyjls joulescope
joulescope info

If you don’t want to use sudo, you can create a virtual environment. Something like this [untested]:

pip3 install -U virtualenv
virtualenv ~/venv/joulescope
source ~/venv/joulescope/bin/activate
sudo pip3 install -U joulescope
joulescope info

You later need to run source ~/venv/joulescope/bin/activate every time you want to use the virtual environment.

Thanks for the quick fix! I have now been able to install the joulescope package.

I am now having a problem where the Pi won’t detect a connected joulescope.

It is not a problem with the USB ports of the Pi, because I can detect that they are able to communicate with a keyboard or mouse.

It is not a problem with the Joulescope, because I can connect it to a Windows machine and run scripting against it.

Specifically,

joulescope info

returns:

Python: 3.9.2
GCC 10.2.1 20210110
Platform: Linux-5.10.92-v8+0aarch64-with-glibc2.31 (linux)
executable: /home/pi/ICT/venv/bin/python
frozen: False

joulescope version: 0.9.11
Found 0 connected Joulescopes.

And from a Python interpreter:

from joulescope import scan_require_one
joulescope_device = scan_require_one(config='auto')

returns

RuntimeError: no devices found

Are you able to connect your Joulescope with your Raspberry Pi 4 rev B. running Raspberry Pi OS 64bit?

More info…

I can run

lsusb

and get

Bus 001 Device 019: ID 16d0:0e88 MCS Joulescope

When it is plugged into the Pi. This device disappears when I disconnect USB.
Also: When the Joulescope is connected to the Pi, the back Status LED does not light up. When connected to Windows machine, the back status LED does light up.

I suspect that you are having linux permissions issues accessing the device. For Linux machines running udev, like Raspberry Pi OS, you normally add a rule. We provide this rule which works on most machines. Unplug your Joulescope, then do this:

$ wget https://raw.githubusercontent.com/jetperch/pyjoulescope/master/99-joulescope.rules
$ sudo cp 99-joulescope.rules /etc/udev/rules.d/
$ sudo udevadm control --reload-rules

Plug your Joulescope back in, and joulescope info should now find it.

Also, the status light behavior is normal. The JS110 USB status light illuminates when the device enumerates and is configured over USB by the operating system. Windows aggressively enumerates and configures USB devices. Linux and macOS defer the configuration until needed, so the Status LED does not illuminate until you try to access the device through the Joulescope UI or a script.

Excellent - Joulescope now working as expected. Thank you! I see that I should have taken time to read the installation instructions correctly.

https://joulescope.readthedocs.io/en/latest/user/install.html

Thank you again.

1 Like