Build a HMI Display for Windows

OK, I’m not interesting in Linux but in Windows.
Sorry for several stupid questions:

  1. What is usermode sdk for Python and where to get it?
  2. Where to find python-demo path
  3. How will appear /seeed-linux-usbdisp/drivers/python-demo/ path on Windows machine?
    Did you forget something?
    That is all for beginning.

Some steps further.
I download NullFunctional-sdk.uf2 to Wio and found Seeed Wio Terminal (USB\VID_2886&PID_802D&MI_03
) in Device Manager with no drivers.
Running python simple-test.py I got:

Traceback (most recent call last):
File “simple-test.py”, line 54, in
devices = list(usb.core.find(find_all=True, idVendor=0x2886, idProduct=0x802D))
File “D:\Python38\lib\site-packages\usb\core.py”, line 1263, in find
raise NoBackendError(‘No backend available’)
usb.core.NoBackendError: No backend available

What does it mean?
Is some driver need?

Hi @Kabron

It seems your PC is missing the libusb that is needed by the pyusb. You may find more reference here: https://github.com/pyusb/pyusb/issues/120

You will need to download and install the libusb to your path.

OK, with libusb installed, I got:

Traceback (most recent call last):
File “simple-test.py”, line 61, in
print(dev1.serial_number)
File “D:\Python38\lib\site-packages\usb\core.py”, line 830, in serial_number
self._serial_number = util.get_string(self, self.iSerialNumber)
File “D:\Python38\lib\site-packages\usb\util.py”, line 311, in get_string
langids = dev.langids
File “D:\Python38\lib\site-packages\usb\core.py”, line 817, in langids
self._langids = util.get_langids(self)
File “D:\Python38\lib\site-packages\usb\util.py”, line 264, in get_langids
buf = get_descriptor(
File “D:\Python38\lib\site-packages\usb\control.py”, line 168, in get_descriptor
return dev.ctrl_transfer(
File “D:\Python38\lib\site-packages\usb\core.py”, line 1025, in ctrl_transfer
self._ctx.managed_open()
File “D:\Python38\lib\site-packages\usb\core.py”, line 102, in wrapper
return f(self, *args, **kwargs)
File “D:\Python38\lib\site-packages\usb\core.py”, line 120, in managed_open
self.handle = self.backend.open_device(self.dev)
File “D:\Python38\lib\site-packages\usb\backend\libusb1.py”, line 786, in open_device
return _DeviceHandle(dev)
File “D:\Python38\lib\site-packages\usb\backend\libusb1.py”, line 643, in init
_check(_lib.libusb_open(self.devid, byref(self.handle)))
File “D:\Python38\lib\site-packages\usb\backend\libusb1.py”, line 593, in _check
raise NotImplementedError(_strerror(ret))
NotImplementedError: Operation not supported or unimplemented on this platform

I reinstall libusb with zadig and now I have two Seeed Wio Terminal(Interface 0/2).
But python error output remain.

Did you miss something important else?

From the debug message, it looks still error from the libusb. Can you try a quick python script to test your environment:

import usb.util
import sys
all_devs = usb.core.find(find_all=True)
for d in all_devs:
	print(d)

Windows 10 x64
libusb-win32-bin-1.2.6.0
libusb

d:\seeed-linux-usbdisp-1.0.0\drivers\python-demo>python test.py
Traceback (most recent call last):
File “D:\Python38\lib\site-packages\usb\core.py”, line 727, in str
for configuration in self:
File “D:\Python38\lib\site-packages\usb\core.py”, line 1094, in iter
yield Configuration(self, i)
File “D:\Python38\lib\site-packages\usb\core.py”, line 584, in init
desc = backend.get_configuration_descriptor(
File “D:\Python38\lib\site-packages\usb\backend\libusb1.py”, line 755, in get_configuration_descriptor
_check(self.lib.libusb_get_config_descriptor(
File “D:\Python38\lib\site-packages\usb\backend\libusb1.py”, line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 2] Entity not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “test.py”, line 5, in
print(d)
File “D:\Python38\lib\site-packages\usb\core.py”, line 731, in str
configuration = self.get_active_configuration()
File “D:\Python38\lib\site-packages\usb\core.py”, line 875, in get_active_configuration
return self._ctx.get_active_configuration(self)
File “D:\Python38\lib\site-packages\usb\core.py”, line 102, in wrapper
return f(self, *args, **kwargs)
File “D:\Python38\lib\site-packages\usb\core.py”, line 236, in get_active_configuration
self.managed_open()
File “D:\Python38\lib\site-packages\usb\core.py”, line 102, in wrapper
return f(self, *args, **kwargs)
File “D:\Python38\lib\site-packages\usb\core.py”, line 120, in managed_open
self.handle = self.backend.open_device(self.dev)
File “D:\Python38\lib\site-packages\usb\backend\libusb1.py”, line 786, in open_device
return _DeviceHandle(dev)
File “D:\Python38\lib\site-packages\usb\backend\libusb1.py”, line 643, in init
_check(_lib.libusb_open(self.devid, byref(self.handle)))
File “D:\Python38\lib\site-packages\usb\backend\libusb1.py”, line 593, in _check
raise NotImplementedError(_strerror(ret))
NotImplementedError: Operation not supported or unimplemented on this platform

Yes, it is still error from the libusb driver. Please can you try this libusb: https://github.com/libusb/libusb

I downloaded libusb-1.0.23.7z but I see no installation instruments like inf-wizard.exe or install-filter-win.exe.

Hi @Kabron

I had a run myslelf and got the followings:

I already try it. Please, look 3 messages ago.

Did you install two? one for the driver and one for the inf? I had the same error and after installing two things and it worked.

I got this idea from here: https://stackoverflow.com/questions/13773132/pyusb-on-windows-no-backend-available

This seems to be an error from the pyusb end and has been long going. If you are using mac then it will be very easy of brew install libusb