Main Site Documentation

[Panda-II] Exchange raw data between the Panda II and an Android device using the USB/OTG connection


#1

I need to find a way exchange raw data (series of bytes) between a Panda II
and an Android device using the USB connector on the Panda and the USB/OTG connector on an android device.

On the Android side I’m using Mono for Android, which is why I can’t (currently) simply use the CDC feature of Panda
as there is no support for SerialPort in Mono for Android (not sure that’s even available in Java either)

I’ve seen some samples that start out with: 'USBClientController.StandardDevices.StartMouse();'
But that just throws an Invalid operation on the Panda II.

Is there an example somewhere on how to do this with a Panda?
How would it work, does the Panda simulate an HID device where the Android device would act as a host?

(I’m also hoping to avoid Java samples)

Update: Just to be clear

  • On the Android side I’ll build a simple app (for testing) that will send or receive some bytes
  • On the Panda II side I want to do the same, so I get those bytes from one device to another

Meaning that as far as software is concerned I control both sides of the connection


#2

Check this thread:
http://www.tinyclr.com/forum/topic?id=3212&page=2#msg30915


#3

I looked at that and the git repo,
but does not seem to work on the Panda II,
it complains it cannot find a FEZ device, I’m thiking the FEZ people refer to and the Panda II are not the same device?


#4

You are right. You need to do a small mod and enable USB Host functionality on your Panda II. Trying to find the instructions.


#5

Hey,

So I figured out I had to change some of the references to make it compile.
But when I run it I get an InvalidOperationException in …UsbHost.dll

Anyway, I’m sorry, I probably did not explain correctly what I was trying to do.
I do not want the Panda to be the host, I want it to simulate a HID device
that will echo whatever I send to it from a “host” device.

So I want to make it that if I were to plug it into a Windows computer, Windows
would detect a new HID device has been added.

I have the following available for testing:

  • Panda II
  • EMX
  • ChipworkX
  • NetDuino
  • NetDuino+

The reason I want to do this is because I’m waiting on a prototype of a piece of hardware
from one of our engineers, but I’d love to get started on my side right away and I cannot think of any other way to simulate a HID device (and echo whatever it receives).

(I have android devices that have host capabilities)

About the Netduino, I found a project that does something similar but it only works
on a very specific firmware version which I don’t have and I prefer working with the GHI solutions.


#6

Have you seen this codeshare:

http://www.ghielectronics.com/community/codeshare/entry/576

Anyways, the mod I was talking about before (in case somebody will be looking for it) is described here:
http://robertjacobs.eu/v2/2011/03/15/usb-host-support-is-added-on-usbizi100-fez-panda-and-fez-panda2/