ComPort for Android USB 3.0 Delphi/C++ Builder XE6 – 10.2 Full Source

Delphi and C++ Builder serial communication library for USB connected devices for Android.

uses usb-serial-for-android library
supports FT232R, CDC/ACM (Arduino Uno), CP2102 and CH34x chips
no special root access privileges needed
available for Delphi/C++ Builder XE6 – 10.2
royalty free distribution in applications


JUsbSerialPortClass = interface(IJavaClass)
  property DATABITS_5: Integer read;
  property DATABITS_6: Integer read;
  property DATABITS_7: Integer read;
  property DATABITS_8: Integer read;
  property FLOWCONTROL_NONE: Integer read;
  property FLOWCONTROL_RTSCTS_IN: Integer read;
  property FLOWCONTROL_RTSCTS_OUT: Integer read;
  property FLOWCONTROL_XONXOFF_IN: Integer read;
  property FLOWCONTROL_XONXOFF_OUT: Integer read;
  property PARITY_EVEN: Integer read;
  property PARITY_MARK: Integer read;
  property PARITY_NONE: Integer read;
  property PARITY_ODD: Integer read;
  property PARITY_SPACE: Integer read;
  property STOPBITS_1: Integer read;
  property STOPBITS_1_5: Integer read;
  property STOPBITS_2: Integer read;

JUsbSerialPort = interface(IJavaInstance)
  procedure close;
  function getCD: Boolean;
  function getCTS: Boolean;
  function getDriver: JUsbSerialDriver;
  function getDSR: Boolean;
  function getDTR: Boolean;
  function getPortNumber: Integer;
  function getRI: Boolean;
  function getRTS: Boolean;
  function getSerial: JString;
  procedure open(connection: JUsbDeviceConnection);
  function purgeHwBuffers(purgeReadBuffers: Boolean; purgeWriteBuffers: Boolean): Boolean;
  function &read(dest: TJavaArray<Byte>; timeoutMillis: Integer): Integer;
  procedure setDTR(value: Boolean);
  procedure setParameters(baudRate: Integer; dataBits: Integer; stopBits: Integer; parity: Integer);
  procedure setRTS(value: Boolean);
  function &write(src: TJavaArray<Byte>; timeoutMillis: Integer): Integer;

JSerialInputOutputManager_Listener = interface(IJavaInstance)
  procedure onNewData(data: TJavaArray<Byte>);
  procedure onRunError(e: JException);
What’s new

Version 3.0 added TDataBits enumeration added TParity enumeration added TStopBits enumeration added EUsbSerialError class added TUsbSerial class added USB broadcast listener removed LoadUsbSerial procedure removed GetUsbManager function removed GetUsbDeviceConnection function removed GetDrivers function removed GetPorts function updated Android declarations added API.TXT file improved demo examples

Integer, property, function, Boolean, procedure, added, Delphi, Builder, removed, Android, library, serial, enumeration, interface, TJavaArrayByte, ComPort, CH34x, communication, supports, value, Integer, property, function, Boolean, procedure, added, Delphi, Builder, Android, removed, library, serial, enumeration, TJavaArrayByte, interface, ComPort, DOWNLOAD, applications, IJavaInstance, class