Is there a planned release date?
I need to change the Bluetooth for USB communication in a project and I do not know how to do this through another platform, like Android Studio. I had issues with the previous versions of the extension, the app never asks for permission to access the USB device. I’m testing with arduino UNO, but I intend to use another interface with the FT232RL chip, if it is successful.
Is there a planned release date?
I am also having trouble reading back and echo from the Arduino mega2560 I have connected.
@pavi2410 Do you have any workarounds to get the Arduino to be able to read in serial data reliably?
FYI, the .write command seems to work ok, but its hard to test without the return .read echo working.
com.pavitra.aix (131.8 KB)
Can you try this extension (version 5) in a separate project?
will test today and report back ASAP
I see the Blocks for calling .Open, .Close, .Initialize are updated to be a dependent function. How do you suggest calling them inside my Reset.Click function?
UPDATE: IT IS WORKING!!!
For anyone else wanting to see how I did it. I am using a Mega 2560 that when it receives a serial data it sends something back to the phone so we can tell that its changing each time. When i first start the app I occasionally have to plug/ unplug the USB cable and hit the reset button a few times before the “Allow this app to use this USB device” dialog pops up. After that is only a few more seconds until reading the serial connection begins returning valid and unique data from the phones queries
I’m new here, I used to work with arduino but now I want to plug an arduino to a tv box.
I tried with an old samsung S2 but not showing the message with " “Allow app … to access the USB device?”
I suppose it’s a little bit old. (Android 4.0.2) So I took a tablet more recent but not much (4.2.2), the program you post with AI2 and the last aix don’t work but when I use the app “Serial USB Terminal”, I can talk with my arduino (ch340).
It could be better with thunkable? I try directly on the tv box tomorrow, I’ll tell you.
Thanks for your work.
Did you set your USB to MTP mode from settings?
On 4.0.2 it should be under settings>storage> (triple dots on screen)> USB computer settings
Hi, I am new here, and I found your wonderful extension just today. I am a very lucky guy, since the just released version 5 is definitely working! Congratulations, @pavi2410!
Have you considered mimmicking the more traditional way to work with the serial port, namely in Arduino, and implement and event triggered when some data is available to receive? Instead of:
Arduino1.Read() — async —> Arduino1.AfterRead()
we would do
Arduino1.OnDataAvailable() —> Arduino1.Read()
I hope it makes sense…
Prior to version 5, Arduino Read method would return the string data, but after some requests, I changed it to return data from an event. This way the UI don’t get blocked.
I am having the same problem, when I plug the arduino, the message “Allow app … to access the USB device?” is not shown, even by plugging and unplugging several times and pressing the reset button.
When I plug the FTDI, the following message "Runtime Error
Failed resolution of: Lcom / ftdi / j2xx / D2xxManager; " is shown.
Do you have any tips on how to proceed?
(Forgive me for the mistakes in writing in English, I’m Brazilian by the way. I understand what I hear and read in English, but I have many troubles forming sentences to speak.)
Can this extension be used to read USB OTG flash drives ?
eg. I have a Sandisk 32gb USB OTG flash drive that I connect to my phone.
No, this extension cannot read USB flash drives
OK, thank you.
Does you library have the option to add chip sets to its list? I have this sensor, Tilt-50a that connects fine with other serial data reading android apps. But I’m assuming its not on the list of chip sets you have white listed because I get the:
“Runtime Error: com/physicaloid/lib/usb/driver/uart/UartFtdi - end application”
The sensor currently is spitting out data every 1 secs, at 115200 baud rate.
Sorry about that. But I can’t do anything for that, though I’ve already thought of changing the current Physicaloid library to this relatively newer library https://github.com/mik3y/usb-serial-for-android
From their README:
Serial chips: FT232R, CDC/ACM (eg Arduino Uno) and possibly others. See CompatibleSerialDevices.
Also they support this Probing for Unrecognized Devices. So it might be possible to support additional serial devices.
I just got an email back from the sensor manufacturer, confirming the serial chip is the FT232R.
What does it take to change the current library? If its possible for a 3rd party(ie, Github) to get your extension code and rework the library?
I think I should just open source the code.
First off Thanks Pavitra for even attempting this!! Been following this thread for awhile! I fully understand what your up against using the previous library in regards to chip drivers. I glanced at the library on github for usb-serial-for-android problem is I have no clue how to fold that into an extension.
If you made your code open source and had a brief tutorial on how to implement that in an extension that would be awesome! OR the community could help pay for your time for a full implementation. (seems like there is enough interest!) I for one would be willing to pay into that kitty!! Yours is the only one I’ve seen come close to working. I have a project that works with Bluetooth but it desperately needs a USB cable FTDI flavor solution that would work similar to the BluetoothClient extension of reading and writing blocks of text from a file. (Like the BluetoothClient.SendText and BluetoothClient.ReceiveText Blocks)
Beyond Arduino and Raspberry Pi, talking to servers or legacy equipment through serial would be a major win!!
Hi! You use abandoned variant Physicaloid library. Try this fork fixed for CH340G & works with FT232 too from [ideniden] (https://github.com/ideniden/PhysicaloidLibrary). It works good and stable on Android Studio App
with next USB-Serial (I checked it myself): FT232, CP2102 (ESP32), CH340G (Chinese Arduino Nano), CDC ACM STM32 (Stm32duino BluePill - need a little fix library). Hope it helps…