Serial OTG Port does not open Serial Port

It depends on the chip that controls the USB signal, I have several Chinese-made Arduinos with the CH340G and they work with this extension.

Hello Mr. @rkl099 , I used the extencion SerialOtg to work with Android 11; recently updated to Android 12 and the extension is broken. Get an Runtime error message indicating that the app must specify FLAG_IMMUTABLE when creating a PendingIntent. Hopefully you can update it?. It has been a very useful extension. Thanks very much.

Have you tried the updated version in GitHub - rkl099/Appinventor_Debug: Debug versions: SerialOTG, Modbus and test programs (Note: can be changed any time). ?
This version should work with Android12, but it also have some other small changes.
I don't have an Android12 device, so I have to wait for user response before I update the main directory.

1 Like

Thanks a lot!, it works with Android 12.

got the same issue, it wont open serial port, i used this solution but it didnt work..
got Android10,
using serialOTG.apk in the solution
but when i using the "serial usb terminal" application, i get a popup "do you want serial usb terminal have access to serialdevice?"... then i click yes and i can data coming to phone...

... not sure what i can do...

1 Like

I need more information to be able to help you:

The same issue as ...?
Can you describe what happens when you try to open the serial port?
What serial device are you using?
USB serial converter, Arduino original or Arduino clone or somthing else?
Can you get VID and PID for the device using windows device manager or Linux dmesg?

it wont open the port... i use serialotg.aix version 2022-11-05, importing(upgrading) into serialotg.aia project, build and installing .apk
the device i use is a serial device, seeedstudios XIAO
i guess this is VID/PID
image

i connect otg-cable with the XIAO
i start the serialotg application
then i try pressing "open", response is "not open" and no led indication it did work on the XIAO

i tried also this, according to .pdf

It has been reported that there is a difference in the behavior of SerialOTG and Serial USB
Terminal. This is because SerialOTG has DTR, RTS =0 as default (as AI built in component),
SerialTerminal has DTR, RTS =1. This may be set as a property or in the blocks before open.

but it does not response...

This VID/PID is not included in the library, but can be added.
Serial over USB uses USB CDC (reference Seeed Studio XIAO SAMD21 by Nanase - Seeed Wiki) but i don't know if this is included in the bootloader. Other references talk about FDDI, but this needs a separate chip or USB converter, so i guess that this is for the chips UART pins.
Can you see in the serial terminal if it uses CDC protocol?

I succeeded to communicate using "serial USB terminal" application with 9600baud/8bit/None/1stop bits with CDC protocol. I can then see tx-led flashing on the XIAO and read the values in the terminal.

OK. I will update the VID/PID list in the library soon.

1 Like

{2886, 802, 1};
i guess? :slightly_smiling_face:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

tried myself to add xiao samd21 but failed, could Serial OTG add support for this?

refrence

Just working on it. Try the new extension in the debug directory (not tested yet).

I've been having issues with this plugin trying to open a serial port. I cannot get any of my prolific usb-to-rs232 converters to work, but I wonder if that's down to pl2303 chipset versions, as there seem to be quite a few of them?

That aside, I can get my FTDI cable to work, but only if I let it automatically select the usb driver, If I tell it to use the ftdi driver, I get the following error. Is there a specific format you have to use to tell it to use a specific driver?

In the instructions pdf it says: Force driver 1=CdcAcm, 2=CH34x, 3=CP210x, 4=FTDI, 5=PL2303

But in the example AI project, the spinner options are: 0,cdcacm,ch34x,cp210x,ftdi,pl2303

I can't seem to specify any of these driver types and get it to work, it only opens if I let it do auto driver.

Any ideas please? Thank you!

The main use of “force driver” is if VID/PID has been reprogrammed so it’s not recognized by SerialOTG. Force driver=0, means auto selection of driver. (Could be clarified in documentation and example app) I have retested with my Pl2303 and FTDI, both with auto selection and forced driver and it seems to works ok. One note, if you make wrong selection you may have to restart the app, and sometimes even your device.

1 Like

Many thanks for the clarification. Is the driver type text case sensitive? Does it have to be FDTI or fdtp for example? Thank you :slight_smile:

PS. This is a great extension, thanks! :slight_smile:

Driver type is just a number, so use numbers 0..5
I will clarify the documentation

Documentation and example SerialOTG updated to clarify the use of Forcedriver.