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

怎么向usb设备发送数据 #5

Open
GalaxyCal opened this issue Feb 25, 2022 · 2 comments
Open

怎么向usb设备发送数据 #5

GalaxyCal opened this issue Feb 25, 2022 · 2 comments

Comments

@GalaxyCal
Copy link

/// send data to usb
Future transferOut(
dynamic device, endpointNumber, ByteBuffer data) {
return _platform.transferOut(device, endpointNumber, data);
}

我找到发送数据的方法,其中endpointNumber这个端口号参数,是怎么获取的呢,求解答

@GalaxyCal
Copy link
Author

I found a way to send data, how to get the port number parameter endpointNumber, please answer

@techttiru
Copy link

device

@GalaxyCal - Hi, were you be able to send the data? I am trying to connect USB POS printer from flutter web. so i am not clear in this endpoint and TypedData. My data is in List format. now i want to know how to send this List data in the below method.

Future<UsbOutTransferResult> transferOut(int endpointNumber, TypedData data).

here what is endpointNumber and how to get the endpontNumber. Also, how to convert my List data to TypedData?

can you please sample code if possible? Appreciate your response..

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