Hello,
This is my first post. What I am trying to accomplish at the moment
is enabling the use of a FTDI USB Serial Device converter with
Android. My final product will use USB communication to transmit/
receive data.
Here is my current issue...
It seems that usbserial.ko module is loaded with the kernel. When I
try to 'insmod' the module manually, I receive the following:
[code]
# insmod usbserial.ko
insmod: init_module 'usbserial.ko' failed (Invalid argument)
[/code]
'dmesg' shows:
[code]
<3>usbserial: module is already loaded
[/code]
That's all fine and dandy - it's already loaded. Next I load the FTDI
module for the converter:
[code]
# insmod ftdi_sio.ko
[/code]
dmesg shows:
[code]
<6>USB Serial support registered for FTDI USB Serial Device
<6>usbcore: registered new interface driver ftdi_sio
<6>ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver
[/code]
Again, perfect. This is what I would like to see. The problem lies
here, when I plug in the converter:
[code]
<6>usb 2-1: new full speed USB device using dwc_otg and address 4
<3>usb 2-1: device v0403 p6001 is not supported
<6>usb 2-1: configuration #1 chosen from 1 choice
<6>ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
<3>ftdi_sio 2-1:1.0: No more free serial devices
<4>ftdi_sio: probe of 2-1:1.0 failed with error -5
[/code]
It's nice to see that the device was recognized, but not so nice that
the kernel complains about having "No more free serial devices".
Using 'usbcomm', I am able to see that it is there:
[code]
# usbcomm
Dev #4: FTDI - USB HS SERIAL CONVERTER
Dev #1: Linux 2.6.29 ohci_hcd - TCC OHCI
[/code]
And with verbose output:
[code]
# usbcomm -v
Dev #4: FTDI - USB HS SERIAL CONVERTER
- Serial Number: FTEHLXG9
wTotalLength: 32
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: a0h
MaxPower: 22
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 255
bInterfaceSubClass: 255
bInterfaceProtocol: 255
iInterface: 2
bEndpointAddress: 81h
bmAttributes: 02h
wMaxPacketSize: 64
bInterval: 0
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 02h
bmAttributes: 02h
wMaxPacketSize: 64
bInterval: 0
bRefresh: 0
bSynchAddress: 0
Dev #1: 1D6B - 0002
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 4
bInterval: 12
bRefresh: 0
bSynchAddress: 0
Dev #1: Linux 2.6.29 ohci_hcd - TCC OHCI
- Serial Number: tcc
wTotalLength: 25
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: e0h
MaxPower: 0
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 9
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 2
bInterval: 255
bRefresh: 0
bSynchAddress: 0
[/code]
However, I am not given a ttySAC[x] nor a ttyUSB[x]. Looking at the
source, 'usbserial.c', I can see:
[code]
1044 if (get_free_serial(serial, num_ports, &minor) == NULL) {
1045 dev_err(&interface->dev, "No more free serial
devices\n");
1046 goto probe_error;
1047 }
1048 serial->minor = minor;
[/code]
Can anyone shed some light on this topic for me? When I plug in a USB
mouse, I am able to use it to navigate though menus and make
selections on mouse clicks. The output from 'logcat' when I plug in
my mouse is:
[code]
# E/EventHub( 842): could not get driver version for /dev/input/
mouse1, Not a typewriter
I/EventHub( 842): New device: path=/dev/input/event3 name=Logitech
USB-PS/2 Optical Mouse id=0x10003 (of 0x4) index=4 fd=109 classes=0x8
I/KeyInputQueue( 842): Device added: id=0x10003, name=Logitech USB-PS/
2 Optical Mouse, classes=8
I/XXW ( 842): readCalibrate!
I/XXW ( 842): readCalibrate done!
I/ActivityManager( 842): Config changed: { scale=1.0 imsi=0/0
loc=en_CA touch=3 keys=1/1/2 nav=3/1 orien=2 layout=34}
I/UsageStats( 842): Unexpected resume of com.android.launcher while
already resumed in com.android.launcher
E/EventHub( 842): could not get driver version for /dev/input/ts1,
Invalid argument
[/code]
And dmesg:
[code]
<6>usb 2-1: new low speed USB device using dwc_otg and address 5
<3>usb 2-1: device v046d pc00e is not supported
<6>usb 2-1: configuration #1 chosen from 1 choice
<6>input: Logitech USB-PS/2 Optical Mouse as /devices/platform/dwc_otg.
0/usb2/2-1/2-1:1.0/input/input3
<6>generic-usb 0003:046D:C00E.0001: input: USB HID v1.10 Mouse
[Logitech USB-PS/2 Optical Mouse] on usb-DWC OTG Controller-1/input0
[/code]
Also, USB-based keyboards allow input into EditText views (ie. Google
Search bar). So I guess my main question is what is restricting me
from adding an additional serial port? I can use the onboard UART for
serial communication without a hassle. I have tried 'mknod', but am
unsure as to the major/minor.
Any insight into this would be very much appreciated!
Thank you in advance,
sws-vinpa.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en