Tony 17414656a9 Enhance USB serial plugin for Android and iPadOS with DriverKit support
- Updated README.md to reflect platform support for iPadOS.
- Implemented isDriverAvailable method in FlutterUsbSerialPlugin for DriverKit readiness check.
- Added DriverKitSerialClient C source and header files for iPadOS integration.
- Created Swift Package for iPadOS support.
- Updated pubspec.yaml and flutter_usb_serial.dart to clarify platform compatibility.
- Enhanced tests to verify isDriverAvailable functionality.

Signed-off-by: Tony <tonylu@tony-cloud.com>
2026-08-01 20:40:46 +08:00
2026-05-08 06:49:20 +08:00
2026-04-27 03:19:57 +08:00
2026-04-27 03:19:57 +08:00
2026-04-27 03:19:57 +08:00
2026-04-27 03:19:57 +08:00

flutter_usb_serial

Flutter USB serial transport for Android and DriverKit-enabled iPadOS.

Platforms

  • Android uses usb-serial-for-android and the normal Android USB permission flow.
  • iPadOS 16+ uses Swift Package Manager and a user client exposed by a USBDriverKit extension embedded in the host app. DriverKit USB support is available only on iPads with an M-series chip.

The package contains the SwiftPM client plugin, not a reusable pre-signed DriverKit extension. Apple provisions USB transport entitlements to the host app and driver for a specific USB vendor. The host app must:

  1. Embed a DriverKit extension whose IOUserClass is DaliMasterEspressifUsbDriver, or adapt the client service name.
  2. Add com.apple.developer.driverkit.communicates-with-drivers to the app.
  3. Sign the extension with com.apple.developer.driverkit and a com.apple.developer.driverkit.transport.usb entitlement approved for its USB vendor ID.
  4. Enable Swift Package Manager integration for Flutter iOS plugins.

Call FlutterUsbSerial.isDriverAvailable() during startup before showing a USB transport. It returns true only when a compatible driver service is loaded.

The DaliMaster host implementation is deliberately restricted to Espressif vendor ID 0x303A and the USB Serial/JTAG interface. Serial parameter and modem line methods are accepted for API compatibility; the ESP USB Serial/JTAG bulk transport does not use UART baud or line coding.

S
Description
No description provided
Readme 86 KiB
Languages
Dart 33.2%
Kotlin 30.7%
Swift 20.8%
C 15.3%