Products for USB Sensing and Control
It is currently Fri May 24, 2013 7:22 am

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Sun Apr 01, 2012 9:46 am 
Offline
Phidgetsian

Joined: Sun Apr 01, 2012 9:39 am
Posts: 7
I understand that USB host mode is now supported on android 3.1 and above. Has anyone produced a simple android app that demonstrates that functionality? I'm working on how to create an app myself, but I have an opportunity to demonstrate it on Thursday, and I'm not going to get my own app working in time.

If not, I'll get another opportunity to do a demo in a months time, so if I get something working, I'll let you know, and post an update.


Top
 Profile Send private message  
 
PostPosted: Mon Apr 02, 2012 7:16 am 
Offline
Human-Cyborg Relations
User avatar

Joined: Tue Sep 27, 2011 2:37 pm
Posts: 324
Location: Calgary
We have one on the programming resources page under Android. There should be two, one of which uses webservice and the other uses USB.

http://www.phidgets.com/programming_resources.php

_________________
Brian Burley
403-282-7335 ext. 6003
support@phidgets.com


Top
 Profile Send private message  
 
PostPosted: Tue Apr 03, 2012 2:04 pm 
Offline
Phidgetsian

Joined: Sun Apr 01, 2012 9:39 am
Posts: 7
burley wrote:
We have one on the programming resources page under Android. There should be two, one of which uses webservice and the other uses USB.

http://www.phidgets.com/programming_resources.php


Yeah, I found it, and I'd hoped to reply to my message before someone else did :)

Got it all up and running in eclipse. My own project can't even see the phidgets library (class not found exception), and the phidgets project has a verify error. I didn't think it was going to be easy....


Top
 Profile Send private message  
 
PostPosted: Tue Apr 03, 2012 2:21 pm 
Offline
Phidgetsian

Joined: Sun Apr 01, 2012 9:39 am
Posts: 7
The problem that's tripping things for both my app and the phidgets demo app is this one:

04-03 20:07:35.145: I/dalvikvm(1102): Could not find method com.phidgets.usb.Manager.Initialize, referenced from method com.phidgets.InterfaceKitUSB.InterfaceKitUSBExampleActivity.onCreate

I'm guessing it's because I'm an eclipse newbie. I've probably added the jars wrong or something. Strangely it's happy to compile and build the apk though.


Top
 Profile Send private message  
 
PostPosted: Tue Apr 03, 2012 2:53 pm 
Offline
Phidgetsian

Joined: Sun Apr 01, 2012 9:39 am
Posts: 7
I've tried it in netbeans too, no luck. I can make an android app, but as soon as I do anything with phidgets, including importing the example project as per the instructions, it just can't find the Manager class.

Any help would be gratefully received!


Top
 Profile Send private message  
 
PostPosted: Wed Apr 04, 2012 11:43 am 
Offline
Phidgetsian

Joined: Sun Apr 01, 2012 9:39 am
Posts: 7
OK, problem solved. Libraries need to go in a libs directory to be deployed (a change in a recent development kit update)


Top
 Profile Send private message  
 
PostPosted: Wed Apr 04, 2012 2:38 pm 
Offline
Phidgetsian

Joined: Sun Apr 01, 2012 9:39 am
Posts: 7
Well, I can get it onto my tablet. I have a servo phidget, so I rewrote the interface phidget to do something with the servo phidget, but alas, nothing.

Am going to see if I can remotely debug it, to find out why not. I wasn't asked for permission to use usb on either my app or the phidgets demo app, so that worries me.


Top
 Profile Send private message  
 
PostPosted: Tue May 15, 2012 5:53 am 
Offline
Fresh meat

Joined: Tue May 15, 2012 5:46 am
Posts: 1
hi!.I tried running the example in my galaxy nexus but it does not work. I have a spatial Phidget and the web service works fine. I think that's a problem with the USB host that don´t detected the Phidget. Any ideas?

thanks


Top
 Profile Send private message  
 
PostPosted: Thu Jun 14, 2012 4:52 am 
Offline
Fresh meat

Joined: Thu Jun 14, 2012 4:42 am
Posts: 4
I'm trying to get the USB interface example running on my Galaxy Tab.

The device comes with a cable with a (presumably proprietary) connector at one end and a USB Type A plug at the other.

I'm using a USB cable kit to connect to the Phidget board. The hit has an adapter than has a female Type A connector at each end, so I plug the male USB connector from the tablet cable into that adapter and use a cable that has a male Type A at one end and a male Mini-A at the other, which I plug into the Phidget board.

I think a lot of those details don't matter, but I'm including as much info as possible to help track down the problem I'm having.

I build the app in Eclipse, having copied the jar files to the lib directory (thanks for the tip, by the way). Builds and runs fine.

However... in the app it says "Status: Detached", and all the other fields (Name, Serial Number, Version, Label) are all "Unk.".

I have no idea what the problem might be, hoping you'll have some suggestions.

Thanks in advance for any help.


Top
 Profile Send private message  
 
PostPosted: Thu Jun 14, 2012 5:07 am 
Offline
Fresh meat

Joined: Thu Jun 14, 2012 4:42 am
Posts: 4
Just a follow-up... I managed to find an A to mini-A adapter, so I've eliminated all the cables and other adapters. The USB cable from my tablet plugs into the adapter, into the Phidget board.

So I don't think it's a cable problem. I also checked logcat, and there are no error messages from the app.


Top
 Profile Send private message  
 
PostPosted: Thu Jun 14, 2012 9:15 am 
Offline
Lead Developer
User avatar

Joined: Mon Jun 20, 2005 8:46 am
Posts: 2351
Location: Canada
Are you sure you're running the usb host example and not the regular example?

What kind of Galaxy Tab do you have? Are you sure it supports USB Host? I know the Galaxy Tab 10.1 supports USB Host via an adapter, but this is from a dock connector -> USB Host. If you have a Galaxy Tab 7" - this doesn't support USB Host unless you hack it.

-Patrick


Top
 Profile Send private message  
 
PostPosted: Thu Jun 14, 2012 9:41 am 
Offline
Fresh meat

Joined: Thu Jun 14, 2012 4:42 am
Posts: 4
Yes, I'm definitely running the USB host example. I double-checked before posting. :-)

I'm using a Galaxy Tab 7.0 +, running Android 3.2.

Do you know what I need to do to hack it?


Top
 Profile Send private message  
 
PostPosted: Thu Jun 14, 2012 10:15 am 
Offline
Lead Developer
User avatar

Joined: Mon Jun 20, 2005 8:46 am
Posts: 2351
Location: Canada
The galaxy tab 7.0 plus supports USB host - but this is via an adapter: http://www.samsung.com/us/mobile/galaxy ... 1PL0BEGSTA

If you are trying to get USB host out via the USB-A - to USB-Host cable of some sort, this may be the problem.

-Patrick


Top
 Profile Send private message  
 
PostPosted: Thu Jun 14, 2012 11:02 am 
Offline
Fresh meat

Joined: Thu Jun 14, 2012 4:42 am
Posts: 4
Thanks, I'll give that a try. I'll let you know how it goes.


Top
 Profile Send private message  
 
PostPosted: Wed Jun 20, 2012 8:47 pm 
Offline
Fresh meat

Joined: Wed Jun 20, 2012 8:09 pm
Posts: 1
Hola no hablo ingles por lo que escribire en español y despues lo traducire ok.

Compre el PhidgetInterfaceKit 8/8/8 para adentrarme en el mundo de la programacion, he programado la i/o board en visual basic.net pero ahora me inerese por android hasi que me compre una tablet con puerto usb y android 4.0.3 http://articulo.mercadolibre.com.mx/MLM-403978702-tablet-pc-c91-hdmi-102-android-multitouch-capacitiva-_JM Imagen de sus puertos: http://www.itabletpcshop.com/image/data/product/10-zenithink-zt-280-c91-cortex-a9-3.jpg Pagina oficial: http://www.zenithink.com/Eproducts_C91.php

Pero hay un gran problema no se programar en android (java) apenas comencé con el típico "Hola mundo" asi que acudo al foro para saber como empezar a programar en la i/o board ya que tampoco no se que hacer con las librerias phidget21.jar y PhidgetsUSB.jar

Quisiera que subieran un codigo de ejemplo para saber mas o menos la estructura, saludos.


Hi do not speak English so I will write in Spanish and then translate it ok.

Buy PhidgetInterfaceKit 8/8/8 to dive into the world of programming, I programmed the i / o board in visual basic.net but now I inerese by android hasi to buy me a tablet with USB port and android 4.0.3 Picture of the ports: http://www.itabletpcshop.com/image/data/product/10-zenithink-zt-280-c91-cortex-a9-3.jpg Official site: http://www.zenithink.com/Eproducts_C91.php

But I have a big problem i not programming android (java) just started with the typical "Hello World" so I go to the forum for how to begin programming in the i/o board as either not to do with the libraries phidget21.jar and PhidgetsUSB.jar

I would like to go up a code sample to learn more or less the structure, greetings.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group