Serial OTG. Arduino CH340. FTDI. rkl099's Extension

I can't see any problem with the program. Tested with loop-back connection on the USB-Serial adapter and Byte, Hex sting and Byte List protocol. What I send will come back each time I press the Send button. Maybe it's on the receiving end?

1 Like

"SerialOTG.aia" is a good tutorial for me,
With the transmission of a single character, I did not experiment anymore.
Because, I began to use the WriteBytes block for this purpose. WriteBytes transmits the data I need, all at once in a packet.
Using the "SerialOTG.aix" extension,I am using an OTG cable.
now I can change JDY-41 settings, everything is working.
Many thanks to everyone for the tips, everything worked out.
Good luck everyone! :))

I have used this extension together with an esp32 for a long time, now I intend to replace it with an Arduino Giga but I am unable to send/receive data.
Is there a solution to be able to use my new Arduino? ?

Please check the VID PID for the Giga. Also check the driver needed. You will probably have to force the driver to CdcAcm. Use USBDriver(1) to force CdcAcm (see the documentation)

Hi kl099, thanks for your help!
Could you be more specific in your answer?
I don't know where to find the documentation and which parameters to change or even where they are located.

Just try using USBDriver in the extension (from version 1.5) and set the value to 1.

I'm using the blocks in this sequence, is this correct?
Immagine 2024-02-05 132855

I also tried your .aia (SerialOTG.aia) but I get the same error.

Selection of driver with USBDriver must be done before open

it does not work ! :pensive:

Hi Rolf. I remember that the Serial component was supposed to be updated with a new library. Did it come to fruition?

No, I have updated the Physicaloid library to make it work. Also done some refactoring to make it work together with the Physicaloid library included in MIT Appinventor.

I don't have access to this board, so I can't answer in detail.

Are you using the USB-C port for communication?
Do you have to do anything in the Arduino code to enable serial communication?
Are baudrate etc. the same for both boards?
What is the status after "open" in AI code (open,not open) or return value from the "open"?
Can you use the serial terminal app for communication?

Below are the steps performed:
Command--> USBdriver:(1)
results:
connected: false
isopen:false

Command--> initialize
results:
connected:false
isopen:false

Command--> SerialOTG open
results:
connected:true
isopen:true

Command--> 1)write data
results:
connected:true
isopen:true

Command--> 2)write data
results:
connected: true
èopen: true
I'm seeing an error
error 3209: error writing data to serial

I want to point out that the program on the Arduino is written correctly (I used a simple program for serial communication for Android "Serial USB Terminal").
P.S.
I use an sbc odroid and android version 9

You are writing that you use an odroid. Is this the ESP32 car that is working?
What serial connector are you using on the Giga?

Can you show us the relevant ai2 blocks?
Also read the driver name after Open() with DriverName() and put it in a label, so we can see what driver is selected.

Since it's not clear what serial-USB the Giga emulate or uses, you can try to select 'USDriver 1-5. This is normal.y selected by the VID/PID pair but it's not included in the extension.

OK, you are probably using an Odroid with android 8, and no phone for this test.
Is this setup the same that works wit ESP32?
The same USB port on the Odroid?
Connected to what port on the Giga?

The Serial USB terminal can probably give some device information about the connected device

I use the same configuration with esp32 and it worked. I'm connected to the USB-C port.
What information are we looking for?

Any information that helps to identify the problem.
What does work, what does not work. What is the configuration with ESP32. What is the configuration with the GIGA. Any USB-OTG adapters etc.