Re: [android-developers] USB host

2013-03-01 Thread Marta Ribeiro
Ok obrigada ;) farei isso.

On Friday, March 1, 2013 5:23:53 PM UTC, mbarbiero wrote:
>
> Sou brasileiro...
>
> No nosso grupo de desenvolvedores o pessoal que mais entende de USB é o 
> que usa Android para controlar o Arduino. Talvez seja melhor procurar uma 
> solução nos grupos do Arduino.
>
> Marco
> Em sexta-feira, 1 de março de 2013 08h48min14s UTC-3, Marta Ribeiro 
> escreveu:
>>
>> Yes yes, that was one of the first things I checked.
>>
>> Portuguese. 
>>
>> On Friday, March 1, 2013 11:20:06 AM UTC, mbarbiero wrote:
>>>
>>> You tried the process shown in 
>>> http://stackoverflow.com/questions/11183792/android-usb-host-and-hidden-devices
>>> ?
>>>
>>> One question more.. are you brazilian or portuguese?
>>>
>>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] USB host

2013-03-01 Thread mbarbiero
Sou brasileiro...

No nosso grupo de desenvolvedores o pessoal que mais entende de USB é o que 
usa Android para controlar o Arduino. Talvez seja melhor procurar uma 
solução nos grupos do Arduino.

Marco
Em sexta-feira, 1 de março de 2013 08h48min14s UTC-3, Marta Ribeiro 
escreveu:
>
> Yes yes, that was one of the first things I checked.
>
> Portuguese. 
>
> On Friday, March 1, 2013 11:20:06 AM UTC, mbarbiero wrote:
>>
>> You tried the process shown in 
>> http://stackoverflow.com/questions/11183792/android-usb-host-and-hidden-devices
>> ?
>>
>> One question more.. are you brazilian or portuguese?
>>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] USB host

2013-03-01 Thread Marta Ribeiro
Yes yes, that was one of the first things I checked.

Portuguese. 

On Friday, March 1, 2013 11:20:06 AM UTC, mbarbiero wrote:
>
> You tried the process shown in 
> http://stackoverflow.com/questions/11183792/android-usb-host-and-hidden-devices
> ?
>
> One question more.. are you brazilian or portuguese?
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] USB host

2013-03-01 Thread mbarbiero
You tried the process shown in 
http://stackoverflow.com/questions/11183792/android-usb-host-and-hidden-devices?

One question more.. are you brazilian or portuguese?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] USB host

2013-03-01 Thread Marta Ribeiro
Thank you that was exactly the problem. I tried a different sensor today 
and it worked. The purposed of the microstrain was for a project, but i'll 
use a different approach.

Thank you!

On Friday, March 1, 2013 8:24:14 AM UTC, al wrote:
>
> Yes, it may be. That indicates that the hardware (adapter etc.) is ok and 
> thus the device is recognized on the "linux"/os level but it's not made 
> visible on the level of the android USB-Host api (it's the same e.g. with 
> usb mice etc.). It may be that android tries to use it as some standard 
> rs232 hardware or as serial mouse or something. 
>
> That's probably also the reason why "Sick USB 2 Serial Terminal" does not 
> find your device: it's not visible on the api level.
>
> Like Tux, I would recommend using another kind of device too. The IOIO is 
> great, but depending on your use case, it may be overkill. There have been 
> other projects with usb 2 serial adapters. You may find recommendations via 
> Google.
>
> Am Donnerstag, 28. Februar 2013 15:05:24 UTC+1 schrieb Marta Ribeiro:
>>
>> Additionally, I just noticed something, the application presents two 
>> tabs: Android plus Linux. According to android i have no devices connected. 
>> Whereas in the linux tab i find my device. Is this indicative of something? 
>>
>> On Thursday, February 28, 2013 1:40:35 PM UTC, Marta Ribeiro wrote:
>>>
>>> Yes I can see my device. 
>>>
>>> regarding the device file, it is in decimal, which I've head is the 
>>> correct way. I've check the values with the output of the application and 
>>> after a conversion hexadecimal to decimal it's a match.
>>>
>>> Right now,I'm starting to thing the issue may be the usb.host 
>>> permission. Do you now if i'm missing something?
>>>  
>>> On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote:

 I would first check the hardware/cable etc. e.g. with the app "USB 
 Device Info" 
 https://play.google.com/store/apps/details?id=aws.apps.usbDeviceEnumerator

 If you can see your device in the android tab, then you are right and 
 it's a software issue. 

 I'm not sure about the device_filter.xml. Do you have to specifiy the 
 values in hex or decimal? The docu uses e.g. class="255" and does not use 
 a 
 hex-only digit. That looks to me like it could be decimal?


 Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta Ribeiro:
>
> I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable.
>
> Any help you can provide I would appreciate!
>
> On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:
>>
>> Hi,
>>
>> what kind of sensor are you using and what protocol (RS232, HID or 
>> plain USB) is used?
>> I played around with some RS232 devices. Perhaps I could find the 
>> example again.
>> Later I switched to a IOIO divice.
>>
>> Roy
>>
>> 2013/2/27 Marta Ribeiro 
>>
>>> I have the cables needed. I even installed an usb host app and it 
>>> worked correctly. now i'm trying to make my own application and it's 
>>> not 
>>> working, so it must be because of the code. Although i am writing it 
>>> exactly as it advised in tutorials.
>>>
>>>
>>> On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:
>>>
 Interesting.I don't know much about this but as at the same level 
 you are I would have checked first wether the Samsung Galaxy S3 has a 
 USB 
 OTG sw support or not.You can try this by inserting a USB keyboard 
 into it 
 or a Mouse and see whether it is working.
 I think it has : 
 *USB:*USB 2.0 client, 480Mbit/s
 micro-USB

 What you need is 

 *USB:*USB 2.0 host/client, 480Mbit/s
 USB A


 Rgds,
 -s


 On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro <
 martacunh...@gmail.com**> wrote:

> I'm using a Samsung Galaxy S3,and connecting to a sensor using USB 
> host and a OTG cable. I'm at the beginning phase just trying to write 
> code 
> to detect the sensor was attached  but it's not working. Can someone 
> take a 
> look and tell me what they think:
>
>
> protected void onCreate(Bundle savedInstanceState) {
> super.onCreate(**savedInstanceState);
> setContentView(R.layout.**activity_microstrain);
>  find_device = (EditText)findViewById(R.id.**find_device);
>   UsbManager manager = (UsbManager)getSystemService(**
> Context.USB_SERVICE); 
>
> //connect(); 
>
> HashMap deviceList = 
> manager.getDeviceList();
> Iterator deviceIterator = 
> deviceList.values().iterator()**;
>
>  while(deviceIterator.hasNext()**){
>
> UsbD

Re: [android-developers] USB host

2013-03-01 Thread al
Yes, it may be. That indicates that the hardware (adapter etc.) is ok and 
thus the device is recognized on the "linux"/os level but it's not made 
visible on the level of the android USB-Host api (it's the same e.g. with 
usb mice etc.). It may be that android tries to use it as some standard 
rs232 hardware or as serial mouse or something. 

That's probably also the reason why "Sick USB 2 Serial Terminal" does not 
find your device: it's not visible on the api level.

Like Tux, I would recommend using another kind of device too. The IOIO is 
great, but depending on your use case, it may be overkill. There have been 
other projects with usb 2 serial adapters. You may find recommendations via 
Google.

Am Donnerstag, 28. Februar 2013 15:05:24 UTC+1 schrieb Marta Ribeiro:
>
> Additionally, I just noticed something, the application presents two tabs: 
> Android plus Linux. According to android i have no devices connected. 
> Whereas in the linux tab i find my device. Is this indicative of something? 
>
> On Thursday, February 28, 2013 1:40:35 PM UTC, Marta Ribeiro wrote:
>>
>> Yes I can see my device. 
>>
>> regarding the device file, it is in decimal, which I've head is the 
>> correct way. I've check the values with the output of the application and 
>> after a conversion hexadecimal to decimal it's a match.
>>
>> Right now,I'm starting to thing the issue may be the usb.host permission. 
>> Do you now if i'm missing something?
>>  
>> On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote:
>>>
>>> I would first check the hardware/cable etc. e.g. with the app "USB 
>>> Device Info" 
>>> https://play.google.com/store/apps/details?id=aws.apps.usbDeviceEnumerator
>>>
>>> If you can see your device in the android tab, then you are right and 
>>> it's a software issue. 
>>>
>>> I'm not sure about the device_filter.xml. Do you have to specifiy the 
>>> values in hex or decimal? The docu uses e.g. class="255" and does not use a 
>>> hex-only digit. That looks to me like it could be decimal?
>>>
>>>
>>> Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta Ribeiro:

 I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable.

 Any help you can provide I would appreciate!

 On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:
>
> Hi,
>
> what kind of sensor are you using and what protocol (RS232, HID or 
> plain USB) is used?
> I played around with some RS232 devices. Perhaps I could find the 
> example again.
> Later I switched to a IOIO divice.
>
> Roy
>
> 2013/2/27 Marta Ribeiro 
>
>> I have the cables needed. I even installed an usb host app and it 
>> worked correctly. now i'm trying to make my own application and it's not 
>> working, so it must be because of the code. Although i am writing it 
>> exactly as it advised in tutorials.
>>
>>
>> On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:
>>
>>> Interesting.I don't know much about this but as at the same level 
>>> you are I would have checked first wether the Samsung Galaxy S3 has a 
>>> USB 
>>> OTG sw support or not.You can try this by inserting a USB keyboard into 
>>> it 
>>> or a Mouse and see whether it is working.
>>> I think it has : 
>>> *USB:*USB 2.0 client, 480Mbit/s
>>> micro-USB
>>>
>>> What you need is 
>>>
>>> *USB:*USB 2.0 host/client, 480Mbit/s
>>> USB A
>>>
>>>
>>> Rgds,
>>> -s
>>>
>>>
>>> On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro <
>>> martacunh...@gmail.com**> wrote:
>>>
 I'm using a Samsung Galaxy S3,and connecting to a sensor using USB 
 host and a OTG cable. I'm at the beginning phase just trying to write 
 code 
 to detect the sensor was attached  but it's not working. Can someone 
 take a 
 look and tell me what they think:


 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(**savedInstanceState);
 setContentView(R.layout.**activity_microstrain);
  find_device = (EditText)findViewById(R.id.**find_device);
   UsbManager manager = (UsbManager)getSystemService(**
 Context.USB_SERVICE); 

 //connect(); 

 HashMap deviceList = 
 manager.getDeviceList();
 Iterator deviceIterator = 
 deviceList.values().iterator()**;

  while(deviceIterator.hasNext()**){

 UsbDevice device = deviceIterator.next();
 Toast.makeText(this,"Value of device :" 
 +device.getDeviceName(), Toast.LENGTH_LONG).show();

 }


 %% manifest %%%

 
 http://schemas.**
 android.com/apk/res/android"
>>

Re: [android-developers] USB host

2013-02-28 Thread Tux Leonard
The IOIO device works in any case. And you can connect it via Bluetooth
(with a little try and error for the right BT dongle :-))

2013/3/1 Tux Leonard 

> Look for a device with a FTDI chip.
> You also could write your own Linux driver that supports your USB-RS232
> chip and then get it working in your phone. So a little try and error is
> much faster.
> When you've done this, you need to implement the serial protocol of your
> sensor.
>
> Is this sensor expensive?
>
> Roy
>
>
> 2013/2/28 Marta Ribeiro 
>
>> Yes I have tried and it works perfectly. The mouse and keyboard are
>> instantaneously operational.
>>
>> I'll try to find another USB-RS232 converter. But apart from
>> experimenting with them, which other way can I know if a cable is supported
>> by android/Linux?
>>
>> Thank you for your help!
>>
>>
>> On Thursday, February 28, 2013 10:46:14 PM UTC, Tux wrote:
>>
>>> This app can open a serial connection if a working USB-RS232 device is
>>> detected. The other app only shows the infos.
>>>
>>> Do you have an other USB-RS232 converter? This one is not supported by
>>> android/Linux.
>>> Just to make shure that your OTG cable is ok. Can you connect a USB
>>> mouse or keyboard to your S3?
>>>
>>> 2013/2/28 Marta Ribeiro 
>>>
>>> I can´t, with this app i get no device is connected. What would be the
 difference between this app and the last one?


 On Thursday, February 28, 2013 10:02:41 PM UTC, Tux wrote:

> I am a little confused that you can see your sensor device in the
> device info.
> When I look at the data sheet I see that your sensor has a RS232
> interface.
>
> In the device info you should see something about the USB-RS232
> converter (for example FTDIxxx) and not the sensor info.
>
> In my case I get the following output (USB-RS232 converter):
> [image: Screenshot_2013-02-28-22-51-33.png]
>
> Not all USB-RS232 are supported out of the box by android. If I
> remember right the FTDIxxx devices are supported well.
> A good app to get started is "Sick USB 2 Serial Terminal". Try to open
> a serial connection with this app first.
>
>
> [image: Screenshot_2013-02-28-22-53-21.png]
>
>
> 2013/2/28 Marta Ribeiro 
>
> I added the screenshots. As you can see, there is nothing on the
>> android tab, mas it detects the device on the Linux tab. The sensor is 
>> the
>> one described in one of the screenshots, is a microstrain 3DM-GX3-36. I
>> connect a RS232-USB A cable to the microstrain RS232 interface, and 
>> connect
>> the cable to a samsung galaxy S III (4.1.1) with a usb B/micro B cable.
>>
>> Do you have any idea what the issue might be? I appreciate all the
>> help.
>>
>>
>> On Thursday, February 28, 2013 7:25:45 PM UTC, Tux wrote:
>>
>>> Could you tell us what sensor and what RS232-USB device you are
>>> using?
>>> A scrennshot of the output of your app could also help.
>>>
>>> Roy
>>>
>>> 2013/2/28 Marta Ribeiro 
>>>
>>> Additionally, I just noticed something, the application presents two
 tabs: Android plus Linux. According to android i have no devices 
 connected.
 Whereas in the linux tab i find my device. Is this indicative of 
 something?


 On Thursday, February 28, 2013 1:40:35 PM UTC, Marta Ribeiro wrote:
>
> Yes I can see my device.
>
> regarding the device file, it is in decimal, which I've head is
> the correct way. I've check the values with the output of the 
> application
> and after a conversion hexadecimal to decimal it's a match.
>
> Right now,I'm starting to thing the issue may be the usb.host
> permission. Do you now if i'm missing something?
>
> On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote:
>>
>> I would first check the hardware/cable etc. e.g. with the app
>> "USB Device Info" https://play.google.com/store/
>> apps/details?id=aws.apps.**usbDe**viceEnumerator
>>
>> If you can see your device in the android tab, then you are right
>> and it's a software issue.
>>
>> I'm not sure about the device_filter.xml. Do you have to specifiy
>> the values in hex or decimal? The docu uses e.g. class="255" and 
>> does not
>> use a hex-only digit. That looks to me like it could be decimal?
>>
>>
>> Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta
>> Ribeiro:
>>>
>>> I am connecting the OTG micro B/USB B cable to an USB A/RS232
>>> cable.
>>>
>>> Any help you can provide I would appreciate!
>>>
>>> On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wro

Re: [android-developers] USB host

2013-02-28 Thread Tux Leonard
Look for a device with a FTDI chip.
You also could write your own Linux driver that supports your USB-RS232
chip and then get it working in your phone. So a little try and error is
much faster.
When you've done this, you need to implement the serial protocol of your
sensor.

Is this sensor expensive?

Roy

2013/2/28 Marta Ribeiro 

> Yes I have tried and it works perfectly. The mouse and keyboard are
> instantaneously operational.
>
> I'll try to find another USB-RS232 converter. But apart from experimenting
> with them, which other way can I know if a cable is supported
> by android/Linux?
>
> Thank you for your help!
>
>
> On Thursday, February 28, 2013 10:46:14 PM UTC, Tux wrote:
>
>> This app can open a serial connection if a working USB-RS232 device is
>> detected. The other app only shows the infos.
>>
>> Do you have an other USB-RS232 converter? This one is not supported by
>> android/Linux.
>> Just to make shure that your OTG cable is ok. Can you connect a USB mouse
>> or keyboard to your S3?
>>
>> 2013/2/28 Marta Ribeiro 
>>
>> I can´t, with this app i get no device is connected. What would be the
>>> difference between this app and the last one?
>>>
>>>
>>> On Thursday, February 28, 2013 10:02:41 PM UTC, Tux wrote:
>>>
 I am a little confused that you can see your sensor device in the
 device info.
 When I look at the data sheet I see that your sensor has a RS232
 interface.

 In the device info you should see something about the USB-RS232
 converter (for example FTDIxxx) and not the sensor info.

 In my case I get the following output (USB-RS232 converter):
 [image: Screenshot_2013-02-28-22-51-33.png]

 Not all USB-RS232 are supported out of the box by android. If I
 remember right the FTDIxxx devices are supported well.
 A good app to get started is "Sick USB 2 Serial Terminal". Try to open
 a serial connection with this app first.


 [image: Screenshot_2013-02-28-22-53-21.png]


 2013/2/28 Marta Ribeiro 

 I added the screenshots. As you can see, there is nothing on the
> android tab, mas it detects the device on the Linux tab. The sensor is the
> one described in one of the screenshots, is a microstrain 3DM-GX3-36. I
> connect a RS232-USB A cable to the microstrain RS232 interface, and 
> connect
> the cable to a samsung galaxy S III (4.1.1) with a usb B/micro B cable.
>
> Do you have any idea what the issue might be? I appreciate all the
> help.
>
>
> On Thursday, February 28, 2013 7:25:45 PM UTC, Tux wrote:
>
>> Could you tell us what sensor and what RS232-USB device you are using?
>> A scrennshot of the output of your app could also help.
>>
>> Roy
>>
>> 2013/2/28 Marta Ribeiro 
>>
>> Additionally, I just noticed something, the application presents two
>>> tabs: Android plus Linux. According to android i have no devices 
>>> connected.
>>> Whereas in the linux tab i find my device. Is this indicative of 
>>> something?
>>>
>>>
>>> On Thursday, February 28, 2013 1:40:35 PM UTC, Marta Ribeiro wrote:

 Yes I can see my device.

 regarding the device file, it is in decimal, which I've head is the
 correct way. I've check the values with the output of the application 
 and
 after a conversion hexadecimal to decimal it's a match.

 Right now,I'm starting to thing the issue may be the usb.host
 permission. Do you now if i'm missing something?

 On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote:
>
> I would first check the hardware/cable etc. e.g. with the app "USB
> Device Info" https://play.google.com/store/
> apps/details?id=aws.apps.**usbDe**viceEnumerator
>
> If you can see your device in the android tab, then you are right
> and it's a software issue.
>
> I'm not sure about the device_filter.xml. Do you have to specifiy
> the values in hex or decimal? The docu uses e.g. class="255" and does 
> not
> use a hex-only digit. That looks to me like it could be decimal?
>
>
> Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta
> Ribeiro:
>>
>> I am connecting the OTG micro B/USB B cable to an USB A/RS232
>> cable.
>>
>> Any help you can provide I would appreciate!
>>
>> On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:
>>>
>>> Hi,
>>>
>>> what kind of sensor are you using and what protocol (RS232, HID
>>> or plain USB) is used?
>>> I played around with some RS232 devices. Perhaps I could find
>>> the example again.
>>> Later I switched to a IOIO divice.

Re: [android-developers] USB host

2013-02-28 Thread Marta Ribeiro
Yes I have tried and it works perfectly. The mouse and keyboard are 
instantaneously operational.

I'll try to find another USB-RS232 converter. But apart from experimenting 
with them, which other way can I know if a cable is supported 
by android/Linux?

Thank you for your help!

On Thursday, February 28, 2013 10:46:14 PM UTC, Tux wrote:
>
> This app can open a serial connection if a working USB-RS232 device is 
> detected. The other app only shows the infos.
>
> Do you have an other USB-RS232 converter? This one is not supported by 
> android/Linux.
> Just to make shure that your OTG cable is ok. Can you connect a USB mouse 
> or keyboard to your S3?
>
> 2013/2/28 Marta Ribeiro >
>
>> I can´t, with this app i get no device is connected. What would be the 
>> difference between this app and the last one?
>>
>>
>> On Thursday, February 28, 2013 10:02:41 PM UTC, Tux wrote:
>>
>>> I am a little confused that you can see your sensor device in the device 
>>> info.
>>> When I look at the data sheet I see that your sensor has a RS232 
>>> interface. 
>>>
>>> In the device info you should see something about the USB-RS232 
>>> converter (for example FTDIxxx) and not the sensor info.
>>>
>>> In my case I get the following output (USB-RS232 converter):
>>> [image: Screenshot_2013-02-28-22-51-33.png]
>>>
>>> Not all USB-RS232 are supported out of the box by android. If I remember 
>>> right the FTDIxxx devices are supported well.
>>> A good app to get started is "Sick USB 2 Serial Terminal". Try to open a 
>>> serial connection with this app first.
>>>
>>>
>>> [image: Screenshot_2013-02-28-22-53-21.png]
>>>
>>>
>>> 2013/2/28 Marta Ribeiro 
>>>
>>> I added the screenshots. As you can see, there is nothing on the android 
 tab, mas it detects the device on the Linux tab. The sensor is the one 
 described in one of the screenshots, is a microstrain 3DM-GX3-36. I 
 connect 
 a RS232-USB A cable to the microstrain RS232 interface, and connect the 
 cable to a samsung galaxy S III (4.1.1) with a usb B/micro B cable.

 Do you have any idea what the issue might be? I appreciate all the help.


 On Thursday, February 28, 2013 7:25:45 PM UTC, Tux wrote:

> Could you tell us what sensor and what RS232-USB device you are using?
> A scrennshot of the output of your app could also help.
>
> Roy
>
> 2013/2/28 Marta Ribeiro 
>
> Additionally, I just noticed something, the application presents two 
>> tabs: Android plus Linux. According to android i have no devices 
>> connected. 
>> Whereas in the linux tab i find my device. Is this indicative of 
>> something? 
>>
>>
>> On Thursday, February 28, 2013 1:40:35 PM UTC, Marta Ribeiro wrote:
>>>
>>> Yes I can see my device. 
>>>
>>> regarding the device file, it is in decimal, which I've head is the 
>>> correct way. I've check the values with the output of the application 
>>> and 
>>> after a conversion hexadecimal to decimal it's a match.
>>>
>>> Right now,I'm starting to thing the issue may be the usb.host 
>>> permission. Do you now if i'm missing something?
>>>  
>>> On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote:

 I would first check the hardware/cable etc. e.g. with the app "USB 
 Device Info" https://play.google.com/store/**
 apps/details?id=aws.apps.**usbDeviceEnumerator

 If you can see your device in the android tab, then you are right 
 and it's a software issue. 

 I'm not sure about the device_filter.xml. Do you have to specifiy 
 the values in hex or decimal? The docu uses e.g. class="255" and does 
 not 
 use a hex-only digit. That looks to me like it could be decimal?


 Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta 
 Ribeiro:
>
> I am connecting the OTG micro B/USB B cable to an USB A/RS232 
> cable.
>
> Any help you can provide I would appreciate!
>
> On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:
>>
>> Hi,
>>
>> what kind of sensor are you using and what protocol (RS232, HID 
>> or plain USB) is used?
>> I played around with some RS232 devices. Perhaps I could find the 
>> example again.
>> Later I switched to a IOIO divice.
>>
>> Roy
>>
>> 2013/2/27 Marta Ribeiro 
>>
>>> I have the cables needed. I even installed an usb host app and 
>>> it worked correctly. now i'm trying to make my own application and 
>>> it's not 
>>> working, so it must be because of the code. Although i am writing 
>>> it 
>>> exactly as it advised in tutorials.
>>>
>>>
>

Re: [android-developers] USB host

2013-02-28 Thread Tux Leonard
This app can open a serial connection if a working USB-RS232 device is
detected. The other app only shows the infos.

Do you have an other USB-RS232 converter? This one is not supported by
android/Linux.
Just to make shure that your OTG cable is ok. Can you connect a USB mouse
or keyboard to your S3?

2013/2/28 Marta Ribeiro 

> I can´t, with this app i get no device is connected. What would be the
> difference between this app and the last one?
>
>
> On Thursday, February 28, 2013 10:02:41 PM UTC, Tux wrote:
>
>> I am a little confused that you can see your sensor device in the device
>> info.
>> When I look at the data sheet I see that your sensor has a RS232
>> interface.
>>
>> In the device info you should see something about the USB-RS232 converter
>> (for example FTDIxxx) and not the sensor info.
>>
>> In my case I get the following output (USB-RS232 converter):
>> [image: Screenshot_2013-02-28-22-51-33.png]
>>
>> Not all USB-RS232 are supported out of the box by android. If I remember
>> right the FTDIxxx devices are supported well.
>> A good app to get started is "Sick USB 2 Serial Terminal". Try to open a
>> serial connection with this app first.
>>
>>
>> [image: Screenshot_2013-02-28-22-53-21.png]
>>
>>
>> 2013/2/28 Marta Ribeiro 
>>
>> I added the screenshots. As you can see, there is nothing on the android
>>> tab, mas it detects the device on the Linux tab. The sensor is the one
>>> described in one of the screenshots, is a microstrain 3DM-GX3-36. I connect
>>> a RS232-USB A cable to the microstrain RS232 interface, and connect the
>>> cable to a samsung galaxy S III (4.1.1) with a usb B/micro B cable.
>>>
>>> Do you have any idea what the issue might be? I appreciate all the help.
>>>
>>>
>>> On Thursday, February 28, 2013 7:25:45 PM UTC, Tux wrote:
>>>
 Could you tell us what sensor and what RS232-USB device you are using?
 A scrennshot of the output of your app could also help.

 Roy

 2013/2/28 Marta Ribeiro 

 Additionally, I just noticed something, the application presents two
> tabs: Android plus Linux. According to android i have no devices 
> connected.
> Whereas in the linux tab i find my device. Is this indicative of 
> something?
>
>
> On Thursday, February 28, 2013 1:40:35 PM UTC, Marta Ribeiro wrote:
>>
>> Yes I can see my device.
>>
>> regarding the device file, it is in decimal, which I've head is the
>> correct way. I've check the values with the output of the application and
>> after a conversion hexadecimal to decimal it's a match.
>>
>> Right now,I'm starting to thing the issue may be the usb.host
>> permission. Do you now if i'm missing something?
>>
>> On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote:
>>>
>>> I would first check the hardware/cable etc. e.g. with the app "USB
>>> Device Info" https://play.google.com/store/**
>>> apps/details?id=aws.apps.**usbDeviceEnumerator
>>>
>>> If you can see your device in the android tab, then you are right
>>> and it's a software issue.
>>>
>>> I'm not sure about the device_filter.xml. Do you have to specifiy
>>> the values in hex or decimal? The docu uses e.g. class="255" and does 
>>> not
>>> use a hex-only digit. That looks to me like it could be decimal?
>>>
>>>
>>> Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta Ribeiro:

 I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable.

 Any help you can provide I would appreciate!

 On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:
>
> Hi,
>
> what kind of sensor are you using and what protocol (RS232, HID or
> plain USB) is used?
> I played around with some RS232 devices. Perhaps I could find the
> example again.
> Later I switched to a IOIO divice.
>
> Roy
>
> 2013/2/27 Marta Ribeiro 
>
>> I have the cables needed. I even installed an usb host app and it
>> worked correctly. now i'm trying to make my own application and it's 
>> not
>> working, so it must be because of the code. Although i am writing it
>> exactly as it advised in tutorials.
>>
>>
>> On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:
>>
>>> Interesting.I don't know much about this but as at the same
>>> level you are I would have checked first wether the Samsung Galaxy 
>>> S3 has a
>>> USB OTG sw support or not.You can try this by inserting a USB 
>>> keyboard into
>>> it or a Mouse and see whether it is working.
>>> I think it has :
>>> *USB:*USB 2.0 client, 480Mbit/s
>>> micro-USB
>>>
>>> What you need is
>

Re: [android-developers] USB host

2013-02-28 Thread Marta Ribeiro
I can´t, with this app i get no device is connected. What would be the 
difference between this app and the last one?

On Thursday, February 28, 2013 10:02:41 PM UTC, Tux wrote:
>
> I am a little confused that you can see your sensor device in the device 
> info.
> When I look at the data sheet I see that your sensor has a RS232 
> interface. 
>
> In the device info you should see something about the USB-RS232 converter 
> (for example FTDIxxx) and not the sensor info.
>
> In my case I get the following output (USB-RS232 converter):
> [image: Screenshot_2013-02-28-22-51-33.png]
>
> Not all USB-RS232 are supported out of the box by android. If I remember 
> right the FTDIxxx devices are supported well.
> A good app to get started is "Sick USB 2 Serial Terminal". Try to open a 
> serial connection with this app first.
>
>
> [image: Screenshot_2013-02-28-22-53-21.png]
>
>
> 2013/2/28 Marta Ribeiro >
>
>> I added the screenshots. As you can see, there is nothing on the android 
>> tab, mas it detects the device on the Linux tab. The sensor is the one 
>> described in one of the screenshots, is a microstrain 3DM-GX3-36. I connect 
>> a RS232-USB A cable to the microstrain RS232 interface, and connect the 
>> cable to a samsung galaxy S III (4.1.1) with a usb B/micro B cable.
>>
>> Do you have any idea what the issue might be? I appreciate all the help.
>>
>>
>> On Thursday, February 28, 2013 7:25:45 PM UTC, Tux wrote:
>>
>>> Could you tell us what sensor and what RS232-USB device you are using?
>>> A scrennshot of the output of your app could also help.
>>>
>>> Roy
>>>
>>> 2013/2/28 Marta Ribeiro 
>>>
>>> Additionally, I just noticed something, the application presents two 
 tabs: Android plus Linux. According to android i have no devices 
 connected. 
 Whereas in the linux tab i find my device. Is this indicative of 
 something? 


 On Thursday, February 28, 2013 1:40:35 PM UTC, Marta Ribeiro wrote:
>
> Yes I can see my device. 
>
> regarding the device file, it is in decimal, which I've head is the 
> correct way. I've check the values with the output of the application and 
> after a conversion hexadecimal to decimal it's a match.
>
> Right now,I'm starting to thing the issue may be the usb.host 
> permission. Do you now if i'm missing something?
>  
> On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote:
>>
>> I would first check the hardware/cable etc. e.g. with the app "USB 
>> Device Info" https://play.google.com/store/
>> apps/details?id=aws.apps.**usbDe**viceEnumerator
>>
>> If you can see your device in the android tab, then you are right and 
>> it's a software issue. 
>>
>> I'm not sure about the device_filter.xml. Do you have to specifiy the 
>> values in hex or decimal? The docu uses e.g. class="255" and does not 
>> use a 
>> hex-only digit. That looks to me like it could be decimal?
>>
>>
>> Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta Ribeiro:
>>>
>>> I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable.
>>>
>>> Any help you can provide I would appreciate!
>>>
>>> On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:

 Hi,

 what kind of sensor are you using and what protocol (RS232, HID or 
 plain USB) is used?
 I played around with some RS232 devices. Perhaps I could find the 
 example again.
 Later I switched to a IOIO divice.

 Roy

 2013/2/27 Marta Ribeiro 

> I have the cables needed. I even installed an usb host app and it 
> worked correctly. now i'm trying to make my own application and it's 
> not 
> working, so it must be because of the code. Although i am writing it 
> exactly as it advised in tutorials.
>
>
> On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:
>
>> Interesting.I don't know much about this but as at the same level 
>> you are I would have checked first wether the Samsung Galaxy S3 has 
>> a USB 
>> OTG sw support or not.You can try this by inserting a USB keyboard 
>> into it 
>> or a Mouse and see whether it is working.
>> I think it has : 
>> *USB:*USB 2.0 client, 480Mbit/s
>> micro-USB
>>
>> What you need is 
>>
>> *USB:*USB 2.0 host/client, 480Mbit/s
>> USB A
>>
>>
>> Rgds,
>> -s
>>
>>
>> On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro <
>> martacunh...@gmail.com**> wrote:
>>
>>> I'm using a Samsung Galaxy S3,and connecting to a sensor using 
>>> USB host and a OTG cable. I'm at the beginning phase just trying to 

Re: [android-developers] USB host

2013-02-28 Thread Tux Leonard
I am a little confused that you can see your sensor device in the device
info.
When I look at the data sheet I see that your sensor has a RS232 interface.

In the device info you should see something about the USB-RS232 converter
(for example FTDIxxx) and not the sensor info.

In my case I get the following output (USB-RS232 converter):
[image: Screenshot_2013-02-28-22-51-33.png]

Not all USB-RS232 are supported out of the box by android. If I remember
right the FTDIxxx devices are supported well.
A good app to get started is "Sick USB 2 Serial Terminal". Try to open a
serial connection with this app first.


[image: Screenshot_2013-02-28-22-53-21.png]


2013/2/28 Marta Ribeiro 

> I added the screenshots. As you can see, there is nothing on the android
> tab, mas it detects the device on the Linux tab. The sensor is the one
> described in one of the screenshots, is a microstrain 3DM-GX3-36. I connect
> a RS232-USB A cable to the microstrain RS232 interface, and connect the
> cable to a samsung galaxy S III (4.1.1) with a usb B/micro B cable.
>
> Do you have any idea what the issue might be? I appreciate all the help.
>
>
> On Thursday, February 28, 2013 7:25:45 PM UTC, Tux wrote:
>
>> Could you tell us what sensor and what RS232-USB device you are using?
>> A scrennshot of the output of your app could also help.
>>
>> Roy
>>
>> 2013/2/28 Marta Ribeiro 
>>
>> Additionally, I just noticed something, the application presents two
>>> tabs: Android plus Linux. According to android i have no devices connected.
>>> Whereas in the linux tab i find my device. Is this indicative of something?
>>>
>>>
>>> On Thursday, February 28, 2013 1:40:35 PM UTC, Marta Ribeiro wrote:

 Yes I can see my device.

 regarding the device file, it is in decimal, which I've head is the
 correct way. I've check the values with the output of the application and
 after a conversion hexadecimal to decimal it's a match.

 Right now,I'm starting to thing the issue may be the usb.host
 permission. Do you now if i'm missing something?

 On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote:
>
> I would first check the hardware/cable etc. e.g. with the app "USB
> Device Info" https://play.google.com/store/
> apps/details?id=aws.apps.**usbDe**viceEnumerator
>
> If you can see your device in the android tab, then you are right and
> it's a software issue.
>
> I'm not sure about the device_filter.xml. Do you have to specifiy the
> values in hex or decimal? The docu uses e.g. class="255" and does not use 
> a
> hex-only digit. That looks to me like it could be decimal?
>
>
> Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta Ribeiro:
>>
>> I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable.
>>
>> Any help you can provide I would appreciate!
>>
>> On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:
>>>
>>> Hi,
>>>
>>> what kind of sensor are you using and what protocol (RS232, HID or
>>> plain USB) is used?
>>> I played around with some RS232 devices. Perhaps I could find the
>>> example again.
>>> Later I switched to a IOIO divice.
>>>
>>> Roy
>>>
>>> 2013/2/27 Marta Ribeiro 
>>>
 I have the cables needed. I even installed an usb host app and it
 worked correctly. now i'm trying to make my own application and it's 
 not
 working, so it must be because of the code. Although i am writing it
 exactly as it advised in tutorials.


 On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:

> Interesting.I don't know much about this but as at the same level
> you are I would have checked first wether the Samsung Galaxy S3 has a 
> USB
> OTG sw support or not.You can try this by inserting a USB keyboard 
> into it
> or a Mouse and see whether it is working.
> I think it has :
> *USB:*USB 2.0 client, 480Mbit/s
> micro-USB
>
> What you need is
>
> *USB:*USB 2.0 host/client, 480Mbit/s
> USB A
>
>
> Rgds,
> -s
>
>
> On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro <
> martacunh...@gmail.com**> wrote:
>
>> I'm using a Samsung Galaxy S3,and connecting to a sensor using
>> USB host and a OTG cable. I'm at the beginning phase just trying to 
>> write
>> code to detect the sensor was attached  but it's not working. Can 
>> someone
>> take a look and tell me what they think:
>>
>>
>> protected void onCreate(Bundle savedInstanceState) {
>> super.onCreate(**savedInstanceState);
>> setContentView(R.layout.**activity_microstrain

Re: [android-developers] USB host

2013-02-28 Thread Tux Leonard
Could you tell us what sensor and what RS232-USB device you are using?
A scrennshot of the output of your app could also help.

Roy

2013/2/28 Marta Ribeiro 

> Additionally, I just noticed something, the application presents two tabs:
> Android plus Linux. According to android i have no devices connected.
> Whereas in the linux tab i find my device. Is this indicative of something?
>
>
> On Thursday, February 28, 2013 1:40:35 PM UTC, Marta Ribeiro wrote:
>>
>> Yes I can see my device.
>>
>> regarding the device file, it is in decimal, which I've head is the
>> correct way. I've check the values with the output of the application and
>> after a conversion hexadecimal to decimal it's a match.
>>
>> Right now,I'm starting to thing the issue may be the usb.host permission.
>> Do you now if i'm missing something?
>>
>> On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote:
>>>
>>> I would first check the hardware/cable etc. e.g. with the app "USB
>>> Device Info" https://play.google.com/store/**apps/details?id=aws.apps.**
>>> usbDeviceEnumerator
>>>
>>> If you can see your device in the android tab, then you are right and
>>> it's a software issue.
>>>
>>> I'm not sure about the device_filter.xml. Do you have to specifiy the
>>> values in hex or decimal? The docu uses e.g. class="255" and does not use a
>>> hex-only digit. That looks to me like it could be decimal?
>>>
>>>
>>> Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta Ribeiro:

 I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable.

 Any help you can provide I would appreciate!

 On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:
>
> Hi,
>
> what kind of sensor are you using and what protocol (RS232, HID or
> plain USB) is used?
> I played around with some RS232 devices. Perhaps I could find the
> example again.
> Later I switched to a IOIO divice.
>
> Roy
>
> 2013/2/27 Marta Ribeiro 
>
>> I have the cables needed. I even installed an usb host app and it
>> worked correctly. now i'm trying to make my own application and it's not
>> working, so it must be because of the code. Although i am writing it
>> exactly as it advised in tutorials.
>>
>>
>> On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:
>>
>>> Interesting.I don't know much about this but as at the same level
>>> you are I would have checked first wether the Samsung Galaxy S3 has a 
>>> USB
>>> OTG sw support or not.You can try this by inserting a USB keyboard into 
>>> it
>>> or a Mouse and see whether it is working.
>>> I think it has :
>>> *USB:*USB 2.0 client, 480Mbit/s
>>> micro-USB
>>>
>>> What you need is
>>>
>>> *USB:*USB 2.0 host/client, 480Mbit/s
>>> USB A
>>>
>>>
>>> Rgds,
>>> -s
>>>
>>>
>>> On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro <
>>> martacunh...@gmail.com**> wrote:
>>>
 I'm using a Samsung Galaxy S3,and connecting to a sensor using USB
 host and a OTG cable. I'm at the beginning phase just trying to write 
 code
 to detect the sensor was attached  but it's not working. Can someone 
 take a
 look and tell me what they think:


 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(**savedInstanceSt**ate);
 setContentView(R.layout.**activi**ty_microstrain);
  find_device = (EditText)findViewById(R.id.**fi**nd_device);
   UsbManager manager = (UsbManager)getSystemService(**C**
 ontext.USB_SERVICE);

 //connect();

 HashMap deviceList =
 manager.getDeviceList();
 Iterator deviceIterator =
 deviceList.values().iterator();

  while(deviceIterator.hasNext()){

 UsbDevice device = deviceIterator.next();
 Toast.makeText(this,"Value of device :"
 +device.getDeviceName(), Toast.LENGTH_LONG).show();

 }


 %% manifest %%%

 
 http://schemas.
 android.com/apk/res/android"
   package="com.example.**microstra**in"
 android:versionCode="1"
 android:versionName="1.0"
 android:orientation="vertical">

 

 >>> android:minSdkVersion="16"
 android:targetSdkVersion="16" />

 >>> android:allowBackup="true"
 android:icon="@drawable/ic_**lau**ncher"
 android:label="@string/app_**nam**e"
 android:theme="@style/**AppTheme**" >
 >>> an

Re: [android-developers] USB host

2013-02-28 Thread Marta Ribeiro
Additionally, I just noticed something, the application presents two tabs: 
Android plus Linux. According to android i have no devices connected. 
Whereas in the linux tab i find my device. Is this indicative of something? 

On Thursday, February 28, 2013 1:40:35 PM UTC, Marta Ribeiro wrote:
>
> Yes I can see my device. 
>
> regarding the device file, it is in decimal, which I've head is the 
> correct way. I've check the values with the output of the application and 
> after a conversion hexadecimal to decimal it's a match.
>
> Right now,I'm starting to thing the issue may be the usb.host permission. 
> Do you now if i'm missing something?
>  
> On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote:
>>
>> I would first check the hardware/cable etc. e.g. with the app "USB Device 
>> Info" 
>> https://play.google.com/store/apps/details?id=aws.apps.usbDeviceEnumerator
>>
>> If you can see your device in the android tab, then you are right and 
>> it's a software issue. 
>>
>> I'm not sure about the device_filter.xml. Do you have to specifiy the 
>> values in hex or decimal? The docu uses e.g. class="255" and does not use a 
>> hex-only digit. That looks to me like it could be decimal?
>>
>>
>> Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta Ribeiro:
>>>
>>> I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable.
>>>
>>> Any help you can provide I would appreciate!
>>>
>>> On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:

 Hi,

 what kind of sensor are you using and what protocol (RS232, HID or 
 plain USB) is used?
 I played around with some RS232 devices. Perhaps I could find the 
 example again.
 Later I switched to a IOIO divice.

 Roy

 2013/2/27 Marta Ribeiro 

> I have the cables needed. I even installed an usb host app and it 
> worked correctly. now i'm trying to make my own application and it's not 
> working, so it must be because of the code. Although i am writing it 
> exactly as it advised in tutorials.
>
>
> On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:
>
>> Interesting.I don't know much about this but as at the same level you 
>> are I would have checked first wether the Samsung Galaxy S3 has a USB 
>> OTG 
>> sw support or not.You can try this by inserting a USB keyboard into it 
>> or a 
>> Mouse and see whether it is working.
>> I think it has : 
>> *USB:*USB 2.0 client, 480Mbit/s
>> micro-USB
>>
>> What you need is 
>>
>> *USB:*USB 2.0 host/client, 480Mbit/s
>> USB A
>>
>>
>> Rgds,
>> -s
>>
>>
>> On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro <
>> martacunh...@gmail.com**> wrote:
>>
>>> I'm using a Samsung Galaxy S3,and connecting to a sensor using USB 
>>> host and a OTG cable. I'm at the beginning phase just trying to write 
>>> code 
>>> to detect the sensor was attached  but it's not working. Can someone 
>>> take a 
>>> look and tell me what they think:
>>>
>>>
>>> protected void onCreate(Bundle savedInstanceState) {
>>> super.onCreate(**savedInstanceState);
>>> setContentView(R.layout.**activity_microstrain);
>>>  find_device = (EditText)findViewById(R.id.**find_device);
>>>   UsbManager manager = (UsbManager)getSystemService(**
>>> Context.USB_SERVICE); 
>>>
>>> //connect(); 
>>>
>>> HashMap deviceList = 
>>> manager.getDeviceList();
>>> Iterator deviceIterator = 
>>> deviceList.values().iterator()**;
>>>
>>>  while(deviceIterator.hasNext()**){
>>>
>>> UsbDevice device = deviceIterator.next();
>>> Toast.makeText(this,"Value of device :" 
>>> +device.getDeviceName(), Toast.LENGTH_LONG).show();
>>>
>>> }
>>>
>>>
>>> %% manifest %%%
>>>
>>> 
>>> http://schemas.**
>>> android.com/apk/res/android"
>>>  
>>>   package="com.example.**microstrain"
>>> android:versionCode="1"
>>> android:versionName="1.0" 
>>> android:orientation="vertical"**>
>>>
>>> 
>>> 
>>> >> android:minSdkVersion="16"
>>> android:targetSdkVersion="16" />
>>> 
>>> >> android:allowBackup="true"
>>> android:icon="@drawable/ic_**launcher"
>>> android:label="@string/app_**name"
>>> android:theme="@style/**AppTheme" >
>>> >> android:name="com.example.**microstrain.MICROSTRAIN"
>>> android:label="@string/app_**name" >
>>> 
>>> >> />
>>> 
>>> >> android:name="android.intent.**category.LAUNCHER" 
>>> />
>>> 
>>> 
>>>

Re: [android-developers] USB host

2013-02-28 Thread Marta Ribeiro
Yes I can see my device. 

regarding the device file, it is in decimal, which I've head is the correct 
way. I've check the values with the output of the application and after a 
conversion hexadecimal to decimal it's a match.

Right now,I'm starting to thing the issue may be the usb.host permission. 
Do you now if i'm missing something?
 
On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote:
>
> I would first check the hardware/cable etc. e.g. with the app "USB Device 
> Info" 
> https://play.google.com/store/apps/details?id=aws.apps.usbDeviceEnumerator
>
> If you can see your device in the android tab, then you are right and it's 
> a software issue. 
>
> I'm not sure about the device_filter.xml. Do you have to specifiy the 
> values in hex or decimal? The docu uses e.g. class="255" and does not use a 
> hex-only digit. That looks to me like it could be decimal?
>
>
> Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta Ribeiro:
>>
>> I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable.
>>
>> Any help you can provide I would appreciate!
>>
>> On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:
>>>
>>> Hi,
>>>
>>> what kind of sensor are you using and what protocol (RS232, HID or plain 
>>> USB) is used?
>>> I played around with some RS232 devices. Perhaps I could find the 
>>> example again.
>>> Later I switched to a IOIO divice.
>>>
>>> Roy
>>>
>>> 2013/2/27 Marta Ribeiro 
>>>
 I have the cables needed. I even installed an usb host app and it 
 worked correctly. now i'm trying to make my own application and it's not 
 working, so it must be because of the code. Although i am writing it 
 exactly as it advised in tutorials.


 On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:

> Interesting.I don't know much about this but as at the same level you 
> are I would have checked first wether the Samsung Galaxy S3 has a USB OTG 
> sw support or not.You can try this by inserting a USB keyboard into it or 
> a 
> Mouse and see whether it is working.
> I think it has : 
> *USB:*USB 2.0 client, 480Mbit/s
> micro-USB
>
> What you need is 
>
> *USB:*USB 2.0 host/client, 480Mbit/s
> USB A
>
>
> Rgds,
> -s
>
>
> On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro <
> martacunh...@gmail.com**> wrote:
>
>> I'm using a Samsung Galaxy S3,and connecting to a sensor using USB 
>> host and a OTG cable. I'm at the beginning phase just trying to write 
>> code 
>> to detect the sensor was attached  but it's not working. Can someone 
>> take a 
>> look and tell me what they think:
>>
>>
>> protected void onCreate(Bundle savedInstanceState) {
>> super.onCreate(**savedInstanceState);
>> setContentView(R.layout.**activity_microstrain);
>>  find_device = (EditText)findViewById(R.id.**find_device);
>>   UsbManager manager = (UsbManager)getSystemService(**
>> Context.USB_SERVICE); 
>>
>> //connect(); 
>>
>> HashMap deviceList = 
>> manager.getDeviceList();
>> Iterator deviceIterator = 
>> deviceList.values().iterator()**;
>>
>>  while(deviceIterator.hasNext()**){
>>
>> UsbDevice device = deviceIterator.next();
>> Toast.makeText(this,"Value of device :" 
>> +device.getDeviceName(), Toast.LENGTH_LONG).show();
>>
>> }
>>
>>
>> %% manifest %%%
>>
>> 
>> > xmlns:android="http://schemas.**android.com/apk/res/android"
>>  
>>   package="com.example.**microstrain"
>> android:versionCode="1"
>> android:versionName="1.0" 
>> android:orientation="vertical"**>
>>
>> 
>> 
>> > android:minSdkVersion="16"
>> android:targetSdkVersion="16" />
>> 
>> > android:allowBackup="true"
>> android:icon="@drawable/ic_**launcher"
>> android:label="@string/app_**name"
>> android:theme="@style/**AppTheme" >
>> > android:name="com.example.**microstrain.MICROSTRAIN"
>> android:label="@string/app_**name" >
>> 
>> > />
>> 
>> > android:name="android.intent.**category.LAUNCHER" 
>> />
>> 
>> 
>> 
>> 
>>  > android:resource="@xml/**device_filter" 
>> />
>> 
>>
>> 
>> 
>> > android:targetPackage="com.**example.microstrain"
>>  android:label="microstrain" />
>>
>> 
>>
>> %   xml/device_filter.xml %
>>
>> 
>>
>> 
>>
>> 
>>
>> %%
>>
>>  I appreciate all the he

Re: [android-developers] USB host

2013-02-28 Thread al
I would first check the hardware/cable etc. e.g. with the app "USB Device 
Info" 
https://play.google.com/store/apps/details?id=aws.apps.usbDeviceEnumerator

If you can see your device in the android tab, then you are right and it's 
a software issue. 

I'm not sure about the device_filter.xml. Do you have to specifiy the 
values in hex or decimal? The docu uses e.g. class="255" and does not use a 
hex-only digit. That looks to me like it could be decimal?


Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta Ribeiro:
>
> I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable.
>
> Any help you can provide I would appreciate!
>
> On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:
>>
>> Hi,
>>
>> what kind of sensor are you using and what protocol (RS232, HID or plain 
>> USB) is used?
>> I played around with some RS232 devices. Perhaps I could find the example 
>> again.
>> Later I switched to a IOIO divice.
>>
>> Roy
>>
>> 2013/2/27 Marta Ribeiro 
>>
>>> I have the cables needed. I even installed an usb host app and it worked 
>>> correctly. now i'm trying to make my own application and it's not working, 
>>> so it must be because of the code. Although i am writing it exactly as it 
>>> advised in tutorials.
>>>
>>>
>>> On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:
>>>
 Interesting.I don't know much about this but as at the same level you 
 are I would have checked first wether the Samsung Galaxy S3 has a USB OTG 
 sw support or not.You can try this by inserting a USB keyboard into it or 
 a 
 Mouse and see whether it is working.
 I think it has : 
 *USB:*USB 2.0 client, 480Mbit/s
 micro-USB

 What you need is 

 *USB:*USB 2.0 host/client, 480Mbit/s
 USB A


 Rgds,
 -s


 On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro >>> **> wrote:

> I'm using a Samsung Galaxy S3,and connecting to a sensor using USB 
> host and a OTG cable. I'm at the beginning phase just trying to write 
> code 
> to detect the sensor was attached  but it's not working. Can someone take 
> a 
> look and tell me what they think:
>
>
> protected void onCreate(Bundle savedInstanceState) {
> super.onCreate(**savedInstanceState);
> setContentView(R.layout.**activity_microstrain);
>  find_device = (EditText)findViewById(R.id.**find_device);
>   UsbManager manager = (UsbManager)getSystemService(**
> Context.USB_SERVICE); 
>
> //connect(); 
>
> HashMap deviceList = 
> manager.getDeviceList();
> Iterator deviceIterator = 
> deviceList.values().iterator()**;
>
>  while(deviceIterator.hasNext()**){
>
> UsbDevice device = deviceIterator.next();
> Toast.makeText(this,"Value of device :" 
> +device.getDeviceName(), Toast.LENGTH_LONG).show();
>
> }
>
>
> %% manifest %%%
>
> 
>  xmlns:android="http://schemas.**android.com/apk/res/android"
>  
>   package="com.example.**microstrain"
> android:versionCode="1"
> android:versionName="1.0" 
> android:orientation="vertical"**>
>
> 
> 
>  android:minSdkVersion="16"
> android:targetSdkVersion="16" />
> 
>  android:allowBackup="true"
> android:icon="@drawable/ic_**launcher"
> android:label="@string/app_**name"
> android:theme="@style/**AppTheme" >
>  android:name="com.example.**microstrain.MICROSTRAIN"
> android:label="@string/app_**name" >
> 
> 
> 
>  android:name="android.intent.**category.LAUNCHER" 
> />
> 
> 
> 
> 
>   android:resource="@xml/**device_filter" 
> />
> 
>
> 
> 
>  android:targetPackage="com.**example.microstrain"
>  android:label="microstrain" />
>
> 
>
> %   xml/device_filter.xml %
>
> 
>
> 
>
> 
>
> %%
>
>  I appreciate all the help. Thanks in advance! 
>
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-d...@**googlegroups.com
>
> To unsubscribe from this group, send email to
> android-developers+**unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/**group/android-developers?hl=en
> --- 
> You received this message because you are subscribed to the G

Re: [android-developers] USB host

2013-02-28 Thread Marta Ribeiro
I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable.

Any help you can provide I would appreciate!

On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote:
>
> Hi,
>
> what kind of sensor are you using and what protocol (RS232, HID or plain 
> USB) is used?
> I played around with some RS232 devices. Perhaps I could find the example 
> again.
> Later I switched to a IOIO divice.
>
> Roy
>
> 2013/2/27 Marta Ribeiro >
>
>> I have the cables needed. I even installed an usb host app and it worked 
>> correctly. now i'm trying to make my own application and it's not working, 
>> so it must be because of the code. Although i am writing it exactly as it 
>> advised in tutorials.
>>
>>
>> On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:
>>
>>> Interesting.I don't know much about this but as at the same level you 
>>> are I would have checked first wether the Samsung Galaxy S3 has a USB OTG 
>>> sw support or not.You can try this by inserting a USB keyboard into it or a 
>>> Mouse and see whether it is working.
>>> I think it has : 
>>> *USB:*USB 2.0 client, 480Mbit/s
>>> micro-USB
>>>
>>> What you need is 
>>>
>>> *USB:*USB 2.0 host/client, 480Mbit/s
>>> USB A
>>>
>>>
>>> Rgds,
>>> -s
>>>
>>>
>>> On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro >> *> wrote:
>>>
 I'm using a Samsung Galaxy S3,and connecting to a sensor using USB host 
 and a OTG cable. I'm at the beginning phase just trying to write code to 
 detect the sensor was attached  but it's not working. Can someone take a 
 look and tell me what they think:


 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(**savedInstanceState);
 setContentView(R.layout.**activity_microstrain);
  find_device = (EditText)findViewById(R.id.**find_device);
   UsbManager manager = (UsbManager)getSystemService(**
 Context.USB_SERVICE); 

 //connect(); 

 HashMap deviceList = manager.getDeviceList();
 Iterator deviceIterator = 
 deviceList.values().iterator()**;

  while(deviceIterator.hasNext()**){

 UsbDevice device = deviceIterator.next();
 Toast.makeText(this,"Value of device :" 
 +device.getDeviceName(), Toast.LENGTH_LONG).show();

 }


 %% manifest %%%

 
 >>> xmlns:android="http://schemas.**android.com/apk/res/android"
  
   package="com.example.**microstrain"
 android:versionCode="1"
 android:versionName="1.0" 
 android:orientation="vertical"**>

 
 
 >>> android:minSdkVersion="16"
 android:targetSdkVersion="16" />
 
 >>> android:allowBackup="true"
 android:icon="@drawable/ic_**launcher"
 android:label="@string/app_**name"
 android:theme="@style/**AppTheme" >
 >>> android:name="com.example.**microstrain.MICROSTRAIN"
 android:label="@string/app_**name" >
 
 
 
 >>> android:name="android.intent.**category.LAUNCHER" 
 />
 
 
 
 
  >>> android:resource="@xml/**device_filter" 
 />
 

 
 
 >>> android:targetPackage="com.**example.microstrain"
  android:label="microstrain" />

 

 %   xml/device_filter.xml %

 

 

 

 %%

  I appreciate all the help. Thanks in advance! 

 -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups "Android Developers" group.
 To post to this group, send email to android-d...@**googlegroups.com

 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=en
 --- 
 You received this message because you are subscribed to the Google 
 Groups "Android Developers" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to android-developers+**unsubscr...@googlegroups.com.
 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .
  
  

>>>
>>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/gr

Re: [android-developers] USB host

2013-02-27 Thread Tux Leonard
Hi,

what kind of sensor are you using and what protocol (RS232, HID or plain
USB) is used?
I played around with some RS232 devices. Perhaps I could find the example
again.
Later I switched to a IOIO divice.

Roy

2013/2/27 Marta Ribeiro 

> I have the cables needed. I even installed an usb host app and it worked
> correctly. now i'm trying to make my own application and it's not working,
> so it must be because of the code. Although i am writing it exactly as it
> advised in tutorials.
>
>
> On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:
>
>> Interesting.I don't know much about this but as at the same level you are
>> I would have checked first wether the Samsung Galaxy S3 has a USB OTG sw
>> support or not.You can try this by inserting a USB keyboard into it or a
>> Mouse and see whether it is working.
>> I think it has :
>> *USB:*USB 2.0 client, 480Mbit/s
>> micro-USB
>>
>> What you need is
>>
>> *USB:*USB 2.0 host/client, 480Mbit/s
>> USB A
>>
>>
>> Rgds,
>> -s
>>
>>
>> On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro > > wrote:
>>
>>> I'm using a Samsung Galaxy S3,and connecting to a sensor using USB host
>>> and a OTG cable. I'm at the beginning phase just trying to write code to
>>> detect the sensor was attached  but it's not working. Can someone take a
>>> look and tell me what they think:
>>>
>>>
>>> protected void onCreate(Bundle savedInstanceState) {
>>> super.onCreate(**savedInstanceState);
>>> setContentView(R.layout.**activity_microstrain);
>>>  find_device = (EditText)findViewById(R.id.**find_device);
>>>   UsbManager manager = (UsbManager)getSystemService(**
>>> Context.USB_SERVICE);
>>>
>>> //connect();
>>>
>>> HashMap deviceList = manager.getDeviceList();
>>> Iterator deviceIterator =
>>> deviceList.values().iterator()**;
>>>
>>> while(deviceIterator.hasNext()**){
>>>
>>> UsbDevice device = deviceIterator.next();
>>> Toast.makeText(this,"Value of device :"
>>> +device.getDeviceName(), Toast.LENGTH_LONG).show();
>>>
>>> }
>>>
>>>
>>> %% manifest %%%
>>>
>>> 
>>> >> xmlns:android="http://schemas.**android.com/apk/res/android"
>>>   package="com.example.**microstrain"
>>> android:versionCode="1"
>>> android:versionName="1.0"
>>> android:orientation="vertical"**>
>>>
>>> 
>>>
>>> >> android:minSdkVersion="16"
>>> android:targetSdkVersion="16" />
>>>
>>> >> android:allowBackup="true"
>>> android:icon="@drawable/ic_**launcher"
>>> android:label="@string/app_**name"
>>> android:theme="@style/**AppTheme" >
>>> >> android:name="com.example.**microstrain.MICROSTRAIN"
>>> android:label="@string/app_**name" >
>>> 
>>> 
>>> 
>>> >> />
>>> 
>>> 
>>> 
>>> 
>>>  
>>> 
>>>
>>> 
>>>
>>> >> android:targetPackage="com.**example.microstrain"
>>>  android:label="microstrain" />
>>>
>>> 
>>>
>>> %   xml/device_filter.xml %
>>>
>>> 
>>>
>>> 
>>>
>>> 
>>>
>>> %%
>>>
>>>  I appreciate all the help. Thanks in advance!
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-d...@**googlegroups.com
>>>
>>> To unsubscribe from this group, send email to
>>> android-developers+**unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-developers+**unsubscr...@googlegroups.com.
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>>
>>>
>>
>>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googl

Re: [android-developers] USB host

2013-02-27 Thread Marta Ribeiro
I have the cables needed. I even installed an usb host app and it worked 
correctly. now i'm trying to make my own application and it's not working, 
so it must be because of the code. Although i am writing it exactly as it 
advised in tutorials.

On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote:
>
> Interesting.I don't know much about this but as at the same level you are 
> I would have checked first wether the Samsung Galaxy S3 has a USB OTG sw 
> support or not.You can try this by inserting a USB keyboard into it or a 
> Mouse and see whether it is working.
> I think it has : 
> *USB:*USB 2.0 client, 480Mbit/s
> micro-USB
>
> What you need is 
>
> *USB:*USB 2.0 host/client, 480Mbit/s
> USB A
>
>
> Rgds,
> -s
>
>
> On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro 
> 
> > wrote:
>
>> I'm using a Samsung Galaxy S3,and connecting to a sensor using USB host 
>> and a OTG cable. I'm at the beginning phase just trying to write code to 
>> detect the sensor was attached  but it's not working. Can someone take a 
>> look and tell me what they think:
>>
>>
>> protected void onCreate(Bundle savedInstanceState) {
>> super.onCreate(savedInstanceState);
>> setContentView(R.layout.activity_microstrain);
>>  find_device = (EditText)findViewById(R.id.find_device);
>>   UsbManager manager = 
>> (UsbManager)getSystemService(Context.USB_SERVICE); 
>>
>> //connect(); 
>>
>> HashMap deviceList = manager.getDeviceList();
>> Iterator deviceIterator = 
>> deviceList.values().iterator();
>>
>> while(deviceIterator.hasNext()){
>>
>> UsbDevice device = deviceIterator.next();
>> Toast.makeText(this,"Value of device :" 
>> +device.getDeviceName(), Toast.LENGTH_LONG).show();
>>
>> }
>>
>>
>> %% manifest %%%
>>
>> 
>> http://schemas.android.com/apk/res/android";   
>> package="com.example.microstrain"
>> android:versionCode="1"
>> android:versionName="1.0" 
>> android:orientation="vertical">
>>
>> 
>> 
>> > android:minSdkVersion="16"
>> android:targetSdkVersion="16" />
>> 
>> > android:allowBackup="true"
>> android:icon="@drawable/ic_launcher"
>> android:label="@string/app_name"
>> android:theme="@style/AppTheme" >
>> > android:name="com.example.microstrain.MICROSTRAIN"
>> android:label="@string/app_name" >
>> 
>> 
>> 
>> > />
>> 
>> 
>> 
>> 
>>  > android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" 
>>  android:resource="@xml/device_filter" />
>> 
>>
>> 
>> 
>> > android:targetPackage="com.example.microstrain"
>>  android:label="microstrain" />
>>
>> 
>>
>> %   xml/device_filter.xml %
>>
>> 
>>
>> 
>>
>> 
>>
>> %%
>>
>>  I appreciate all the help. Thanks in advance! 
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-developers+unsubscr...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] USB host

2013-02-26 Thread s.rawat
Interesting.I don't know much about this but as at the same level you are I
would have checked first wether the Samsung Galaxy S3 has a USB OTG sw
support or not.You can try this by inserting a USB keyboard into it or a
Mouse and see whether it is working.
I think it has :
*USB:*USB 2.0 client, 480Mbit/s
micro-USB

What you need is

*USB:*USB 2.0 host/client, 480Mbit/s
USB A


Rgds,
-s


On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro <
martacunharibeir...@gmail.com> wrote:

> I'm using a Samsung Galaxy S3,and connecting to a sensor using USB host
> and a OTG cable. I'm at the beginning phase just trying to write code to
> detect the sensor was attached  but it's not working. Can someone take a
> look and tell me what they think:
>
>
> protected void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.activity_microstrain);
>  find_device = (EditText)findViewById(R.id.find_device);
>  UsbManager manager = (UsbManager)getSystemService(Context.USB_SERVICE);
>
> //connect();
>
> HashMap deviceList = manager.getDeviceList();
> Iterator deviceIterator =
> deviceList.values().iterator();
>
> while(deviceIterator.hasNext()){
>
> UsbDevice device = deviceIterator.next();
> Toast.makeText(this,"Value of device :"
> +device.getDeviceName(), Toast.LENGTH_LONG).show();
>
> }
>
>
> %% manifest %%%
>
> 
> http://schemas.android.com/apk/res/android";
> package="com.example.microstrain"
> android:versionCode="1"
> android:versionName="1.0"
> android:orientation="vertical">
>
> 
>
>  android:minSdkVersion="16"
> android:targetSdkVersion="16" />
>
>  android:allowBackup="true"
> android:icon="@drawable/ic_launcher"
> android:label="@string/app_name"
> android:theme="@style/AppTheme" >
>  android:name="com.example.microstrain.MICROSTRAIN"
> android:label="@string/app_name" >
> 
> 
> 
>  />
> 
> 
> 
> 
>   android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
>  android:resource="@xml/device_filter" />
> 
>
> 
>
>  android:targetPackage="com.example.microstrain"
> android:label="microstrain" />
>
> 
>
> %   xml/device_filter.xml %
>
> 
>
> 
>
> 
>
> %%
>
>  I appreciate all the help. Thanks in advance!
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] USB host

2013-02-26 Thread Marta Ribeiro
I'm using a Samsung Galaxy S3,and connecting to a sensor using USB host and 
a OTG cable. I'm at the beginning phase just trying to write code to detect 
the sensor was attached  but it's not working. Can someone take a look and 
tell me what they think:


protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_microstrain);
 find_device = (EditText)findViewById(R.id.find_device);
 UsbManager manager = (UsbManager)getSystemService(Context.USB_SERVICE); 

//connect(); 

HashMap deviceList = manager.getDeviceList();
Iterator deviceIterator = deviceList.values().iterator();
   
while(deviceIterator.hasNext()){

UsbDevice device = deviceIterator.next();
Toast.makeText(this,"Value of device :" 
+device.getDeviceName(), Toast.LENGTH_LONG).show();
   
}


%% manifest %%%


http://schemas.android.com/apk/res/android";   
package="com.example.microstrain"
android:versionCode="1"
android:versionName="1.0" 
android:orientation="vertical">















 

   






%   xml/device_filter.xml %







%%

 I appreciate all the help. Thanks in advance!

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] USB Host hardware requirements?

2012-08-28 Thread Kiran
Hi All,
I have a USB based sensor that would draw about 300mA and would like to use 
it with my Android phone.  I have tried to play around with the API's and 
write a small application that would just list out the devices that were 
connected to the USB bus.  

A small code snippet that I am trying to use to print out the connected 
devices is:

*
EditText lsusbText = (EditText) findViewById(R.id.lsusbTextID);
lsusbText.setText("");
Log.i(TAG, "Querying USB devices");

UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
HashMap deviceList = manager.getDeviceList();
Iterator deviceIterator = deviceList.values().iterator();
while(deviceIterator.hasNext()){
UsbDevice device = deviceIterator.next();
//your code
lsusbText.append(device.getDeviceName());
}

My manifest has:






*

I noticed that the results are not showing any devices connected.  After 
researching a bit and poking around in the forums, it seems that only 
specific hardware devices support USB Host mode.  I have a Samsung Nexus S 
phone, and am inclined to believe that this phone does not support the USB 
host mode?  I also tried plugging in a mouse via an OTG adapter, but the 
USB mouse didn't receive power after it was plugged in.  The Android API's 
also suggest this:
"Note: Support for USB host and accessory modes are ultimately dependant on 
the device's hardware, regardless of platform level."
Is there a listing of the Android powered devices that support USB host 
mode?  Also, out of curiosity, why is there a hardware requirement for USB 
host?  Is it the specific type of USB connector that the phone has (Micro-A 
vs Micro-B)?  Is it something related to the USB Bus power?  Any 
information regarding the hardware requirements, which devices currently 
support this, etc would be great.  I also found that there is a libusb port 
to Android, which would allow access at a lower level.  However, this would 
potentially still require the hardware to support the USB host mode. 
 Additionally, I have seen things about a kernel mod required.  I'm 
guessing the kernel stuff was for older image releases, and that Android 
4.1 has this kernel mod built in.

I unfortunately found that the documentation for WiFi direct is similarly 
ambiguous in that although WiFi direct is something that is enabled and 
available for use in the API, the hardware may not support it.  However, I 
haven't found any documentation which tells developers which devices 
support/don't support the functionality.  

Thanks in advance,
Kiran

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] USB Host bulk transfer returning -1 on read, data IS available

2012-06-12 Thread koos van wijk
Hi,

I'm currently developing an app that needs USB Host implementation to
communicate with a device to request data and settings. I'm testing
with an Archos 80 G9 as platform, running Android 4.0.3 (latest
firmware).

I can read and write from/to the device using the bulktransfer method
on 2 endpoints: 1 for reading and 1 for writing. The device's USB is
implemented correct, since I have no issues communicating with it
using a python script.

Writing is never a problem. However when I'm reading there allways
comes a point where I can no longer read any data from the USB
devices: bulktransfer keeps returning -1.

I have tried different timeout values, adding delays, flushing the
endpoint by reading until it's returning -1, implementing a Reader to
use in combination with a BufferedReader, but nothing so far has
solved the issue.

The strange thing is that when I plug the device in the computer and
run the python script, the data that should have been read in Android,
is read without any issue, as it is still buffered by the USB device.
So it appears that the issue is on the Android side.

I hope someone can suggest some possible solutions, since I'm running
out of ideas.

The code can be found at http://code.google.com/p/oscdroid/
I'm sure it's pretty nasty and could be a lot better, but so far most
functionality is working properly. Connection code is mainly in the
ConnectionService class.

I'd appreciate any suggestions.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] [USB Host - API12 ] ClaimInterface returns false. (authorization granted, and device detected)

2012-06-10 Thread Latoof
Abstract : How to diagnostic "claimInterface" results ? (returns
"false" for me)
(or how to detach kernel usb driver manually ?)

Hello. That's a vague question :

I have a custom USB device (class 0xff) and I want to communicate with
it using my Android phone. I'm on ICS "stock" (original), and official
API provides USB functionnalites.

I use a Java and C API to communicate with my device from my computer
(libusb), so I though that it could be possible to do the same with my
Androphone, and an OTG USB cable.


But my problem : When I plug the device to the Smartphone, it is
correctly detected (and powered). Endpoints are correctly listed, and
I can retrieve the serial name. But when I call the "claimInterface"
function (Android API), it fails. I don't understand why, because the
class of my device is unspecified and shouldn't be handled by Android
OS or other App.
When I do a diagnostic with the XDA USB Host test software, I get
"yes" in line "claimed" (Base API).


I realize that my question is too specific. My hope is to find someone
who has already worked on this kind of problem, or who knows the
limits of the USB host.

Thanks in advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] USB Host - a simple app to send signals to the camera

2012-04-26 Thread Magda
Hi, I am writing an app that is supposed to communicate with a camera via 
USB, Samsung Galaxy S2 with Android 4.0.3 being the host. I have trouble 
with understanding how it has to be done. I am trying via bulkTransfer and 
the code goes like this:

char ch = (char)34;
char[] record = {'P',ch};
String r = record.toString();
byte[] bytes  =  r.getBytes(Charset.forName("ASCII"));
int TIMEOUT = 1;
boolean forceClaim = true;
UsbManager mUsbManager = (UsbManager) 
getSystemService(Context.USB_SERVICE);
UsbInterface intf = device.getInterface(0);
 for (int i = 0; i < intf.getEndpointCount(); i++) {
  UsbEndpoint ep = intf.getEndpoint(i);
  if (ep.getType() == UsbConstants.USB_ENDPOINT_XFER_BULK) {
if (ep.getDirection() == UsbConstants.USB_DIR_OUT) {
  endpoint = ep;
  //Integer dir = endpoint.getDirection();
  UsbDeviceConnection connection = 
mUsbManager.openDevice(device); 
  if(connection!=null){devMessage+=" I connected";}
  connection.claimInterface(intf, forceClaim);
  Integer res = connection.bulkTransfer(endpoint, bytes, 
bytes.length, TIMEOUT);
  if (res>0){devMessage += "some data transfered.";}
  connection.releaseInterface(intf);
break;

} 
   } 

The data is being sent, at least that's what I get from the bulkTransfer() 
method reaction. But nothing is happening. The command that I need to send 
is a simple 2-character string - P"
Please, if anyone is familiar with USB host functionality contact me. I've 
seen apps in google play that serve as remote controllers for the DSLR, so 
I know it is doable but I am really just a beginner with Android.
I appreciate any help, guys!
Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] USB Host Intent Stopped Working

2012-03-11 Thread bsnguy
I have a system with ICS 4.0.3 running and it was working with my
custom USB hardware for a couple of weeks. For the past week, however,
I am no longer getting the messages when the USB device is plugged in.
I have not changed my intent (for ATTACHED) and the same hardware and
software works on another phone.

Any ideas what could cause this to stop working? I'm just learning
about the USB host functionality and am stumped by this (and the lack
of any clear documentation past the class reference on the web).

I'm probably going to reflash my image but I'm hoping to learn what
may have happened to ensure that I don't do it, again, or to more
gracefully recover in the future.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] USB Host in the emulator

2011-10-04 Thread Mark Murphy
On Tue, Oct 4, 2011 at 3:53 AM, Antonello Pasella
 wrote:
> Hi all, there is a way to connect an USB device to the emulator?

http://developer.android.com/guide/developing/devices/emulator.html

"No support for USB connections"

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] USB Host in the emulator

2011-10-04 Thread Antonello Pasella
Hi all, there is a way to connect an USB device to the emulator?

Thanks a lot!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] USB Host question.

2011-10-03 Thread Michael
Hello everyone!

Im trying add support for PowerMate in my application(using 3.1sdk).
The device see the Griffin PowerMate, but how to get event from
PowerMate?
It successful connected.
And Im using

 final ByteBuffer buffer =ByteBuffer.allocate(24);

final UsbRequest request = new UsbRequest();
request.initialize(mConnection, mEndpointIntr);

But,when Im turning wheel on PowerMate, to left or to right, the bytes
the same, so i dont know how to Understand, when Wheel turned to right
or two left, can someone help me on this? :) Thank you.

Best,
Michael

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] USB Host API on XOOM tablet

2011-09-29 Thread Ralph Bergmann | the4thFloor.eu
Am 23.09.11 16:27, schrieb Anil Sasidharan:
> It would be great to know if anyone has tested Android's USB Host API on
> any tablet device especially Motorola XOOM. I would really appreciate
> your comments/suggestions.

I tried the missile launcher app from the sample projects.

It does not work on my XOOM, but it works without any changes on my LG
Slate.

But it looks that it works on a XOOM, see
http://community.developer.motorola.com/t5/MOTODEV-Blog/Code-to-Launch-Foam-Missiles-Over-USB/ba-p/17889



Ralph

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] USB Host API on XOOM tablet

2011-09-23 Thread Anil Sasidharan
Hi All,

I'm trying to get the USB Host API (introduced in sdk-version 12) working
with the Motorola XOOM tablet.

The details of the tablet are as follows:
Model:  MZ601
Android-version: 3.1
Firmware configuration version: GAS_ASIA_USAEVRSTURTIRD_P035
Build-number: H.6.3-25-5

We are using a custom USB cable (ref:
http://www.youtube.com/watch?v=COkLEJGo6vo ) to convert the micro-B port of
the tablet to work in USB host mode. This has been tested with USB mouse and
it gets detected (we are able to navigate through the screens using the
mouse). We have even connected an FTDI based device and that gets detected
by the kernel (from dmesg, we can see the device enumeration messages).

Now the next step was to implement a basic test application that uses "USB
Host mode APIs of Android" to enumerate the peripheral devices connected to
the host port. (Please scroll down to see the code snippet)

I'm able to build the code using Eclipse with latest android-sdk. However
when this application is executed, I do not see any of the USB devices
attached to the host port getting detected.

It would be great to know if anyone has tested Android's USB Host API on any
tablet device especially Motorola XOOM. I would really appreciate your
comments/suggestions.


Log.d("USB_TEST", "begin enumeration");
usbman = (UsbManager) getSystemService(USB_SERVICE);
HashMap deviceList = usbman.getDeviceList();
Iterator devIter = deviceList.values().iterator();

while(devIter.hasNext()) {
UsbDevice dev = devIter.next();
Log.d("USB_TEST", "dev-name: " + dev.getDeviceName());
Log.d("USB_TEST", "vendor-id: " + dev.getVendorId());
Log.d("USB_TEST", "product-id: " + dev.getProductId());
}
Log.d("USB_TEST", "enumeration complete");



Warm Regards,
Anil

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] USB Host mode on galaxy tab 10.1 / android 3.1 - Device repeatedly re connecting in dmesg output

2011-08-08 Thread wl
Hi,

I'm trying to interface to a USB device from my googleIO galaxy tab 10.1. 
 I've been through the documentation on developer.android.com and stack 
overflow and I can't find anything on this.  Here's the problem:

I connect the USB device:

I've set up device filters as per the docs, and nothing happens.
If I look in logcat when I connect the device, nothing happens.
If getDeviceList() says there are 0 devices connected.

But if I connect to my galaxy tab 10.1 using "adb shell" then run dmesg, I 
discover the device is being detected after all:
<6>[ 1685.332067] usb 1-1: new low speed USB device using tegra-ehci and 
address 45
<3>[ 1685.370073] usb 1-1: device v1267 p is not supported
<6>[ 1685.392656] host_notify: ndev name=tegra-ehci.0: from state=5 -> to 
state=5
<3>[ 1685.392726] hub 1-0:1.0: unable to enumerate USB device on port 1
<6>[ 1685.551797] usb 1-1: new low speed USB device using tegra-ehci and 
address 46
<3>[ 1685.881732] usb 1-1: device v1267 p is not supported
<6>[ 1685.903018] host_notify: ndev name=tegra-ehci.0: from state=5 -> to 
state=5
<3>[ 1685.903089] hub 1-0:1.0: unable to enumerate USB device on port 1

Not only is it being detected, but it seems to be repeatedly:
- detecing the device
- reading the vid and pid
- declaring that they are not supported
- giving up on enumerating the device

and then starting all over again, about 5 times a second.  I tried this with 
a different USB device (different VID/PID), and saw the same pattern. My 
questions are:

- Could this be because I've managed to cock up setting up the intent 
filters, or is there some lower level problem stopping the device even 
getting that far?
- What constraints are there on which usb devices are supported on android 
(e.g. are there limits to which protocols are supported? Or which VIDs/PIDs 
are supported? Or some other constraints?)
- Is there any detailed documentation on USB on android (besides the 
hardware.usb. api reference)?
- Has anyone else had this problem?  Have they found a solution?

Any help would be much appreciated

W

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] USB Host Mode: Multiple Interfaces, not possible to receive data at the same time?

2011-08-01 Thread AndroidYourself
I've written an app to connect  an USB Device that have 4 Interfaces
with 4 connected Endpoints:

UsbDeviceConnection usbConnection1 = usbManager.openDevice(device);
UsbInterface usbInterface1 = device.getInterface(i);
usbConnection.claimInterface(usbInterface1, true))

UsbDeviceConnection usbConnection2 = usbManager.openDevice(device);
UsbInterface usbInterface2 = device.getInterface(i);
usbConnection.claimInterface(usbInterface2, true))

.
.
.


But if I start the 4 seperate receivers at the same time (each are 4
runnables):

@Override
public void run() {
try {
while (connectionRunning) {

buffer.clear();
receive = usbConnection.bulkTransfer(usbEndpointIN, 
buffer.array(),
buffer.array().length, 100);


...then the datas has a delay and didn't get all of the data. If I run
only one receiver all is ok.

Have anyone a solution for this problem?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Usb host mode driver issue

2011-03-02 Thread Ian Hall
i'm using the kernel and the boot image from this site:
http://sven.killig.de/android/N1/2.2/usb_host/

I have the driver installed for the Usb - serial, i can see the drivers
listed when i run lsmod, and i know the phone is in host mode, but when i
plug in the usb to serial device, which i'm supplying power externally to
the chip , no devices are listed in the /dev.
my output from lsmod:
# lsmod
pl2303 14516 0 - Live 0xbf036000
usbserial 26300 1 pl2303, Live 0xbf02d000
ehci_hcd 38318 0 - Live 0xbf021000
usbcore 125088 4 pl2303,usbserial,ehci_hcd, Live 0xbf00

when i do a dmesg | grep pl i receive the following :
<6>[ 1021.183349] USB Serial support registered for pl2303
<6>[ 1021.185546] usbcore: registered new interface driver pl2303
<6>[ 1021.185699] pl2303: Prolific PL2303 USB to serial adaptor driver

Does anyone know what might cause this malfunction? the author of the
drivers had no problems but i haven't seen anyone else writing about this
problem.  also if anyone knows another way to communicate through the USB to
serial i'd be willing to look into that.

Thanks

-ian

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] USB Host

2009-12-17 Thread Rafa Perfeito
Hey droiders,

Im building an app that communicates with an external sensor, preferably by
USB. Now, as many of you already must know, Android smartphones and USB host
mode are not natural to one another... But im sure that one solution must be
available. At this point i see two possible alternatives:

   - Grant USB Host capabilities in the android device (dont know how or if
   is even possible, but im certain it involves hardware configuration somehow)
   and then port jUSB or JSR-80 or some other java based USB communication
   solution to android. In this case the switch host/slave must be dynamic in
   order to assure that the device can still connect to a host itself
   (computer)
   - Implement USB OTG (On-The-Go -
   http://en.wikipedia.org/wiki/USB_On-The-Go) on Android. This seems the
   most robust option but also kind of difficult... Anyone tried this?

By the way, my Android device is HTC magic. Any thoughts or ideas? They are
more than welcome.

Cheers

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] USB host functionality in Android

2009-11-18 Thread Roy
Hi,

I am studying on USB host functionality for Android.

1. Is the android framework support the same?
2. Is kernel label USB driver available to do the same for arm? What
config needs to be enabled to do the same?

Please send me the response . This is very urgent to me.

Regards,
Roy

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] USB Host/Serial Port access

2009-09-02 Thread Abhi

Hi all,

I am trying to figure out if there is any way by which I can access
any USB device which is connected to my Android phone's USB port and
read data off it? For ex. Can I connect a camera to my phone and pull
pictures out of it?

I know that we need a HOST-DEVICE configuration to be able to do
that... have tried doing this on other devices before picking up my
android phone.. thought there would be an easier way to get this done.

now, when I connect my phone to a digital picture frame, I can see on
the phone that it identifies the USB device it is connected to and
goes into a USB mass storage mode. What I want to know is if after
this, I can read data from the frame or send data to it. I want to
write an app that pulls data over USB and stores it into the phone
memory.

Can you guys suggest a way out?

Thanks,

Abhi

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---