Android Question USBSerial Library - Detected, but not functioning

The_YongGrand

Member
Licensed User
Longtime User
Hello there,

I've been experimenting with some USBSerial 2.0 (http://www.b4x.com/android/forum/threads/usbserial-library-2-0-supports-more-devices.28176/) libraries provided in the boards. I managed to get these little USB-Serial devices detected (the tablet found the device), but they aren't sending any data when I tapped "Send abcde". The TX LED on the device only lights up a short while on the first send, but not anymore afterwards.

The Logs bar said: "Error: (IOException) java.io.IOException: Error writing 5 bytes at offset 0 length=5".

What could be that problem? Opinions are welcome. :)

Included some more info:

USB-Serial adapter - Parallax Propeller "Prop Plug", using FTDI FT232RQ.
Tablet - Generic Q8-A13 (Allwinner A13 processor) rooted Android 4.0.4 and with manually included permissions.
 

DonManfred

Expert
Licensed User
Longtime User
maybe you need to export and zip your project and upload it here...
with the informations you provide it is hard to give advices.
 
Upvote 0

The_YongGrand

Member
Licensed User
Longtime User
I have used the examples provided in the USBSerial 2.0 and 2.4 respectively just to test whether the USB to Serial adapter is sending data or not. However, all it did was to send the log messages "Error: (IOException) java.io.IOException: Error writing 5 bytes at offset 0 length=5".
 
Upvote 0

The_YongGrand

Member
Licensed User
Longtime User
Do you know whether FT232RQ is the same as FT232R?

Actually from the datasheet, both of them are the same. FT232RQ is the QFN version of the FT232R, and both of them functions exactly the same.

Also, is it required to connect the extra signal pins like the DTR, DSR, RTS and CTS ones for this test?
 
Upvote 0

The_YongGrand

Member
Licensed User
Longtime User
Here's the full log, and I've added the "Data Sent" logs into it just for plain debugging purposes.

B4X:
(Intent) Intent { act=android.intent.action.MAIN flg=0x20000000 cmp=b4a.example1/.main }
no extras
START {act=android.intent.action.MAIN flg=0x30000000 cmp=b4a.example1/.main} from pid 2362
pckname = b4a.example1
** Activity (main) Pause, UserClosed = false **
Start proc b4a.example1 for activity b4a.example1/.main: pid=12846 uid=10065 gids={3003, 1015}
Flushing caches (mode 1)
Flushing caches (mode 0)
pckname = b4a.example1
loaded /system/lib/egl/libEGL_mali.so
loaded /system/lib/egl/libGLESv1_CM_mali.so
loaded /system/lib/egl/libGLESv2_mali.so
Enabling debug mode 0
pckname = b4a.example1
Sending signal. PID: 12846 SIG: 3
threadid=3: reacting to signal 3
Wrote stack traces to '/data/anr/traces.txt'
GC_CONCURRENT freed 110K, 3% free 6855K/7047K, paused 10ms+3ms
** Activity (main) Create, isFirst = true **
Sending signal. PID: 12846 SIG: 3
threadid=3: reacting to signal 3
Wrote stack traces to '/data/anr/traces.txt'
** Activity (main) Resume **
Flushing caches (mode 0)
Displayed b4a.example1/.main: +1s184ms
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@411d5b98
Checking permission 1
start_output_stream: card:0, port:0, rate:44100
close
pckname = b4a.example1
claimInterface 0 SUCCESS
Connected successfully! 1
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41303378
GC_CONCURRENT freed 244K, 5% free 7066K/7367K, paused 8ms+3ms
start_output_stream: card:0, port:0, rate:44100
Sending data!
Wrote amtWritten=5 attempted=5
FInished sending data
start_output_stream: card:0, port:0, rate:44100
Sending data!
Wrote amtWritten=5 attempted=5
FInished sending data
start_output_stream: card:0, port:0, rate:44100
Sending data!
Wrote amtWritten=5 attempted=5
FInished sending data

A few restarts of the debugging in the B4A and unplugging/plugging the adapter caused the program to work normally again, from the looks of the LED on the adapter. However, the receiving end (the computer with another usb to serial) is not getting anything. I should get the "abcde" in the HyperTerminal, right? :)
 
Upvote 0

The_YongGrand

Member
Licensed User
Longtime User
Thanks for the opinion, will try on some other tablet first. My other tablet is an Allwinner A20 one, which is a dual core version of the Allwinner A13.

Do you happened to have a list where the the tablets and its respective processor can be successfully used in the USBSerial library?
 
Upvote 0
Top