B4A Library UsbSerial library 2.0 - supports more devices

yo3ggx

Active Member
Licensed User
Longtime User
For reference: "Serial USB terminal" app has such devices filter:
I don't think that all of the devices from this list are supported by the USB Serial Library?
Is device filter relevant or required if you don't want to automatically start your app when a specific device is connected?

Dan
 

MarcoRome

Expert
Licensed User
Longtime User
Hi @agraham and thank you for this library.
I am using version 2.50 on an Android 14 device.
In manifest i have: android:targetSdkVersion="34"

With the following code:
B4X:
If usb.UsbPresent(1) = usb.USB_NONE Then    ' Ver_2.4
        Log("No device USB NONE")
        Return
    End If
    If (usb.HasPermission(1)) Then    ' Ver_2.4
              Log("Device Information USB" & CRLF & usb.DeviceInfo(1))
    Else
            Log("Error opening USB port 1")
            Log("**************" & CRLF & "ERROR OPENING USB PORT 1 STEP 2" &CRLF& "**************")
    End If
    Else
        usb.RequestPermission(1)  ' Ver_2.4
    End If

it gives me the following error:

Note: If I change Manifest to 33 everything works
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…