Public usbserial As felUsbSerial
java.lang.ArrayIndexOutOfBoundsException: length=61; index=61
at com.felhr.usbserial.FTDISerialDevice$FTDIUtilities.copyData(FTDISerialDevice.java:594)
at com.felhr.usbserial.FTDISerialDevice$FTDIUtilities.adaptArray(FTDISerialDevice.java:502)
at com.felhr.usbserial.UsbSerialDevice$WorkerThread.run(UsbSerialDevice.java:248)
usbserial.Initialize("usbserial", device, usbSerialManager.GetDevices(useThisOne).InterfaceCount-1)
usbserial.BaudRate = 115200
usbserial.DataBits = usbserial.DATA_BITS_8
usbserial.StartReading
Sub usbserial_DataAvailable (Buffer() As Byte)
Dim msg As String
msg = BytesToString(Buffer, 0, Buffer.Length, "UTF8")
' Log(Buffer.Length) ' had this in to keep an eye on the length, never more than 20
parse(msg)
end sub
trymsg = BytesToString(Buffer, 0, Buffer.Length, "UTF8")
msg = BytesToString(Buffer, 0, Buffer.Length-1, "UTF8")
Can't happen. The DataAvailable events always run on the main thread and will not be re-entered. If a new event is raised by the receiving thread it will be queued in the message loop till the running DataAvailable event returns to the message loop and the new event then raised..more data is arriving whilst the DataAvailable event handler is still digesting the previous event...
// Special treatment needed to FTDI devices
public byte[] adaptArray(byte[] ftdiData)
{
int length = ftdiData.length;
if(length > 64)
{
int n = 1;
int p = 64;
// Precalculate length without FTDI headers
while(p < length)
{
n++;
p = n*64;
}
int realLength = length - n*2;
byte[] data = new byte[realLength];
copyData(ftdiData, data);
return data;
}else
{
return Arrays.copyOfRange(ftdiData, 2, length);
}
}
}
Agreed. Did some poking to see that it breaks up the message in two if larger than 64 bytes, but strangely creates the error with an index of 61 in a 60 byte array.Erel wrote the library to wrap a GitHub project. I've had a poke around inside and it doesn't seem to be just a simple resize of an array as there seems to be a lot of passing arrays around and I haven't found the mother lode that unequivocally defines the buffer size. There is logic in there that needs a bit of unraveling to make sure that the change is safe in all circumstances. As was noted in the post #31 that I linked to, the library should really interrogate the device for it's max packet size and then use that.
// Copy data without FTDI headers
private void copyData(byte[] src, byte[] dst)
{
int i = 0; // src index
int j = 0; // dst index
while(i <= src.length-1)
{
if(i != 0 && i != 1)
{
if(i % 64 == 0 && i >= 64)
{
i += 2;
}else
{
dst[j] = src[i];
i++;
j++;
}
}else
{
i++;
}
}
}
}
// Copy data without FTDI headers
private static void copyData(byte[] src, byte[] dst)
{
int srcPos = 2, dstPos = 0;
while(srcPos - 2 <= src.length - 64)
{
System.arraycopy(src, srcPos, dst, dstPos, 62);
srcPos += 64;
dstPos += 62;
}
int remaining = src.length - srcPos + 2;
if (remaining > 0)
{
System.arraycopy(src, srcPos, dst, dstPos, remaining - 2);
}
}
Starting step: Compiling Java code.
javac 1.8.0_401
C:\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\felUsbSerial.java:35: error: package anywheresoftware.b4a.objects.usb.UsbManagerWrapper does not exist
import anywheresoftware.b4a.objects.usb.UsbManagerWrapper.UsbDeviceWrapper;
^
Error.
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="C:/Paul/dev/Android/platforms/android-33/android.jar"/>
<classpathentry kind="lib" path="C:/Program Files/Anywhere Software/B4A/Libraries/B4AShared.jar"/>
<classpathentry kind="lib" path="C:/Program Files/Anywhere Software/B4A/Libraries/Core.jar"/>
<classpathentry kind="lib" path="C:/Program Files/Anywhere Software/B4A/Libraries/Usb.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Starting step: Compiling Java code.
javac 11.0.1
Completed successfully.
Starting step: Creating jar file.
Completed successfully.
Starting step: Creating XML file.
javadoc: warning - The old Doclet and Taglet APIs in the packages
com.sun.javadoc, com.sun.tools.doclets and their implementations
are planned to be removed in a future JDK release. These
components have been superseded by the new APIs in jdk.javadoc.doclet.
Users are strongly recommended to migrate to the new APIs.
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\felUsbSerial.java:25: error: package android.content does not exist
import android.content.Context;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\felUsbSerial.java:26: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDevice;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\felUsbSerial.java:27: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDeviceConnection;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\felUsbSerial.java:28: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbManager;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:24: error: package android.app does not exist
import android.app.PendingIntent;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:25: error: package android.content does not exist
import android.content.Context;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:26: error: package android.content does not exist
import android.content.Intent;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:27: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbAccessory;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:28: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDevice;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:29: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDeviceConnection;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:30: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbEndpoint;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:31: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbInterface;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:32: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbManager;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:33: error: package android.os does not exist
import android.os.Build;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:34: error: package android.os does not exist
import android.os.ParcelFileDescriptor;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:15: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbConstants;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:16: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDevice;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:17: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDeviceConnection;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:18: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbEndpoint;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:19: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbInterface;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:20: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbRequest;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\felUsbSerial.java:43: error: cannot find symbol
public UsbManager usbManager;
^
symbol: class UsbManager
location: class felUsbSerial
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\felUsbSerial.java:78: error: cannot find symbol
public void Initialize(String EventName, UsbDevice Device, int InterfaceIndex) throws Exception{
^
symbol: class UsbDevice
location: class felUsbSerial
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\felUsbSerial.java:86: error: cannot find symbol
public void Initialize2(String EventName, UsbDevice Device, int InterfaceIndex, String ClassName) throws Exception {
^
symbol: class UsbDevice
location: class felUsbSerial
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:28: error: cannot find symbol
protected final UsbDevice device;
^
symbol: class UsbDevice
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:29: error: cannot find symbol
protected final UsbDeviceConnection connection;
^
symbol: class UsbDeviceConnection
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:40: error: cannot find symbol
private UsbEndpoint inEndpoint;
^
symbol: class UsbEndpoint
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:41: error: cannot find symbol
private UsbEndpoint outEndpoint;
^
symbol: class UsbEndpoint
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:54: error: cannot find symbol
public UsbSerialDevice(UsbDevice device, UsbDeviceConnection connection)
^
symbol: class UsbDevice
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:54: error: cannot find symbol
public UsbSerialDevice(UsbDevice device, UsbDeviceConnection connection)
^
symbol: class UsbDeviceConnection
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:62: error: cannot find symbol
public static UsbSerialDevice createUsbSerialDevice(UsbDevice device, UsbDeviceConnection connection)
^
symbol: class UsbDevice
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:62: error: cannot find symbol
public static UsbSerialDevice createUsbSerialDevice(UsbDevice device, UsbDeviceConnection connection)
^
symbol: class UsbDeviceConnection
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:67: error: cannot find symbol
public static UsbSerialDevice createUsbSerialDevice(UsbDevice device, UsbDeviceConnection connection, int iface)
^
symbol: class UsbDevice
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:67: error: cannot find symbol
public static UsbSerialDevice createUsbSerialDevice(UsbDevice device, UsbDeviceConnection connection, int iface)
^
symbol: class UsbDeviceConnection
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:91: error: cannot find symbol
public static boolean isSupported(UsbDevice device)
^
symbol: class UsbDevice
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:203: error: cannot find symbol
public static boolean isCdcDevice(UsbDevice device)
^
symbol: class UsbDevice
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:399: error: cannot find symbol
protected void setSyncParams(UsbEndpoint inEndpoint, UsbEndpoint outEndpoint)
^
symbol: class UsbEndpoint
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:399: error: cannot find symbol
protected void setSyncParams(UsbEndpoint inEndpoint, UsbEndpoint outEndpoint)
^
symbol: class UsbEndpoint
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:405: error: cannot find symbol
protected void setThreadsParams(UsbRequest request, UsbEndpoint endpoint)
^
symbol: class UsbRequest
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:405: error: cannot find symbol
protected void setThreadsParams(UsbRequest request, UsbEndpoint endpoint)
^
symbol: class UsbEndpoint
location: class UsbSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:331: error: cannot find symbol
private UsbEndpoint inEndpoint;
^
symbol: class UsbEndpoint
location: class UsbSerialDevice.ReadThread
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:382: error: cannot find symbol
public void setUsbEndpoint(UsbEndpoint inEndpoint)
^
symbol: class UsbEndpoint
location: class UsbSerialDevice.ReadThread
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:297: error: cannot find symbol
private UsbEndpoint outEndpoint;
^
symbol: class UsbEndpoint
location: class UsbSerialDevice.WriteThread
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:315: error: cannot find symbol
public void setUsbEndpoint(UsbEndpoint outEndpoint)
^
symbol: class UsbEndpoint
location: class UsbSerialDevice.WriteThread
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:224: error: cannot find symbol
private UsbRequest requestIN;
^
symbol: class UsbRequest
location: class UsbSerialDevice.WorkerThread
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:273: error: cannot find symbol
public void setUsbRequest(UsbRequest request)
^
symbol: class UsbRequest
location: class UsbSerialDevice.WorkerThread
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\UsbSerialDevice.java:278: error: cannot find symbol
public UsbRequest getUsbRequest()
^
symbol: class UsbRequest
location: class UsbSerialDevice.WorkerThread
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:50: error: cannot find symbol
private UsbManager manager;
^
symbol: class UsbManager
location: class UsbManagerWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:185: error: cannot find symbol
public static class UsbDeviceWrapper extends AbsObjectWrapper<UsbDevice> {
^
symbol: class UsbDevice
location: class UsbManagerWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:138: error: cannot find symbol
public UsbDeviceConnectionWrapper OpenDevice(UsbDevice Device, UsbInterface Interface, boolean ForceClaim) {
^
symbol: class UsbDevice
location: class UsbManagerWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:138: error: cannot find symbol
public UsbDeviceConnectionWrapper OpenDevice(UsbDevice Device, UsbInterface Interface, boolean ForceClaim) {
^
symbol: class UsbInterface
location: class UsbManagerWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbDeviceConnectionWrapper.java:24: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbConstants;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbDeviceConnectionWrapper.java:25: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDeviceConnection;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbDeviceConnectionWrapper.java:26: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbEndpoint;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbDeviceConnectionWrapper.java:27: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbInterface;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbDeviceConnectionWrapper.java:28: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbRequest;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:162: error: cannot find symbol
public void RequestPermission(UsbDevice Device) {
^
symbol: class UsbDevice
location: class UsbManagerWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:177: error: cannot find symbol
public boolean HasPermission(UsbDevice Device) {
^
symbol: class UsbDevice
location: class UsbManagerWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbDeviceConnectionWrapper.java:51: error: cannot find symbol
UsbDeviceConnection connection;
^
symbol: class UsbDeviceConnection
location: class UsbDeviceConnectionWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbDeviceConnectionWrapper.java:52: error: cannot find symbol
UsbInterface usbInterface;
^
symbol: class UsbInterface
location: class UsbDeviceConnectionWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbDeviceConnectionWrapper.java:137: error: cannot find symbol
public int BulkTransfer (UsbEndpoint Endpoint, byte[] Buffer, int Length, int Timeout) {
^
symbol: class UsbEndpoint
location: class UsbDeviceConnectionWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:231: error: cannot find symbol
public UsbInterface GetInterface(int Index) {
^
symbol: class UsbInterface
location: class UsbDeviceWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:324: error: cannot find symbol
UsbAccessory accessory;
^
symbol: class UsbAccessory
location: class UsbAccessoryWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:325: error: cannot find symbol
private ParcelFileDescriptor pfd;
^
symbol: class ParcelFileDescriptor
location: class UsbAccessoryWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\MtpDeviceWrapper.java:20: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbConstants;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\MtpDeviceWrapper.java:21: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDevice;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\MtpDeviceWrapper.java:22: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDeviceConnection;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\MtpDeviceWrapper.java:23: error: package android.mtp does not exist
import android.mtp.MtpDevice;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\MtpDeviceWrapper.java:24: error: package android.mtp does not exist
import android.mtp.MtpObjectInfo;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\MtpDeviceWrapper.java:25: error: package android.mtp does not exist
import android.mtp.MtpStorageInfo;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\MtpDeviceWrapper.java:31: error: cannot find symbol
public class MtpDeviceWrapper extends AbsObjectWrapper<MtpDevice>{
^
symbol: class MtpDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\MtpDeviceWrapper.java:32: error: cannot find symbol
public void Initialize(String EventName, UsbDevice UsbDevice) {
^
symbol: class UsbDevice
location: class MtpDeviceWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbDeviceConnectionWrapper.java:196: error: cannot find symbol
public static class UsbRequestWrapper extends AbsObjectWrapper<UsbRequest>{
^
symbol: class UsbRequest
location: class UsbDeviceConnectionWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbDeviceConnectionWrapper.java:202: error: cannot find symbol
public void Initialize(UsbDeviceConnectionWrapper Connection, UsbEndpoint Endpoint) {
^
symbol: class UsbEndpoint
location: class UsbRequestWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:275: error: cannot find symbol
public static class UsbEndpointWrapper extends AbsObjectWrapper<UsbEndpoint> {
^
symbol: class UsbEndpoint
location: class UsbManagerWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\anywheresoftware\b4a\objects\usb\UsbManagerWrapper.java:239: error: cannot find symbol
public static class UsbInterfaceWrapper extends AbsObjectWrapper<UsbInterface> {
^
symbol: class UsbInterface
location: class UsbManagerWrapper
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:9: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbConstants;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:10: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDevice;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:11: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDeviceConnection;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:12: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbEndpoint;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:13: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbInterface;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:14: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbRequest;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:15: error: package android.util does not exist
import android.util.Log;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:50: error: cannot find symbol
private UsbInterface mInterface;
^
symbol: class UsbInterface
location: class BLED112SerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:51: error: cannot find symbol
private UsbEndpoint inEndpoint;
^
symbol: class UsbEndpoint
location: class BLED112SerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:52: error: cannot find symbol
private UsbEndpoint outEndpoint;
^
symbol: class UsbEndpoint
location: class BLED112SerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:53: error: cannot find symbol
private UsbRequest requestIN;
^
symbol: class UsbRequest
location: class BLED112SerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:56: error: cannot find symbol
public BLED112SerialDevice(UsbDevice device, UsbDeviceConnection connection)
^
symbol: class UsbDevice
location: class BLED112SerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\BLED112SerialDevice.java:56: error: cannot find symbol
public BLED112SerialDevice(UsbDevice device, UsbDeviceConnection connection)
^
symbol: class UsbDeviceConnection
location: class BLED112SerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\CDCSerialDevice.java:9: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbConstants;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\CDCSerialDevice.java:10: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDevice;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\CDCSerialDevice.java:11: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbDeviceConnection;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\CDCSerialDevice.java:12: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbEndpoint;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\CDCSerialDevice.java:13: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbInterface;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\CDCSerialDevice.java:14: error: package android.hardware.usb does not exist
import android.hardware.usb.UsbRequest;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\CDCSerialDevice.java:15: error: package android.util does not exist
import android.util.Log;
^
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\CDCSerialDevice.java:49: error: cannot find symbol
private UsbInterface mInterface;
^
symbol: class UsbInterface
location: class CDCSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\CDCSerialDevice.java:50: error: cannot find symbol
private UsbEndpoint inEndpoint;
^
symbol: class UsbEndpoint
location: class CDCSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\CDCSerialDevice.java:51: error: cannot find symbol
private UsbEndpoint outEndpoint;
^
symbol: class UsbEndpoint
location: class CDCSerialDevice
C:\Users\pbjun\OneDrive\dev\b4a\projects\Libraries\Libraries\felUsbSerial\src\com\felhr\usbserial\CDCSerialDevice.java:52: error: cannot find symbol
private UsbRequest requestIN;
^
symbol: class UsbRequest
location: class CDCSerialDevice
java.lang.RuntimeException: Only one version is allowed.
at BADoclet.writeClass(BADoclet.java:69)
at BADoclet.start(BADoclet.java:415)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at jdk.javadoc/com.sun.tools.javadoc.main.DocletInvoker.invoke(DocletInvoker.java:333)
at jdk.javadoc/com.sun.tools.javadoc.main.DocletInvoker.start(DocletInvoker.java:212)
at jdk.javadoc/com.sun.tools.javadoc.main.Start.parseAndExecute(Start.java:446)
at jdk.javadoc/com.sun.tools.javadoc.main.Start.begin(Start.java:238)
at jdk.javadoc/com.sun.tools.javadoc.main.Start.begin(Start.java:224)
at jdk.javadoc/com.sun.tools.javadoc.Main.execute(Main.java:174)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:419)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:344)
at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
Error.
Starting step: Compiling Java code.
javac 1.8.0_401
An exception has occurred in the compiler (1.8.0_401). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.AssertionError: annotationType(): unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)
at com.sun.tools.javac.util.Assert.error(Assert.java:133)
at com.sun.tools.javac.code.TypeAnnotations.annotationType(TypeAnnotations.java:231)
at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.separateAnnotationsKinds(TypeAnnotations.java:294)
at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.visitMethodDef(TypeAnnotations.java:1063)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.scan(TypeAnnotations.java:275)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.visitClassDef(TypeAnnotations.java:1042)
at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:693)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.scan(TypeAnnotations.java:275)
at com.sun.tools.javac.code.TypeAnnotations$1.run(TypeAnnotations.java:127)
at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:152)
at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:129)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:512)
at com.sun.tools.javac.comp.Enter.main(Enter.java:471)
at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:982)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.main.Main.compile(Main.java:381)
at com.sun.tools.javac.main.Main.compile(Main.java:370)
at com.sun.tools.javac.main.Main.compile(Main.java:361)
at com.sun.tools.javac.Main.compile(Main.java:56)
at com.sun.tools.javac.Main.main(Main.java:42)
Error.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?