[Q] Looking for an easy to use USB serial communication library - Android Q&A, Help & Troubleshooting

I have an Ainol Novo 7 Paladin tablet running android ICS 4.0.3 (rooted) that I want to use in one of my projects. And I need it to communicate with an arduino - one with FTDI or prolific PL2303 serial interface. Now I know that the Paladin should work as an USB host but I need something more. I need an high level Java library that can use this serial interface. I've worked with rxtx on a desktop machine before and that is the most complicated that I would like to get. The main reason is that I simply don't have enough knowledge to write myself an serial driver. I just need a simple character based two way communication.
I've found this http://slickdevlabs.com/slick-usb-2-serial-library/ but I don't think that it will work for me - at least the test application doesn't since the Paladin has an Ingenic JZ4770 CPU that isn't ARM based. And the second problem - I don't like the price.

So I have made an USB OTG cable that is working - I can connect a mouse, keyboard, usb drive,... . Getting the serial interfaces working is another problem. When I plug the arduino with an PL-2303 controller to the tablet I get this (with dmesg):
Code:
USB AS HOST MODE
...
hub 1-0:1.0: unable to enumerate USB device on port 1
usb 1-1: new full speed USB device number 82 using musb-hdrc
usb 1-1: device v067b p2303 is not supported
we are entering usb_match_id!!!!!
Simillar with the arduino with FTDI controller.
As far as I know android should have the drivers for the PL-2303 and FTDI chips included. So any ideas?

Related

Adding a GPS USB Driver to Eken t01 ?

Good morning,
I've just got a Eken T01 Tablet (£80) bit of a bargain to be honest Anyway.....
I would like to add a usb gps driver to it. Now from what I understand I need a few things.
1. USB Host
2. USB Linux Drivers
3. Root
I have all three and the driver is a PL-2303 USB to Serial Driver. From what I can gather I need to put these c. files into a specific folder on my tablet and then edit a couple of files to load these drivers on startup ?
Am I going down the right root ? or completely off the mark ?
Any help would be great, I've tried to do alot of reading but not getting far really because most tablets either have built in gps or they dont normally have a host usb port.
If I'm just pointed in the right direction it will be a great help.
many thanks,
Steve
[update]
I've just found this on Prolific's site...
Linux Kernel 2.4.31 and above already includes built-in drivers for PL-2303H, PL-2303XA/HXA and PL-2303HXD.
NOTE: Google Android OS is also based on Linux kernel so it also supports PL2303.
does that mean it already has a driver installed and I'm just missing something ? How would I check ?
Thanks,
I think you'll need to install a kernel module. These are hard to compile since EKEN refuses to release their kernel source code. EKEN's response to my request:
"I’m afraid that we are not able to provide you the information you have requested. The information is regarded as strictly confidential."
I was able to compile an FTDI kerenel module for the EKEN T01 using the .config and php program provided on a post on slatedroid. Can't post a link, so google: "slatedroid Generic USB-Serial GPS HAL driver novo"
But it still doesn't recognize my FTDI device. I think there are some deeper problems with the USB host support on the device. Doesn't even recognize a simple HID device. I'm hoping if I update to the latest firmware it'll work.
robcb85 said:
I think you'll need to install a kernel module. These are hard to compile since EKEN refuses to release their kernel source code. EKEN's response to my request:
"I’m afraid that we are not able to provide you the information you have requested. The information is regarded as strictly confidential."
I was able to compile an FTDI kerenel module for the EKEN T01 using the .config and php program provided on a post on slatedroid. Can't post a link, so google: "slatedroid Generic USB-Serial GPS HAL driver novo"
But it still doesn't recognize my FTDI device. I think there are some deeper problems with the USB host support on the device. Doesn't even recognize a simple HID device. I'm hoping if I update to the latest firmware it'll work.
Click to expand...
Click to collapse
Thanks for the info fella... I've still been doing alot of googling and reading trying to get a little further.
I've attached a couple of .mo files.. I've tried to insmod them and they seem to go in fine.. but that's as far as I've got. :-(
I've installed a google pack so have gps locations tick box and navigator but it's not picking up anything.
When I do dmesg plugging / unplugging the usb gps it's just changing some port.. not loading the drivers as I would expect.
Any help would be greatly appreciated.
thanks
Steve
This is what I get on dmesg, not matter what I plug in:
Code:
<7>[ 245.190000] ehci_irq: port change detect
<7>[ 245.200000] ehci_irq: port change detect
<7>[ 245.380000] ehci_irq: port change detect
<7>[ 245.550000] ehci_irq: port change detect
<7>[ 245.550000] ohci_irq: connect status change
<7>[ 245.610000] The port change to OHCI now!
I assume you're using the USB Host port. Perhaps try an OTG cable connected to the USB Mini port. I don't have an OTG cable else I would.
The zip is corrupted after I download it. By .mo do you mean .ko?
robcb85 said:
This is what I get on dmesg, not matter what I plug in:
Code:
<7>[ 245.190000] ehci_irq: port change detect
<7>[ 245.200000] ehci_irq: port change detect
<7>[ 245.380000] ehci_irq: port change detect
<7>[ 245.550000] ehci_irq: port change detect
<7>[ 245.550000] ohci_irq: connect status change
<7>[ 245.610000] The port change to OHCI now!
I assume you're using the USB Host port. Perhaps try an OTG cable connected to the USB Mini port. I don't have an OTG cable else I would.
The zip is corrupted after I download it. By .mo do you mean .ko?
Click to expand...
Click to collapse
I've just purchased a normal usb to mini usb convertor lead so will give it ago when it arrives and let you know

[Q] Using USB Host API - cannot enumerate device

I am quite interested in usage USB host ability on my china no-name tablet based on Allwinner A13 CPU. I'd like to use it as GUI front-end for my embedded project with STM32F4 ARM microcotroller. So far I use laptop as the GUI for this device. STM32F4 is connected via USB as a vendor-specified device. I use WinUSB library on laptop to enumerate connected device and to open endpoints.
I'd like to use tablet instead of PC. So I looked to the USB host API on Android and tried to enumerate devices. However I couldn't enumerate any device - includes mouse or flash drive, which works perfectly in the system, but getDeviceList from UsbManager returns emtpy list.
I installed USB Host Diagnostics application and run a test. All results are yes, only items "Claims support" and "Device detected" in Android API shows no. But there's an item "Device detected" in Rooted API, which is yes.
I'm quite new to Andoroid developing. What is Rooted USB host API? How can I use it? Thank you for your answer.

[Q] Usb Ethernet Adapter (Driver Compile Requested For Money)

Greetings....
(This post is regarding my Nook Touch, however; as I believe the development setup is the same as a Nook Tablet, I am posting here also)
I am hoping to get my Asix Usb to Ethernet adapter working with my nook STG. I believe the only remaining requirement is to compile the drivers for it (which are android 2.x compatible according to the driver manufacturer website).
I am rooted and have 'usb host mode' successfully working.
When my adapter is plugged in, it displays as a 'connected device' in my Usb Host information app and shows the details; make/model etc - so its connected successfully.
It works plugnplay with my other droid devices, however in these devices there is an Asix driver folder in /sys/bus/usb/drivers and there is not in my Nook, thus I believe i simply need to compile the drivers which will create the Asix driver folder.
There are no errors displayed in Terminal Emulator after a typing "dmesg" once connected.
If you have the correct setup and can compile the drivers for me (and potentially other Nook users), i will exchange them for => 10GPB or 10 of your currency, via your desired means.
I was trying myself on an ubuntu vm in windows but have had to stop due to eye troubles; hence trying to use a Nook eink as my sole computer.
INFO:
Device: Nook STG firmware 1.21 - kernel source file link = images.barnesandnoble.com/PResources/download/Nook/source-code/nook2_1-2.tgz
Adapter Driver: Asix AX88772 - driver source file link = www.asix.com.tw/FrootAttach/driver/AX88772C_772B_772A_760_772_178_LINUX_Driver_v4.11.0_Source.tar.bz2
Adapter Info: BobjGear Adapter made for Android Tablets = www.amazon.co.uk/BobjGear-Ethernet-Exceptions-Description-Ultrabooks/dp/B007RTACDM
Other info: An XDA thread compiling the same drivers - http://forum.xda-developers.com/showthread.php?p=37548841
I don't know how to apply the drivers so I need to learn how to do so, I have ADB set up and have Noogie, CWM and NookManager .img also.
My Nook Touch thread - ]http://forum.xda-developers.com/showthread.php?t=2570149
Any other info needed i will provide
Sam

Mediatek mt6753 OTG support

Hi all,
I try to get USB-OTG support for my mt6753 phone running. Lots of websites show that the device should offer OTG support and you find several phones with this chipset having this option. I have a DOOGEE T3 that should have that, too.
But nothing happens when connecting different USB storages to the phone. Neither the device internal LEDs flashes nor kmsg / dmesg shows something USB related (phone is rooted).
I already ran several USB OTG checkers from google app store that added android usb host permissions in /etc/permissions in several xml files.
I also added the usb.host setting in build.prop and disabled the charger only option.
I also added a seperate USB power supply for definitively providing enough power for the USB storage. When using this additional cable the USB storage blinks twice but nothing happens on the phone.
There are a lot of items in /sys on the phone (e.g. usb20_host) that should point me to the capabilities for OTG.
I don't see a real "hardware" usb host controller in lsusb (like an uchi or ehci controller I know from Intel based systems) - only the "Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub"
How to proceed? If you need more information to determine the next steps, just let me know.
Best regards,
RX1901
Changing the cmode property to 2 (host mode only) causes some kernel debugging lines that state at the end "switch_int_to_host is done" but the "is_host" stays 0.
Am I on the right track?
After further checkings, it looks as if the usb20_otg_if is not compiled into the kernel. How can I add this? As a quick test a .ko file would be sufficient.
RX1901 said:
After further checkings, it looks as if the usb20_otg_if is not compiled into the kernel. How can I add this? As a quick test a .ko file would be sufficient.
Click to expand...
Click to collapse
Find a kernel source for your chip. However, I'm concerned about your phone not powering up the guest device. I think it should do that regardless of the driver. Is your OTG cable good? Proper cable should have OTG pin pulled to the ground on the phone's side and floating on the device's side.

USB Host - BEISTA K107

Hello
I've got my hand on a BEISTA K107, a low end Android tab with Android 10.0 on it.
I'm trying to setup a photobooth but the tablet do not detect my DSLR when I plug it in USB. The tablet is supposed to be OTG compatible but It seems that it's not usb host compatible
Any idea how to correct that ?
I've try rooting it without success
@zeph
Support for USB host and/or USB accessory modes are ultimately dependant on the device's hardware, regardless of Android platform level.

Categories

Resources