JS220 firmware upgrade failed

Opening the Joulescope UI 0.10.12 (Manjaro Linux, Intel x86 64) and plugging in a new Joulescope JS220 prompts to upgrade the firmware:

Upgrade firmware?
app: 1.0.3 => 1.0.4
fpga: 1.0.2 => 1.0.3

If I select “Yes” the firmware upgrade process starts, but with errors (see log below):

If I restart the JS220, it recovers (with the previous firmware version) and sampling current and voltage appears to work, but I continually prompted to update the firmware.

*****************************
* Joulescope User Interface *
* UI Version = 0.10.12      *
* Driver Version = 1.0.12   *
*****************************

info = {
  "joulescope": {
    "ui_version": "0.10.12",
    "driver_version": "1.0.12"
  },
  "platform": {
    "name": "linux",
    "python_version": "3.10.8 (main, Oct 13 2022, 21:13:48) [GCC 12.2.0]",
    "platform": "Linux-5.10.151-1-MANJARO-x86_64-with-glibc2.36",
    "processor": "",
    "executable": "/home/reidl/venv/joulescope/bin/python3",
    "frozen": false,
    "paths": {
      "dirs": {
        "app_path": "/root/.joulescope",
        "config": "/root/.joulescope/config",
        "log": "/root/.joulescope/log",
        "firmware": "/root/.joulescope/firmware",
        "themes": "/root/.joulescope/themes",
        "data": "/root/Documents/joulescope",
        "update": "/root/.joulescope/update"
      },
      "files": {
        "config": "/root/.joulescope/config/joulescope_config.json"
      }
    }
  }
}

=====
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
WARNING:2022-11-15 11:19:09,009:js220_usb.c:501:jsdrv:d_ctrl_req(2) returned 8
WARNING:2022-11-15 11:19:09,030:jsdrv.c:273:jsdrv:on_return_code u/js220/000503/s/i/range/mb4b# unsupported type 8
WARNING:2022-11-15 11:19:09,031:jsdrv.c:273:jsdrv:on_return_code u/js220/000503/s/i/range/max# unsupported type 8
WARNING:2022-11-15 11:19:09,031:jsdrv.c:273:jsdrv:on_return_code u/js220/000503/s/stats/scnt# unsupported type 8
WARNING:2022-11-15 11:19:16,583:js220_usb.c:501:jsdrv:d_ctrl_req(2) returned 8
WARNING:2022-11-15 11:19:16,584:backend.c:404:jsdrv:bulk_in error 1
WARNING:2022-11-15 11:19:16,627:jsdrv.c:741:jsdrv:API command u/js220/000503/@/!close invoked on jsdrv thread with timeout.  Forcing timeout=0.
WARNING:2022-11-15 11:19:17,052:js220_usb.c:501:jsdrv:d_ctrl_req(2) returned 8
WARNING:2022-11-15 11:19:17,074:jsdrv.c:273:jsdrv:on_return_code u/&js220/000503/s/i/range/mb4b# unsupported type 8
WARNING:2022-11-15 11:19:17,074:jsdrv.c:273:jsdrv:on_return_code u/&js220/000503/s/i/range/max# unsupported type 8
WARNING:2022-11-15 11:19:17,074:jsdrv.c:273:jsdrv:on_return_code u/&js220/000503/s/stats/scnt# unsupported type 8
WARNING:2022-11-15 11:19:17,280:js220_usb.c:501:jsdrv:d_ctrl_req(2) returned 8
WARNING:2022-11-15 11:19:17,281:backend.c:404:jsdrv:bulk_in error 1
WARNING:2022-11-15 11:19:17,281:backend.c:404:jsdrv:bulk_in error 1
WARNING:2022-11-15 11:19:17,393:jsdrv.c:741:jsdrv:API command u/&js220/000503/@/!close invoked on jsdrv thread with timeout.  Forcing timeout=0.
WARNING:2022-11-15 11:19:17,720:js220_usb.c:501:jsdrv:d_ctrl_req(2) returned 8
WARNING:2022-11-15 11:19:17,741:jsdrv.c:273:jsdrv:on_return_code u/&js220/000503/s/i/range/mb4b# unsupported type 8
WARNING:2022-11-15 11:19:17,742:jsdrv.c:273:jsdrv:on_return_code u/&js220/000503/s/i/range/max# unsupported type 8
WARNING:2022-11-15 11:19:17,742:jsdrv.c:273:jsdrv:on_return_code u/&js220/000503/s/stats/scnt# unsupported type 8
WARNING:2022-11-15 11:19:19,333:js220_usb.c:501:jsdrv:d_ctrl_req(2) returned 8
WARNING:2022-11-15 11:19:19,333:backend.c:404:jsdrv:bulk_in error 1
WARNING:2022-11-15 11:19:19,333:backend.c:404:jsdrv:bulk_in error 1
WARNING:2022-11-15 11:19:19,441:jsdrv.c:741:jsdrv:API command u/&js220/000503/@/!close invoked on jsdrv thread with timeout.  Forcing timeout=0.
WARNING:2022-11-15 11:19:21,496:js220_usb.c:501:jsdrv:d_ctrl_req(2) returned 8
WARNING:2022-11-15 11:19:21,496:backend.c:404:jsdrv:bulk_in error 1
WARNING:2022-11-15 11:19:21,497:backend.c:404:jsdrv:bulk_in error 1
WARNING:2022-11-15 11:19:21,497:backend.c:404:jsdrv:bulk_in error 1
WARNING:2022-11-15 11:19:21,745:jsdrv.c:741:jsdrv:API command u/&js220/000503/@/!close invoked on jsdrv thread with timeout.  Forcing timeout=0.
Exception in thread fw_upgrade:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/reidl/venv/joulescope/lib/python3.10/site-packages/joulescope_ui/firmware_manager.py", line 89, in _upgrade
    return release_program(driver, device.device_path, image, progress=progress_cbk)
  File "/home/reidl/venv/joulescope/lib/python3.10/site-packages/pyjoulescope_driver/program.py", line 232, in release_program
    programmer.segment_program(segment, progress, msg, 0.3, 0.55)
  File "/home/reidl/venv/joulescope/lib/python3.10/site-packages/pyjoulescope_driver/program.py", line 139, in segment_program
    self.publish(target['mem_region'] + '/!write', segment['img'], timeout=10)
  File "/home/reidl/venv/joulescope/lib/python3.10/site-packages/pyjoulescope_driver/program.py", line 154, in publish
    return self._driver.publish(self._path + '/' + topic, value, timeout=timeout)
  File "pyjoulescope_driver\binding.pyx", line 509, in pyjoulescope_driver.binding.Driver.publish
  File "pyjoulescope_driver\binding.pyx", line 407, in pyjoulescope_driver.binding._handle_rc
TimeoutError: jsdrv_publish timed out

I am aware that I’m using a unsupported O/S, should I try on an Ubuntu-based distribution?

Hi @rlindsay and welcome to the Joulescope forum! Thank you for appreciating that you are running from a different system than when we officially support. That said, I am surprised at the “bulk_in error 1” that you are seeing. As far as I know, libusb (which we use) should run on (all?) linux distributions.

Would you mind posting the full log, which I think should be the most recent file in ~/.joulescope/log? This log will also contain the info and debug entries.

Hi, thanks for your prompt response.

I’ve managed to resolve the issue - browsing through other similar threads such as Firmware Update Failed w/ UI version 0.9.2 - #5 by mliberty, I noticed that some people encounter issues when connecting USB via a docking station (as I do). When I plugged the Joulescope into my laptop directly, the “bulk_in error” issues are resolved and the firmware update works. Unless there is value in attaching the log, I think we can consider the issue solved!

1 Like

Hi @rlindsay - Great to hear that you are up and running. Sorry to hear that the dock does not work well, but happy to hear that you found a solution!