Hello Martin,
* On Fri, Jun 12, 2020 at 03:34:23AM -0700 Martin Thierer wrote:
> This is the error I get when trying to run a "cbmctrl status 8":
>
>
> error: Cannot open USB device: LIBUSB_ERROR_NOT_SUPPORTED
>
> error: no xum1541 device found
>
> error: Cannot open USB device: LIBUSB_ERROR_NOT_SUPPORTED
>
> error: no xum1541 device found
>
> libusb/xum1541:: The handle is invalid.
I had this once, too. Unplugging the ZF, waiting 2 or 3 seconds and
re-plugging helped.
It seems that after installation, it is not always usable directly. I am
not sure if it would have helped if I waited any longer after
installaton.
> 1. I already had libusb1 and a zadig xum1541 driver installed that I used with
> pyusb.
BTW: INFer.exe is a variant of zadic, which is the console version of
zadig (note the end-"c" and end-"g" of the commands!) Thus, it is the
same infrastructure, and the driver is installed almost identical.
Why did I do it this way?
INFer allows me the install the USB drivers for multiple devices at
once. Thus, it installs WinUSB for the ZF, for the different xum1541,
for the xu1541, and for the boot loader of the Atmel uC. Especially
the boot loader is missing if you use zadig yourself, and it results in
problems upgrading the firmware, as xum1541cfg hangs - it cannot detect
the ZF anymore!
There is a workaround, though, if anyone does not want to use my INFer:
1. start the update with xum1541cfg and wait for it failing.
2. start zadig and install the driver for the Atmel Bootloader (I do not
remember the exact name)
3. Run xum1541cfg again.
After this procedure, future updates will succeed.
Of course, using my INFer seems to be the simpler solution to me, at
least, if it works as expected.
> I had no issues installing it and it worked fine at the time. I did
> *not* uninstall the driver before installing opencbm today (I don't even know
> how I would do that). After installing opencbm pyusb also doesn't seem to work
> any more. I haven't tried uninstalling opencbm and re-installing the driver
> with zadig yet.
My suggestion: Unplug the ZF and try the installation again. Then, when
everything has finished, try pluggin the ZF again.
> 2. As I only planned to give it a quick try, I tried to avoid to really install
> opencbm and be clever instead. Maybe that also screwed something up:
Don't try to be clever! ;)
> a. First I just unpacked the zip file and tried to run cbmctrl from the amd64
> directory. This failed with this error message:
>
> Error loading plugin '(null)': The parameter is incorrect. (87)
> Error loading plugin '(null)': The parameter is incorrect. (87)
> NO PLUGIN DRIVER!: The parameter is incorrect.
opencbm requires an installation. Currently, it needs the opencbm.conf
in c:\windows\system32 in order to find the plugin. If it is not there
or if it is corrupted, you see the above message.
> b. I know you wrote that powershell is needed but i wasn't sure if I had that
> installed so next I just ran the install script in an administrator cmd.exe
> shell.
1. powershell is automatically installed on Windows 7 SP1 (build 7601) and later.
2. The administrator's cmd.exe does NOT work! To be more precise, it is
not enough! I needed some time to find out that this seems to be the
reason why some people claim that the installation fails!
With that approach, you do not get the UAC prompt, and thus, you do
not have (full) administrator rights! Yes, you are administrator, but
you do not have administrator rights! Weird, huh?
So, the install script will fail copying things to the right
locations.
That's exactly what I needed the powershell for: To elevate the
cmd.exe, so I have the correct rights. I did not find any alternative
to doing it this way.
Of course, you can start the elevated cmd.exe yourself. I think this
article should be good:
https://winaero.com/blog/how-to-open-elevated-command-prompt-in-windows-10/
Note that starting a cmd.exe from an administrator account is NOT
enough! Damn UAC...
> This seemed to work (I noticed no errors), but the resulting install
> still didn't work. (I *think* it also gave me the "Error loading plugin '(null)
> '" message and not the "LIBUSB_ERROR_NOT_SUPPORTED" message I get now after the
> "proper" install, but I might remember wrong).
The "Error loading plugin" message tells me you did not have the rights.
A c:\windows\system32\opencbm.conf does not exist, right?
> 2. So I finally gave in and installed it via powershell as it was meant to be,
> but unfortunately that still doesn't work. I uninstalled and re-installed a few
> times with re-boots in between but that didn't change anything.
Ok. So, what is the exact state at the moment on your side?
I would suggest we try to clean your machine. I think we should do this
off-list, right?
BTW, are you German? In this case, we can also write in German.
> I also tried the version you tagged v0.4.99.100 (b18c367b) on linux and it
> seems to work fine. (That's what I expected, as I think the problem with
> windows is with the libusb/driver install, but just to be sure).
There seem to be 2 issues:
1. WinUSB (!) driver install
2. administrative rights for the shell