Using serial with FTDI

I have not tested this Arduino board. SerialOTG only supports Bluetooth classic (ver 3.0) and the Arduino seems to only support Ble. I don’t know if there is an Arduino library for Bt classic.

Serial over USB OTG (VID 2341) should work, but not tested.

1 Like

I have made an update of the extension SerialOTG to work with Android12. I don't have a device with Android12, so I have to ask someone else to test it. It's available at GitHub - rkl099/Appinventor_Debug: Debug versions: SerialOTG Add support for Android12. com.SerialOTG.aix
Please test it and report to me.

Hi, i have Android 12S (Galaxy21FE5G). The extension gives still an error: "Runtime Error Attempt to invoke virtual method 'boolean' on a null object reference"
Maybe this helps Johannes

What device are you trying to connect to?

It works! My device is an Arduino micro (ATmega32U4). But works only with connected device and at 2nd try. Without the device i got the error like my first answer. In older versions i got no error message without device.

my serial routine

With second try, do you mean that at first try you have to give permission to use the device and on second try you actually open the device?

I have made some changes to be able to include new vid/pid for new devices. I will look into the open without device error.

without device:
touch USB --> error message: "Runtime Error Attempt to invoke virtual method 'boolean' on a null object reference";
key serialUSB: disconnect, key driver: none

connect device --> message wich app should access to the device ? (have some serial terminal apps); key serialUSB: disconnect, key driver: none

ignore! but touch USB --> message goes away, but USB Button still black;
key serialUSB: disconnect, key driver: none

touch USB again --> message access to Arduino micro?; USB Button yellow;
key serialUSB: try again, key driver: none

quit message with OK --> nothing happens;
key serialUSB: try again, key driver: none

touch USB --> USB Button goes black;
key serialUSB: disconnect, key driver: none

touch USB --> USB Button goes yellow;
key serialUSB: connect, key driver: com.physical....CdcAcm

THEN ITS WORKING :slight_smile:

Here I can't imp
ort this extension (both production and test):

I have no problem to import in AI2 nb190a September 29, 2022. Don't know what the problem can be in the bugfixes version.

Also tested to import in the -bugfixes version without any problems.

Thanks Rolf @rkl099 .
You made me pull file again - different size, loads fine.
p.s. : one should pull file (git or download as zip) NOT try dowloading single file

Thanks again @rkl099 for fixing intent. Now I have same problem as @Johannes_Fritzsche described (here Samsung S21).
When Open method is invoked on unconnected usb cable it throws error (can't catch by Screen.ErrorOccured). Previously Open just returned 0.
I can't find a check method to invoke before Open so to avoid this problem but IMHO I liked better just returning 0 by Open.
Once I know this I will check if it survives disconnecting usb/serial cable...
Best regards and thanks for a great component Rolf and sorry for bothering you!

The original Physicaloid library checked the VID/PID in two programs. I made a change to have a single table define VID/PID and driver. This was an undetected side effect and will be corrected in the future.
It will be easier to include new PID/VID:s and if possible, include a function for user defined VID/PID/driver definition.

Thanks dear Rolf @rkl099 for the info but I'm afraid I's appreciate simpler version of answer:

  1. When to expect fix?
  2. Is there any workaround I can code?
    Regards kuba

No workaround but I have updated the extension to report "not open" if no USB device connected. The selection of driver is now in a single table, depending on VID or VID/PID. Tested with the USB devices I have. Please try it and report to me.

Works nice !
Thanks dear Rolf @rkl099 for your prompt fix and all the support.
Best regards, Kuba SP5NZF

Dear Rolf @rkl099 ,
I'm using 2022-10-19 version of OTGSerial (GitHub - rkl099/Appinventor_Debug: Debug versions: SerialOTG (Note: can be changed any time). Add support for Android12. Change USB device selection by VID or VID/PID to a single table)
Can I ask u a favor to tell me if/how it is possible to handle the the following Serial2USB dongle:

It is reported by my Win10 as : CH340K USB\VID_1A86&PID_7522&REV0264

It is labeled (just FYI I know it does not matter): LD-C100 USB TO CT-62 For Yaesu

This one does not show-up neither in my app nor in your test app (and is not listed in the main trunk)

Best regards, Kuba SP5NZF

VID 1a86, PID 7523 is included, but not PID 7522. I can include it next week. The final solution will be a way to open an USB device where you can specify VID/PID for a selected driver of those included in the library. Many USB devices can be reprogrammed with new VID/PID pair so I think this is the best solution.

Thanks a lot, will be waiting and will let u know test results.
The list of ids is great idea too.