Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example missing on how to use the library? #23

Closed
jyashi opened this issue Apr 12, 2022 · 9 comments
Closed

Example missing on how to use the library? #23

jyashi opened this issue Apr 12, 2022 · 9 comments

Comments

@jyashi
Copy link

jyashi commented Apr 12, 2022

Thank you for the package.

Sorry but I cannot see a straightforward way to using it.

  1. I cannot see an example section in the packages https://pub.dev/packages/libusb
  2. I can see an example folder in the github page but the use of it causes errors from listDeviceProducts.dart

image

I just want to import the library on windows platform and use its provided functions to access usb device and send data to it. Will there be a step by step guide in getting this done?

Again thank you for your work and apologies if the solution was obvious but i could not pick up on it.

@Sunbreak
Copy link
Collaborator

Could you try https://github.com/woodemi/quick_usb?

@jyashi
Copy link
Author

jyashi commented Apr 12, 2022

Thank you. I tried running.. i got the following error.. i need to take extra measures on my PC ?

image

@jyashi
Copy link
Author

jyashi commented Apr 12, 2022

Flutter doctor -v

image

@jyashi
Copy link
Author

jyashi commented Apr 12, 2022

Apparently the structs.g.dart file does not exist.

Does it not come included with the quick_usb package?

@Sunbreak
Copy link
Collaborator

  1. I can see an example folder in the github page but the use of it causes errors from listDeviceProducts.dart

Does example/listdevs.list work?

@Sunbreak
Copy link
Collaborator

Thank you. I tried running.. i got the following error.. i need to take extra measures on my PC ?

image

Something wrong inside win32 package, which quick_usb depends on

Apparently the structs.g.dart file does not exist.

Does it not come included with the quick_usb package?

structs.g.dart is inside win32: https://github.com/timsneath/win32/blob/main/lib/src/structs.g.dart

@jyashi
Copy link
Author

jyashi commented Apr 12, 2022

Okay... adding Win32 to dependencies and import 'package:win32/win32.dart'; runs the example fine. I will keep digging for the rest and get back here if any problem comes.

@Sunbreak
Copy link
Collaborator

Re-check quick_usb and libusb, neither depends on win32

Maybe it is your project depedency?

@Sunbreak
Copy link
Collaborator

Fix by 9807b5c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants