Closed supachai-o closed 2 years ago
Doesn't look like this is a serial device (or unsupported device):
"E/flutter (19180): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(UsbSerialPortAdapter, Not an Serial device., null, null)"
Flutter (Channel stable, 2.5.3, on Mac OS X 10.15.4 19E287 darwin-x64, locale en-TH)
Build on Android OS connect with SmartCard Reader
SmartCard Information:
I/flutter (19180): [UsbDevice: 58f-9540 EMV Smartcard Reader, Generic null] I/flutter (19180): Device Id : 2002 I/flutter (19180): Hash Code : 449461508 I/flutter (19180): Product Name : EMV Smartcard Reader I/flutter (19180): Vendor Id : 1423 I/flutter (19180): Product Id : 38208 I/flutter (19180): Port : null I/flutter (19180): Serial No : null
source code in line: _port = await device.create();
found error message:
I/flutter (19180): [UsbDevice: 58f-9540 EMV Smartcard Reader, Generic null] I/usbhost (19180): usb_device_new /dev/bus/usb/002/002 fd: 119 I/usbhost (19180): usb_device_new read returned 111 errno 11 E/flutter (19180): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(UsbSerialPortAdapter, Not an Serial device., null, null) E/flutter (19180): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7) E/flutter (19180): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:18) E/flutter (19180):
E/flutter (19180): #2 UsbSerial.createFromDeviceId (package:usb_serial/usb_serial.dart:431:33)
E/flutter (19180):
E/flutter (19180): #3 UsbDevice.create (package:usb_serial/usb_serial.dart:327:13)
E/flutter (19180):
E/flutter (19180): #4 _MyAppState._getPorts.. (package:flutterapp/main.dart:146:29)
E/flutter (19180):
E/flutter (19180):