engine: Unable to load driver: No backend available

381 views
Skip to first unread message

J

unread,
Jun 18, 2015, 11:34:54 PM6/18/15
to weewx...@googlegroups.com
Hello, I'm running (or at least trying to) whew on a rpi2, with Alpine Linux as the OS of choice (no more corrupt sd cards ftw!).  I followed the manual install method, but something isn't quite right and I think i'm really close, this in my messages log:

Jun 19 03:16:31 user.info weewx[1476]: engine: Platform Linux-3.18.12-0-rpi2-armv7l-with

Jun 19 03:16:31 user.info weewx[1476]: engine: Using configuration file /home/weewx/weewx.conf

Jun 19 03:16:31 user.debug weewx[1476]: engine: Initializing engine

Jun 19 03:16:31 user.info weewx[1476]: engine: Loading station type WS28xx (weewx.drivers.ws28xx)

Jun 19 03:16:31 user.info weewx[1476]: ws28xx: MainThread: driver version is 0.34

Jun 19 03:16:31 user.info weewx[1476]: ws28xx: MainThread: frequency is US

Jun 19 03:16:31 user.debug weewx[1476]: ws28xx: MainThread: CCommunicationService.init

Jun 19 03:16:31 user.debug weewx[1476]: ws28xx: MainThread: setCommModeInterval to 3

Jun 19 03:16:32 user.crit weewx[1476]: engine: Unable to load driver: No backend available

Jun 19 03:16:32 user.crit weewx[1476]:     ****  Exiting...


When I run the application: ./bin/weewxd weewx.conf

it just runs for 1-2 seconds and returns nothing but me at the prompt.  I've googled it around (No backend available) and it might have something to do with usblib, but I have it installed.  Maybe a path issue?  it's  a ws28xx and it's worked great on my raspbian image.

Thanks in advance!
Jared

mwall

unread,
Jun 18, 2015, 11:45:07 PM6/18/15
to weewx...@googlegroups.com, jared.sc...@gmail.com
jared,

be sure that libusb is installed.  libusb-0.1 seems to work better than libusb-1.0

also, what very of pyusb are you running?  pyusb-0.4 seems to work better than pyusb-1.0

m

J

unread,
Jun 19, 2015, 9:59:11 PM6/19/15
to weewx...@googlegroups.com, jared.sc...@gmail.com
Thank you for the reply!  
I was running pyusb-1.0.0b2
and libusb1-1.4.0

here is how I tried to uninstall:

pip uninstall libusb1

pip uninstall pyusb


both uninstalled just fine

then installing the right version:

pip install libusb1==0.1.3

Collecting libusb1==0.1.3

  Downloading libusb1-0.1.3.tar.gz

Installing collected packages: libusb1

  Running setup.py install for libusb1

Successfully installed libusb1-0.1.3


but with with pyusb, pip doesn't appear to have versions prior to v1:

pip install pyusb==0.4

Collecting pyusb==0.4

  Could not find a version that satisfies the requirement pyusb==0.4 (from versions: 1.0.0a2, 1.0.0a3, 1.0.0b1, 1.0.0b2)

No matching distribution found for pyusb==0.4


Now I have to figure out how to install 0.4 manually.  It's strange, because it looks like it's in the pip universe:

I'll report back

Erwin Heger

unread,
Jun 20, 2015, 5:51:31 AM6/20/15
to weewx...@googlegroups.com
What about calling for pyusb==0.4.2??

J

unread,
Jun 20, 2015, 3:01:05 PM6/20/15
to weewx...@googlegroups.com
Good call, but no dice:

# pip install pyusb==0.4.2

Collecting pyusb==0.4.2

  Could not find a version that satisfies the requirement pyusb==0.4.2 (from versions: 1.0.0a2, 1.0.0a3, 1.0.0b1, 1.0.0b2)

No matching distribution found for pyusb==0.4.2


On Saturday, June 20, 2015 at 5:51:31 AM UTC-4, Erwin Heger wrote:
What about calling for pyusb==0.4.2??

mwall

unread,
Jun 20, 2015, 3:13:58 PM6/20/15
to weewx...@googlegroups.com, jared.sc...@gmail.com
jared,

try using pyusb 1.0.0b2 with the libusb 0.1.3

according to the docs, pyusb is supposed to work with any libusb backend.  in practice that does not seem to be the case.  however, no one has done a complete set of tests to determine which combination(s) of pyusb and libusb actually work.

would you care to have a go at it?

fwiw, all of the drivers in weewx use the pyusb 0.4 bindings, and pyusb 1.x is *supposed* to be backward compatible.  also, i'm pretty sure that all of the usb hardware supported by weew declare themselves as HID (human-interface devices).  however, all of the weewx drivers use the raw usb methods rather than any HID abstraction.

m

J

unread,
Jun 20, 2015, 3:58:09 PM6/20/15
to weewx...@googlegroups.com, jared.sc...@gmail.com
Thank you for the reply!  I'd be happy to test configuration combinations.  I tried installing pip install pyusb==1.0.0b2
and that installed fine, but the end result (with libusb1 0.1.3) is still the same

Is there a chance it might be installing it in a different location than weewx is expecting?  Is there a python trouble shooting command I can run to see if it's detected?

Jared

J

unread,
Jun 24, 2015, 10:01:33 AM6/24/15
to weewx...@googlegroups.com, jared.sc...@gmail.com
Hi mono, so here is what I found and how I got there:
I needed to install some additional packages usblib-compat and usblib-compat-dev and usblib-dev
apk add usblib-compat usblib-compat-dev usblib-dev

I then added pyusb 0.4.2 by:
3A%2F%2Fsourceforge.net%2Fprojects%2Fpyusb%2Ffiles%2FPyUSB%25200.x%2F0.4.2%2F&ts=1435150788&use_mirror=superb-sea2
tar -xzf /tmp/pyusb-0.4.2.tar.gz
/tmp/pyusb-0.4.2/python setup.py install

(note the red part will need to be changed to match the direct download mirror link when you go to source forge and click download and copy  paste direct link)

now USB is working!  I think it might have been usblib-compat and /or the dev additions more so than .0.4.2 because i uninstalled 0.4.2 and then reinstalled 1.0.0b2.  Both versions are giving me this new error I'll open in a new thread:

./bin/weewxd weewx.conf

Traceback (most recent call last):

  File "./bin/weewxd", line 61, in <module>

    weewx.engine.main(options, args)

  File "/home/weewx/bin/weewx/engine.py", line 832, in main

    engine = EngineClass(config_dict)

  File "/home/weewx/bin/weewx/engine.py", line 75, in __init__

    self.loadServices(config_dict)

  File "/home/weewx/bin/weewx/engine.py", line 137, in loadServices

    self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))

  File "/home/weewx/bin/weeutil/weeutil.py", line 917, in _get_object

    mod = __import__(module)

  File "/home/weewx/bin/weewx/restx.py", line 808

    "siteAuthenticationKey=XXX", _url)))


Thanks for helping me sort through the first issue!

On Saturday, June 20, 2015 at 3:13:58 PM UTC-4, mwall wrote:
Reply all
Reply to author
Forward
0 new messages