Joulescope app can't connect to device on Mac OS Mojave

When I launch the Joulescope app (version 0.4.1) on my Mac running OS 10.14.5, I get a green status light on the Joulescope device, but the status bar of the app states “Could not open device”. I also tried installing the joulescope python package and am getting the following output when I run joulescope_cmd capture (again, along with a green status light):

INFO:joulescope.usb.libusb.device:scan found 
['16d0/0e88/̎000122']
INFO:joulescope.usb.device_thread:open
INFO:joulescope.usb.device_thread:DeviceThread.run start
INFO:joulescope.usb.libusb.device:open: start 16d0/0e88/̎000122
ERROR:joulescope.usb.device_thread:device thread hung: open
INFO:joulescope.usb.device_thread:close
INFO:joulescope.usb.libusb.device:open: success
INFO:joulescope.usb.libusb.device:Configure device
INFO:joulescope.usb.libusb.device:ControlTransferAsync.close 0
INFO:joulescope.usb.device_thread:DeviceThread.run done
INFO:joulescope.driver:stop
Traceback (most recent call last):
  File "/usr/local/bin/joulescope_cmd", line 11, in <module>
    sys.exit(run())
  File "/usr/local/lib/python3.7/site-packages/joulescope/command/runner.py", line 73, in run
    return args.func(args)
  File "/usr/local/lib/python3.7/site-packages/joulescope/command/capture.py", line 43, in on_cmd
    return f()
  File "/usr/local/lib/python3.7/site-packages/joulescope/command/capture.py", line 41, in <lambda>
    contiguous_duration=args.contiguous)
  File "/usr/local/lib/python3.7/site-packages/joulescope/command/capture.py", line 74, in run
    device.open()
  File "/usr/local/lib/python3.7/site-packages/joulescope/driver.py", line 237, in open
    self._usb.open(event_callback_fn)
  File "/usr/local/lib/python3.7/site-packages/joulescope/usb/device_thread.py", line 145, in open
    return self._post_block('open', event_callback_fn)
  File "/usr/local/lib/python3.7/site-packages/joulescope/usb/device_thread.py", line 130, in _post_block
    raise IOError(rv)
OSError

Any ideas? It is entirely possible my local Python environment is screwed up and I can try on a different computer on Monday if that might help.

1 Like

Hi @andrew! Thanks for backing Joulescope, and welcome to the forum! Sorry to hear your Mac is not happy with your Joulescope. I am running 10.14.5 as well on a MacBook Pro 2018, so I know it works if we can figure out the difference between our machines. First, try connecting Joulescope directly to your Mac’s USB port without any USB hub (if you aren’t aleady). Some USB hubs are notorious for not meeting USB specs. Sounds like you have a terminal program already installed on your Mac (such as iTerm). If so, could you try running the following command and post the output:

/Applications/joulescope.app/Contents/MacOS/joulescope_launcher --log DEBUG 

This will run the downloaded application which should include all necessary dependencies, including libusb, and will display full logging information to the console.

I just took a quick look at the code, and I may need a new release to get enough debug information to identify the problem. I will take a closer look tomorrow morning.

Thanks!

I am not using a USB hub. I tried running the launcher from the command line yesterday and didn’t get interesting output; it looks like the --log DEBUG is the flag I was missing to make it more verbose. Here is the output from that:

INFO:joulescope.usb.libusb.device:scan found no devices
INFO:joulescope_ui.main:_device_change add disable
INFO:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current'], ['current'])
INFO:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current', 'voltage'], ['current', 'voltage'])
INFO:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current', 'voltage', 'power'], ['current', 'voltage'])
INFO:joulescope_ui.oscilloscope.oscilloscope:on_scrollbarRegionChange(25.0, 30.0, 1)
INFO:joulescope_ui.main:on_multimeterMenu(True)
INFO:joulescope_ui.main:_developer_cfg_apply
INFO:joulescope_ui.main:device_close None
INFO:joulescope_ui.main:_device_scan
INFO:joulescope.usb.libusb.device:scan found ['16d0/0e88/̎000122']
INFO:joulescope.driver:scan_for_changes 1 devices: 1 added, 0 removed
INFO:joulescope_ui.main:_device_change add Joulescope 16d0/0e88/̎000122
INFO:joulescope_ui.main:current device = disable, True
INFO:joulescope_ui.main:device_scan activate first device Joulescope 16d0/0e88/̎000122
INFO:joulescope_ui.main:device_close disable
INFO:joulescope_ui.main:device_open Joulescope 16d0/0e88/̎000122
INFO:joulescope.usb.device_thread:open
INFO:joulescope.usb.device_thread:DeviceThread.run start
INFO:joulescope.usb.libusb.device:open: start 16d0/0e88/̎000122
ERROR:joulescope.usb.device_thread:device thread hung: open
INFO:joulescope.usb.device_thread:close
INFO:joulescope.usb.libusb.device:open: success
INFO:joulescope.usb.libusb.device:Configure device
INFO:joulescope.usb.libusb.device:ControlTransferAsync.close 0
INFO:joulescope.usb.device_thread:DeviceThread.run done
INFO:joulescope_ui.main:Could not open device
INFO:joulescope_ui.main:_device_recover
INFO:joulescope_ui.main:_device_change remove Joulescope 16d0/0e88/̎000122
INFO:joulescope_ui.main:device_close Joulescope 16d0/0e88/̎000122
INFO:joulescope.driver:stop
INFO:joulescope.usb.libusb.device:open
DEBUG:joulescope.usb.libusb.device:_run_window start
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.joulescope.com:443
DEBUG:urllib3.connectionpool:https://www.joulescope.com:443 "GET /app_download/version.json HTTP/1.1" 200 33

I am happy to try a different version, just let me know.

Hi @andrew! I took another look at your log and the code this morning, and your computer might be taking a long time to open the USB connection to the Joulescope. However, I am not sure, and I don’t know why. I created a new 0.4.2 release for Mac that improves error handling and logging for this case. The stdout console logging now includes more information and timestamps. Could you download 0.4.2 and try it out? Even if it works, could you run and post the output of:

/Applications/joulescope.app/Contents/MacOS/joulescope_launcher --log_level DEBUG

You can find details about what I changed in the UI CHANGELOG, here, here, and here. Thanks!

I am having the same issue on OSX 10.14.4 with both versions of the Joulescope app (0.4.1 and 0.4.2)

$ ioreg -p IOUSB 
+-o Root  <class IORegistryEntry, id 0x100000100, retain 15>
  +-o AppleUSBXHCI Root Hub Simulation@14000000  <class AppleUSBRootHubDevice, id 0x100000311, registered, matched, act$
    +-o Apple Internal Keyboard / Trackpad@14400000  <class AppleUSBDevice, id 0x100002556, registered, matched, active$
    +-o BRCM20702 Hub@14300000  <class AppleUSBDevice, id 0x100002588, registered, matched, active, busy 0 (1 ms), reta$
    | +-o Bluetooth USB Host Controller@14330000  <class AppleUSBDevice, id 0x100002599, registered, matched, active, b$
    +-o Joulescope@14100000  <class AppleUSBDevice, id 0x10000273b, registered, matched, active, busy 0 (9 ms), retain $
$ /Applications/joulescope.app/Contents/MacOS/joulescope_launcher --log_level DEBUG 
INFO:joulescope.usb.libusb.device:scan found no devices
INFO:joulescope_ui.main:_device_change add disable
INFO:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current'], ['current'])
INFO:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current', 'voltage'], ['current', 'voltage'])
INFO:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current', 'voltage', 'power'], ['current', 'voltage'])
INFO:joulescope_ui.oscilloscope.oscilloscope:on_scrollbarRegionChange(25.0, 30.0, 1)
INFO:joulescope_ui.main:on_multimeterMenu(True)
INFO:joulescope_ui.main:_developer_cfg_apply
INFO:joulescope_ui.main:device_close None
INFO:joulescope_ui.main:_device_scan
INFO:joulescope.usb.libusb.device:scan found ['16d0/0e88/̎000204']
INFO:joulescope.driver:scan_for_changes 1 devices: 1 added, 0 removed
INFO:joulescope_ui.main:_device_change add Joulescope 16d0/0e88/̎000204
INFO:joulescope_ui.main:current device = disable, True
INFO:joulescope_ui.main:device_scan activate first device Joulescope 16d0/0e88/̎000204
INFO:joulescope_ui.main:device_close disable
INFO:joulescope_ui.main:device_open Joulescope 16d0/0e88/̎000204
INFO:joulescope.usb.device_thread:open
INFO:joulescope.usb.device_thread:DeviceThread.run start
INFO:joulescope.usb.libusb.device:open: start 16d0/0e88/̎000204
ERROR:joulescope.usb.device_thread:device thread hung: open
INFO:joulescope.usb.device_thread:close
INFO:joulescope.usb.libusb.device:open: success
INFO:joulescope.usb.libusb.device:Configure device
INFO:joulescope.usb.libusb.device:ControlTransferAsync.close 0
INFO:joulescope.usb.device_thread:DeviceThread.run done
INFO:joulescope_ui.main:Could not open device
INFO:joulescope_ui.main:_device_recover
INFO:joulescope_ui.main:_device_change remove Joulescope 16d0/0e88/̎000204
INFO:joulescope_ui.main:device_close Joulescope 16d0/0e88/̎000204
INFO:joulescope.driver:stop
INFO:joulescope.usb.libusb.device:open
DEBUG:joulescope.usb.libusb.device:_run_window start
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.joulescope.com:443
DEBUG:urllib3.connectionpool:https://www.joulescope.com:443 "GET /app_download/version.json HTTP/1.1" 200 33

Hi @zomg! Thanks for backing Joulescope and welcome to the forum! The log file you posted is from 0.4.1. The 0.4.2 log file should have a lot more information for me. Could you try running 0.4.2 in the same way and post the log file?

Here is what ioreg looks like on my machine:

$ ioreg -p IOUSB
+-o Root  <class IORegistryEntry, id 0x100000100, retain 20>
  +-o AppleUSBVHCIBCE Root Hub Simulation@80000000  <class AppleUSBRootHubDevice, id 0x1000003f9, registered, matched, active, busy 0 (0 ms), retain 15>
  | +-o iBridge@80100000  <class AppleUSBDevice, id 0x100000b24, registered, matched, active, busy 0 (2 ms), retain 13>
  | +-o iBridge Display@80600000  <class AppleUSBDevice, id 0x100000b32, registered, matched, active, busy 0 (3 ms), retain 15>
  | +-o iBridge DFR brightness@80700000  <class AppleUSBDevice, id 0x100000b3a, registered, matched, active, busy 0 (1 ms), retain 11>
  | +-o iBridge FaceTime HD Camera (Built-in)@80200000  <class AppleUSBDevice, id 0x100000b4a, registered, matched, active, busy 0 (4 ms), retain 17>
  | +-o iBridge ALS@80300000  <class AppleUSBDevice, id 0x100000b4e, registered, matched, active, busy 0 (2 ms), retain 11>
  | +-o Headset@80400000  <class AppleUSBDevice, id 0x100000b5a, registered, matched, active, busy 0 (7 ms), retain 11>
  | +-o Apple Internal Keyboard / Trackpad@80500000  <class AppleUSBDevice, id 0x100003290, registered, matched, active, busy 0 (4 ms), retain 19>
  +-o AppleUSBXHCI Root Hub Simulation@14000000  <class AppleUSBRootHubDevice, id 0x100000c48, registered, matched, active, busy 0 (2 ms), retain 9>
    +-o Joulescope@14100000  <class AppleUSBDevice, id 0x1000032e6, registered, matched, active, busy 0 (1 ms), retain 9>

On my MacBook with a successful run, I captured:

$ /Applications/joulescope.app/Contents/MacOS/joulescope_launcher --log_level DEBUG
INFO:2019-06-25 08:59:25,831:device.py:883:joulescope.usb.libusb.device:scan found no devices
INFO:2019-06-25 08:59:26,109:main.py:663:joulescope_ui.main:_device_change add disable
INFO:2019-06-25 08:59:26,243:settings_widget.py:48:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current'], ['current'])
INFO:2019-06-25 08:59:26,255:settings_widget.py:48:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current', 'voltage'], ['current', 'voltage'])
INFO:2019-06-25 08:59:26,256:settings_widget.py:48:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current', 'voltage', 'power'], ['current', 'voltage'])
INFO:2019-06-25 08:59:26,257:oscilloscope.py:338:joulescope_ui.oscilloscope.oscilloscope:on_scrollbarRegionChange(25.0, 30.0, 1)
INFO:2019-06-25 08:59:26,258:main.py:422:joulescope_ui.main:on_multimeterMenu(True)
INFO:2019-06-25 08:59:26,262:main.py:622:joulescope_ui.main:_developer_cfg_apply
INFO:2019-06-25 08:59:26,269:main.py:635:joulescope_ui.main:device_close None
INFO:2019-06-25 08:59:26,270:main.py:685:joulescope_ui.main:_device_scan
INFO:2019-06-25 08:59:26,275:device.py:885:joulescope.usb.libusb.device:scan found ['16d0/0e88/000081']
INFO:2019-06-25 08:59:26,276:driver.py:1121:joulescope.driver:scan_for_changes 1 devices: 1 added, 0 removed
INFO:2019-06-25 08:59:26,276:main.py:663:joulescope_ui.main:_device_change add Joulescope 16d0/0e88/000081
INFO:2019-06-25 08:59:26,276:main.py:698:joulescope_ui.main:current device = disable, True
INFO:2019-06-25 08:59:26,276:main.py:700:joulescope_ui.main:device_scan activate first device Joulescope 16d0/0e88/000081
INFO:2019-06-25 08:59:26,276:main.py:635:joulescope_ui.main:device_close disable
INFO:2019-06-25 08:59:26,277:main.py:540:joulescope_ui.main:device_open Joulescope 16d0/0e88/000081
INFO:2019-06-25 08:59:26,277:device_thread.py:160:joulescope.usb.device_thread:open
INFO:2019-06-25 08:59:26,277:device_thread.py:113:joulescope.usb.device_thread:DeviceThread.run start
INFO:2019-06-25 08:59:26,277:device.py:667:joulescope.usb.libusb.device:open: start 16d0/0e88/000081
INFO:2019-06-25 08:59:26,280:device.py:686:joulescope.usb.libusb.device:open: success
INFO:2019-06-25 08:59:26,280:device.py:698:joulescope.usb.libusb.device:open: configure device
DEBUG:2019-06-25 08:59:26,281:device.py:650:joulescope.usb.libusb.device:libusb_set_configuration: success
DEBUG:2019-06-25 08:59:26,282:device.py:650:joulescope.usb.libusb.device:libusb_claim_interface: success
DEBUG:2019-06-25 08:59:26,335:device.py:650:joulescope.usb.libusb.device:libusb_set_interface_alt_setting: success
INFO:2019-06-25 08:59:26,335:device.py:706:joulescope.usb.libusb.device:open: done
DEBUG:2019-06-25 08:59:26,364:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 1032
DEBUG:2019-06-25 08:59:26,365:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.001074 s, length: 1024, 226
INFO:2019-06-25 08:59:26,366:driver.py:243:joulescope.driver:info:
{
  "ctl": {
    "mfg": {
      "country": "USA",
      "location": "MD_00",
      "lot": "201927_00"
    },
    "hw": {
      "rev": "G",
      "sn_mcu": "F10C30219A49D6AA05E1C2851091005F",
      "sn_mfg": "000081"
    },
    "fw": {
      "ver": "1.0.0"
    },
    "fpga": {
      "ver": "0.2.0",
      "prod_id": "0x9314acf2"
    }
  }
}
DEBUG:2019-06-25 08:59:26,396:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 24
DEBUG:2019-06-25 08:59:26,397:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000446 s, length: 16, 16
INFO:2019-06-25 08:59:26,397:driver.py:221:joulescope.driver:serial number = 1fc00312a9946daa501e2c58011900f5
DEBUG:2019-06-25 08:59:26,425:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 40
DEBUG:2019-06-25 08:59:26,427:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000547 s, length: 32, 32
DEBUG:2019-06-25 08:59:26,452:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 1008
DEBUG:2019-06-25 08:59:26,454:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.001167 s, length: 1000, 1000
DEBUG:2019-06-25 08:59:26,454:datafile.py:496:joulescope.datafile:tag read b'SGS' length=40 at 40 of 1000
DEBUG:2019-06-25 08:59:26,455:datafile.py:496:joulescope.datafile:tag read b'HDR' length=40 at 96 of 1000
DEBUG:2019-06-25 08:59:26,455:datafile.py:496:joulescope.datafile:tag read b'AJS' length=744 at 152 of 1000
DEBUG:2019-06-25 08:59:26,455:datafile.py:496:joulescope.datafile:tag read b'SGE' length=64 at 912 of 1000
INFO:2019-06-25 08:59:26,456:span.py:38:joulescope.span:Span([0.0, 30.0], 5e-07, 100)
INFO:2019-06-25 08:59:26,463:main.py:571:joulescope_ui.main:_control_ui_init
INFO:2019-06-25 08:59:26,464:main.py:592:joulescope_ui.main:control ui init i_range 8
INFO:2019-06-25 08:59:26,464:main.py:592:joulescope_ui.main:control ui init v_range 0
INFO:2019-06-25 08:59:26,465:main.py:608:joulescope_ui.main:_device_cfg_apply
INFO:2019-06-25 08:59:26,465:main.py:744:joulescope_ui.main:_param_cbk(source)
INFO:2019-06-25 08:59:26,466:main.py:732:joulescope_ui.main:param_name=source, value=raw, index=1
DEBUG:2019-06-25 08:59:26,480:device.py:360:joulescope.usb.libusb.device:Transfer: copy buffer 24
DEBUG:2019-06-25 08:59:26,481:device.py:478:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000494 s
DEBUG:2019-06-25 08:59:26,512:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:26,513:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000435 s, length: 128, 24
INFO:2019-06-25 08:59:26,514:main.py:732:joulescope_ui.main:param_name=source, value=raw, index=1
DEBUG:2019-06-25 08:59:26,544:device.py:360:joulescope.usb.libusb.device:Transfer: copy buffer 24
DEBUG:2019-06-25 08:59:26,544:device.py:478:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000341 s
DEBUG:2019-06-25 08:59:26,574:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:26,575:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000225 s, length: 128, 24
INFO:2019-06-25 08:59:26,575:main.py:744:joulescope_ui.main:_param_cbk(i_range)
INFO:2019-06-25 08:59:26,575:main.py:732:joulescope_ui.main:param_name=i_range, value=auto, index=0
DEBUG:2019-06-25 08:59:26,600:device.py:360:joulescope.usb.libusb.device:Transfer: copy buffer 24
DEBUG:2019-06-25 08:59:26,601:device.py:478:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000270 s
DEBUG:2019-06-25 08:59:26,601:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:26,602:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000185 s, length: 128, 24
DEBUG:2019-06-25 08:59:26,629:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:26,630:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000401 s, length: 128, 24
INFO:2019-06-25 08:59:26,630:main.py:732:joulescope_ui.main:param_name=i_range, value=auto, index=0
DEBUG:2019-06-25 08:59:26,659:device.py:360:joulescope.usb.libusb.device:Transfer: copy buffer 24
DEBUG:2019-06-25 08:59:26,660:device.py:478:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000520 s
DEBUG:2019-06-25 08:59:26,686:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:26,687:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000374 s, length: 128, 24
INFO:2019-06-25 08:59:26,687:main.py:732:joulescope_ui.main:param_name=v_range, value=15V, index=0
DEBUG:2019-06-25 08:59:26,713:device.py:360:joulescope.usb.libusb.device:Transfer: copy buffer 24
DEBUG:2019-06-25 08:59:26,714:device.py:478:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000370 s
DEBUG:2019-06-25 08:59:26,715:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:26,715:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000266 s, length: 128, 24
DEBUG:2019-06-25 08:59:26,746:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:26,747:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000393 s, length: 128, 24
INFO:2019-06-25 08:59:26,747:main.py:834:joulescope_ui.main:_device_stream(True)
DEBUG:2019-06-25 08:59:26,748:main.py:803:joulescope_ui.main:_device_stream_start
INFO:2019-06-25 08:59:26,748:main.py:834:joulescope_ui.main:_device_stream(True)
INFO:2019-06-25 08:59:26,748:scrollbar.py:181:joulescope_ui.oscilloscope.scrollbar:set_display_mode(realtime)
DEBUG:2019-06-25 08:59:26,774:device.py:360:joulescope.usb.libusb.device:Transfer: copy buffer 24
DEBUG:2019-06-25 08:59:26,774:device.py:478:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000255 s
DEBUG:2019-06-25 08:59:26,800:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 131072
DEBUG:2019-06-25 08:59:26,801:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 131072
DEBUG:2019-06-25 08:59:26,801:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 131072
DEBUG:2019-06-25 08:59:26,801:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 131072
DEBUG:2019-06-25 08:59:26,801:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 131072
DEBUG:2019-06-25 08:59:26,801:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 131072
DEBUG:2019-06-25 08:59:26,801:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 131072
DEBUG:2019-06-25 08:59:26,801:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 131072
INFO:2019-06-25 08:59:26,801:device.py:607:joulescope.usb.libusb.device:EndpointIn(0x82) start transfer size = 131072 bytes
INFO:2019-06-25 08:59:26,802:oscilloscope.py:338:joulescope_ui.oscilloscope.oscilloscope:on_scrollbarRegionChange(25.0, 30.0, 1)
INFO:2019-06-25 08:59:26,803:main.py:397:joulescope_ui.main:_on_x_change(25.0, 30.0, 1)
INFO:2019-06-25 08:59:26,803:driver.py:949:joulescope.driver:resize 1
INFO:2019-06-25 08:59:26,803:span.py:211:joulescope.span:conform_discrete(span=[29.0, 30.0], incr=None, gain=None, pivot=None)
INFO:2019-06-25 08:59:26,803:span.py:211:joulescope.span:conform_discrete(span=[29.0, 30.0], incr=None, gain=None, pivot=None)
INFO:2019-06-25 08:59:26,803:driver.py:983:joulescope.driver:changed=True, length=1, span=[29.0, 30.0], range=1.0, samples_per=1
INFO:2019-06-25 08:59:26,807:span.py:211:joulescope.span:conform_discrete(span=[25.0, 30.0], incr=None, gain=None, pivot=None)
INFO:2019-06-25 08:59:26,808:span.py:211:joulescope.span:conform_discrete(span=[25.0, 30.0], incr=None, gain=None, pivot=None)
INFO:2019-06-25 08:59:26,808:driver.py:983:joulescope.driver:changed=True, length=1, span=[25.0, 30.0], range=5.0, samples_per=1
INFO:2019-06-25 08:59:26,808:main.py:622:joulescope_ui.main:_developer_cfg_apply
INFO:2019-06-25 08:59:26,809:device.py:835:joulescope.usb.libusb.device:open
DEBUG:2019-06-25 08:59:26,809:device.py:809:joulescope.usb.libusb.device:_run_window start
INFO:2019-06-25 08:59:26,816:driver.py:425:joulescope.stream_buffer:Fill missing samples: 0, 126
INFO:2019-06-25 08:59:26,816:driver.py:425:joulescope.stream_buffer:Fill missing samples: 4914, 51786
DEBUG:2019-06-25 08:59:26,836:connectionpool.py:813:urllib3.connectionpool:Starting new HTTPS connection (1): www.joulescope.com:443
DEBUG:2019-06-25 08:59:26,963:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:26,963:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000251 s, length: 128, 24
DEBUG:2019-06-25 08:59:27,016:connectionpool.py:393:urllib3.connectionpool:https://www.joulescope.com:443 "GET /app_download/version.json HTTP/1.1" 200 33
DEBUG:2019-06-25 08:59:27,238:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:27,239:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000334 s, length: 128, 24
DEBUG:2019-06-25 08:59:27,706:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:27,707:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000299 s, length: 128, 24
DEBUG:2019-06-25 08:59:28,190:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:28,191:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000361 s, length: 128, 24
DEBUG:2019-06-25 08:59:28,657:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:28,658:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000321 s, length: 128, 24
INFO:2019-06-25 08:59:29,061:main.py:635:joulescope_ui.main:device_close Joulescope 16d0/0e88/000081
INFO:2019-06-25 08:59:29,061:driver.py:490:joulescope.driver:stop
INFO:2019-06-25 08:59:29,077:device.py:762:joulescope.usb.libusb.device:read_stream_stop 2
INFO:2019-06-25 08:59:29,077:device.py:618:joulescope.usb.libusb.device:EndpointIn(0x82) stop
INFO:2019-06-25 08:59:29,077:device.py:593:joulescope.usb.libusb.device:EndpointIn(0x82) cancel 8
INFO:2019-06-25 08:59:29,081:device.py:565:joulescope.usb.libusb.device:EndpointIn(0x82) stop => idle
DEBUG:2019-06-25 08:59:29,081:device.py:360:joulescope.usb.libusb.device:Transfer: copy buffer 24
DEBUG:2019-06-25 08:59:29,082:device.py:478:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000296 s
DEBUG:2019-06-25 08:59:29,108:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 08:59:29,108:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000233 s, length: 128, 24
INFO:2019-06-25 08:59:29,109:device_thread.py:167:joulescope.usb.device_thread:close
INFO:2019-06-25 08:59:29,136:device.py:422:joulescope.usb.libusb.device:ControlTransferAsync.close 0
INFO:2019-06-25 08:59:29,137:device_thread.py:90:joulescope.usb.device_thread:DeviceThread._cmd_process_all close
INFO:2019-06-25 08:59:29,138:device_thread.py:121:joulescope.usb.device_thread:DeviceThread.run done
INFO:2019-06-25 08:59:29,147:main.py:834:joulescope_ui.main:_device_stream(False)
DEBUG:2019-06-25 08:59:29,148:main.py:824:joulescope_ui.main:_device_stream_stop
INFO:2019-06-25 08:59:29,148:main.py:827:joulescope_ui.main:_device_stream_stop when no device
DEBUG:2019-06-25 08:59:29,155:main.py:795:joulescope_ui.main:_on_stop
INFO:2019-06-25 08:59:29,155:scrollbar.py:181:joulescope_ui.oscilloscope.scrollbar:set_display_mode(normal)
INFO:2019-06-25 08:59:29,187:device.py:841:joulescope.usb.libusb.device:close

Hi @mliberty,

It looks like version 0.4.2 is working for me. Thanks for the quick fix! Since you requested it, here is the log output:

INFO:2019-06-25 23:51:00,909:device.py:883:joulescope.usb.libusb.device:scan found no devices
INFO:2019-06-25 23:51:01,455:main.py:663:joulescope_ui.main:_device_change add disable
INFO:2019-06-25 23:51:01,780:settings_widget.py:48:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current'], ['current'])
INFO:2019-06-25 23:51:01,792:settings_widget.py:48:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current', 'voltage'], ['current', 'voltage'])
INFO:2019-06-25 23:51:01,793:settings_widget.py:48:joulescope_ui.oscilloscope.settings_widget:on_signalsAvailable(['current', 'voltage', 'power'], ['current', 'voltage'])
INFO:2019-06-25 23:51:01,794:oscilloscope.py:338:joulescope_ui.oscilloscope.oscilloscope:on_scrollbarRegionChange(25.0, 30.0, 1)
INFO:2019-06-25 23:51:01,796:main.py:422:joulescope_ui.main:on_multimeterMenu(True)
INFO:2019-06-25 23:51:01,800:main.py:622:joulescope_ui.main:_developer_cfg_apply
INFO:2019-06-25 23:51:01,807:main.py:635:joulescope_ui.main:device_close None
INFO:2019-06-25 23:51:01,808:main.py:685:joulescope_ui.main:_device_scan
INFO:2019-06-25 23:51:06,814:device.py:885:joulescope.usb.libusb.device:scan found ['16d0/0e88/000122']
INFO:2019-06-25 23:51:06,815:driver.py:1121:joulescope.driver:scan_for_changes 1 devices: 1 added, 0 removed
INFO:2019-06-25 23:51:06,815:main.py:663:joulescope_ui.main:_device_change add Joulescope 16d0/0e88/000122
INFO:2019-06-25 23:51:06,815:main.py:698:joulescope_ui.main:current device = disable, True
INFO:2019-06-25 23:51:06,816:main.py:700:joulescope_ui.main:device_scan activate first device Joulescope 16d0/0e88/000122
INFO:2019-06-25 23:51:06,816:main.py:635:joulescope_ui.main:device_close disable
INFO:2019-06-25 23:51:06,816:main.py:540:joulescope_ui.main:device_open Joulescope 16d0/0e88/000122
INFO:2019-06-25 23:51:06,816:device_thread.py:160:joulescope.usb.device_thread:open
INFO:2019-06-25 23:51:06,817:device_thread.py:113:joulescope.usb.device_thread:DeviceThread.run start
INFO:2019-06-25 23:51:06,817:device.py:667:joulescope.usb.libusb.device:open: start 16d0/0e88/000122
INFO:2019-06-25 23:51:11,820:device.py:686:joulescope.usb.libusb.device:open: success
INFO:2019-06-25 23:51:11,821:device.py:698:joulescope.usb.libusb.device:open: configure device
DEBUG:2019-06-25 23:51:11,862:device.py:650:joulescope.usb.libusb.device:libusb_set_configuration: success
DEBUG:2019-06-25 23:51:11,865:device.py:650:joulescope.usb.libusb.device:libusb_claim_interface: success
DEBUG:2019-06-25 23:51:12,496:device.py:650:joulescope.usb.libusb.device:libusb_set_interface_alt_setting: success
INFO:2019-06-25 23:51:12,496:device.py:706:joulescope.usb.libusb.device:open: done
DEBUG:2019-06-25 23:51:12,527:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 1032
DEBUG:2019-06-25 23:51:12,529:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.001203 s, length: 1024, 226
INFO:2019-06-25 23:51:12,530:driver.py:243:joulescope.driver:info:
{
  "ctl": {
    "mfg": {
      "country": "USA",
      "location": "MD_01",
      "lot": "201927_00"
    },
    "hw": {
      "rev": "H",
      "sn_mcu": "E10320201E078CAAEBACD9855091005F",
      "sn_mfg": "000122"
    },
    "fw": {
      "ver": "1.0.0"
    },
    "fpga": {
      "ver": "0.2.0",
      "prod_id": "0x9314acf2"
    }
  }
}
DEBUG:2019-06-25 23:51:12,559:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 24
DEBUG:2019-06-25 23:51:12,561:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000562 s, length: 16, 16
INFO:2019-06-25 23:51:12,562:driver.py:221:joulescope.driver:serial number = 1e300202e170c8aabeca9d58051900f5
DEBUG:2019-06-25 23:51:12,588:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 40
DEBUG:2019-06-25 23:51:12,590:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000491 s, length: 32, 32
DEBUG:2019-06-25 23:51:12,590:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 1008
DEBUG:2019-06-25 23:51:12,592:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.001149 s, length: 1000, 1000
DEBUG:2019-06-25 23:51:12,592:datafile.py:496:joulescope.datafile:tag read b'SGS' length=40 at 40 of 1000
DEBUG:2019-06-25 23:51:12,592:datafile.py:496:joulescope.datafile:tag read b'HDR' length=40 at 96 of 1000
DEBUG:2019-06-25 23:51:12,592:datafile.py:496:joulescope.datafile:tag read b'AJS' length=745 at 152 of 1000
DEBUG:2019-06-25 23:51:12,592:datafile.py:496:joulescope.datafile:tag read b'SGE' length=64 at 912 of 1000
INFO:2019-06-25 23:51:12,595:span.py:38:joulescope.span:Span([0.0, 30.0], 5e-07, 100)
INFO:2019-06-25 23:51:12,600:main.py:571:joulescope_ui.main:_control_ui_init
INFO:2019-06-25 23:51:12,600:main.py:592:joulescope_ui.main:control ui init i_range 8
INFO:2019-06-25 23:51:12,601:main.py:592:joulescope_ui.main:control ui init v_range 0
INFO:2019-06-25 23:51:12,601:main.py:608:joulescope_ui.main:_device_cfg_apply
INFO:2019-06-25 23:51:12,602:main.py:744:joulescope_ui.main:_param_cbk(source)
INFO:2019-06-25 23:51:12,602:main.py:732:joulescope_ui.main:param_name=source, value=raw, index=1
DEBUG:2019-06-25 23:51:12,623:device.py:360:joulescope.usb.libusb.device:Transfer: copy buffer 24
DEBUG:2019-06-25 23:51:12,626:device.py:478:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000794 s
DEBUG:2019-06-25 23:51:12,627:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 23:51:12,629:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000417 s, length: 128, 24
DEBUG:2019-06-25 23:51:12,657:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 23:51:12,660:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000484 s, length: 128, 24
DEBUG:2019-06-25 23:51:12,688:device.py:364:joulescope.usb.libusb.device:Transfer: create buffer 136
DEBUG:2019-06-25 23:51:12,689:device.py:482:joulescope.usb.libusb.device:ControlTransferAsync._finish rc=0, duration=0.000546 s, length: 128, 24
[... more like this ...]

Let me know if there happens to be anything else you would like me to try.

1 Like

That’s the problem! For some reason, libusb is taking 5 seconds to open the Joulescope device on your machine. The timeout in 0.4.1 was only 3 second, and the timeout in 0.4.2 is 6 seconds, which is too close to the actual. My computer only took 0.003 seconds for this! I have put this on my list of items to investigate, and I will also further increase the default timeout in the next release.