Is pass-through USB possible?

I have a spider hooked up to usbclientDP, RS232, DIsplay_T35, and USBHost modules. Using VC2010, I have connected the USBClientDP and Display_T35 to a Spider board. The USBHost and RS232 are not connected (in the IDE), not even on the IDE space (so I manually added references to the Host and other GHI.Premium dll’s to make the code work).

I let the IDE and Gadgeteer libraries initialize the USB Client and Display. (I’m not using the display for anything in this project, but it does show me when the board crashes or has an abort).

My code is trying to let a Kingston G2 USB drive show up through the USBClient to a windows (7, 64bit) PC.

I can get the device to show up, but it always appears un-formatted.

Is there a way to pass the Kingston’s file system through the USB client to the PC? Or do I have to reformat the Kingston when I insert it?

Here’s the code.

using System;

using Microsoft.SPOT;
using Microsoft.SPOT.IO;

using GHI.Premium.USBHost;
using GHI.Premium.IO;
using GHI.Premium.System;
using GHI.Premium.USBClient;
using Gadgeteer.Modules.GHIElectronics;

namespace GadgeteerApp1
    public partial class Program
        static PersistentStorage ps = null;
        static USBC_MassStorage ms = null;

        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
            // Subscribe to USB events
            USBHostController.DeviceConnectedEvent += new USBH_DeviceConnectionEventHandler(DeviceConnectedEvent);
            USBHostController.DeviceDisconnectedEvent += new USBH_DeviceConnectionEventHandler(DeviceDisconnectedEvent);
            Debug.Print("USB Host subscribed to events");
            ms = USBClientController.StandardDevices.StartMassStorage();
            Debug.Print("USB ms started"); 

        void DeviceDisconnectedEvent(USBH_Device device)
            Debug.Print("Device Disconnect Event Detected");
            Debug.Print("ID: " + device.ID + ", Interface: " + device.INTERFACE_INDEX + ", Type: " + device.TYPE);
        void DeviceConnectedEvent(USBH_Device device)
            Debug.Print("Device Connect Event Detected");
            Debug.Print("ID: " + device.ID + ", Interface: " + device.INTERFACE_INDEX + ", Type: " + device.TYPE);
            if (device.TYPE == USBH_DeviceType.MassStorage)
                Debug.Print("USB Mass Storage detected...");
                ps = new PersistentStorage(device);
                ms.AttachLun(0, ps, " ", " ");

Is this different that the previous question, the one we are testing?

@ Gus - Hi Gus, I’m not entirely sure - and don’t mean to ask the same question twice. Previously, I thought I was asking about the functions and how they work. Here, I’m asking about the intent of the design, that is, “Is what I am trying to do something that should work?”. If they are indeed the same, please feel free to delete this thread.

I have passed this on to the experts. You should hear back on this or other thread soon.

Thanks, Gus - I’m still playing with various options to try to make it work and will let you know if I stumble upon any magic. :slight_smile: