Hello everybody!
I have some problems connecting a USB device to my Asus Transformer tablet (Android 3.1).
I want to read out the data of a Pulsoximeter (medical device measuring the heart rate and blood oxygen) via USB interface. The data is stored to the Pulsoximeter internal Flash memory which I can read by sending simple byte sequences.
I am using the USB library V.093 on Android platform 15. Software is mainly based on Erel's USB example. I also know that my tablet supports USB host mode. Using the code shown next, it seems that the device can be successfully initialized:
For a = 0 To ud.InterfaceCount - 1
Dim inter As UsbInterface
inter = ud.GetInterface(a)
If inter.InterfaceClass = 255 AND inter.InterfaceSubclass = 0 Then
device = ud
interface = inter
'Find correct endpoints
For b = 0 To interface.EndpointCount - 1
Dim endpoint As UsbEndpoint
endpoint = interface.GetEndpoint(b)
If endpoint.Type = manager.USB_ENDPOINT_XFER_BULK Then
If endpoint.Direction = manager.USB_DIR_IN Then
inEndpoint = endpoint
Else If endpoint.Direction = manager.USB_DIR_OUT Then
outEndpoint = endpoint
End If
End If
Next
End If
Next
If the device is ready for reading, it first issues a 5 byte sequence: 0x53, 0x4e, 0x50, 0x31, 0x30
To get the first data set, I have to transmit: 0x55, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x60
Unfortunately I neither receive the first sequence nor I get any response when sending the second sequence. I tried also several hardware scenarios:
Medical device directly connected to tablet PC (no success)
Medical device connected via unpowered USB hub (no success)
Medical device connected via powered USB hub (no success)
Here is the information which I got from my USB Sniffer running on my Windows PC:
Device = Silicon Labs CP21x USB to UART Bridge (COM3)
Connection Information
Port: 3
Speed: Full Speed
Device address: 5
Open pipes: 2
Connection status: Device connected
Device Descriptor
USB version: 1.10
Device class: 0x0 - (Defined at Interface level)
Device subclass: 0x0 - Unknown
Device protocol: 0x0 - Unknown
Control pipe max size: 64 bytes
Vendor ID: 0x10c4 (Cygnal Integrated Products, Inc.)
Product ID: 0xea60 (CP210x Composite Device)
Product version: 1.0
Manufacturer: Not specified
Product: Not specified
Serial Number: Not specified
But if I remove the USB connector from the medical device (while the App is still running on the table) I get some data. How funny is this?!?!
Has anybody a good idea??
Does the USB library support such devices at all??
Thanks
Harald
I have some problems connecting a USB device to my Asus Transformer tablet (Android 3.1).
I want to read out the data of a Pulsoximeter (medical device measuring the heart rate and blood oxygen) via USB interface. The data is stored to the Pulsoximeter internal Flash memory which I can read by sending simple byte sequences.
I am using the USB library V.093 on Android platform 15. Software is mainly based on Erel's USB example. I also know that my tablet supports USB host mode. Using the code shown next, it seems that the device can be successfully initialized:
For a = 0 To ud.InterfaceCount - 1
Dim inter As UsbInterface
inter = ud.GetInterface(a)
If inter.InterfaceClass = 255 AND inter.InterfaceSubclass = 0 Then
device = ud
interface = inter
'Find correct endpoints
For b = 0 To interface.EndpointCount - 1
Dim endpoint As UsbEndpoint
endpoint = interface.GetEndpoint(b)
If endpoint.Type = manager.USB_ENDPOINT_XFER_BULK Then
If endpoint.Direction = manager.USB_DIR_IN Then
inEndpoint = endpoint
Else If endpoint.Direction = manager.USB_DIR_OUT Then
outEndpoint = endpoint
End If
End If
Next
End If
Next
If the device is ready for reading, it first issues a 5 byte sequence: 0x53, 0x4e, 0x50, 0x31, 0x30
To get the first data set, I have to transmit: 0x55, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x60
Unfortunately I neither receive the first sequence nor I get any response when sending the second sequence. I tried also several hardware scenarios:
Medical device directly connected to tablet PC (no success)
Medical device connected via unpowered USB hub (no success)
Medical device connected via powered USB hub (no success)
Here is the information which I got from my USB Sniffer running on my Windows PC:
Device = Silicon Labs CP21x USB to UART Bridge (COM3)
Connection Information
Port: 3
Speed: Full Speed
Device address: 5
Open pipes: 2
Connection status: Device connected
Device Descriptor
USB version: 1.10
Device class: 0x0 - (Defined at Interface level)
Device subclass: 0x0 - Unknown
Device protocol: 0x0 - Unknown
Control pipe max size: 64 bytes
Vendor ID: 0x10c4 (Cygnal Integrated Products, Inc.)
Product ID: 0xea60 (CP210x Composite Device)
Product version: 1.0
Manufacturer: Not specified
Product: Not specified
Serial Number: Not specified
But if I remove the USB connector from the medical device (while the App is still running on the table) I get some data. How funny is this?!?!
Has anybody a good idea??
Does the USB library support such devices at all??
Thanks
Harald
Last edited: