Dead spider, and stubborn hydra with CDC?

Hi,

Continuing work on my school project, but hit a slight wall.

Question 1:
The spider died, no clue why.
I used a SP as well as a powered DP usb module, I plug it in to multiple PC’s, nothing comes up, nothing in the device manager, not even usb sound, tried reseting, flipping the switches back and fourth, nothing. The LED comes up, but apart from that, nothing.

It did happen previously, after getting exceptions it would start running out of memory and then would go in to a lock down mode for a day. You would have to disconnect it from everything and give it some time.

Any suggestions? Is there any low level debugger for USB ports or something?
If I just disconnect the same cable and connect it to Hydra, it pops up instantly.

Question 2:
When using Hydra, I usually have to first build the code, then deploy the code manually, then run the debugger, if I just press F5, it gets stuck at sending assemblies to device, or says that device not in initialized state, rebooting, and gets stuck at that point. What could be the cause?

Another question, is it possible to run CDC with Hydra?

So far my code:


 public partial class Program
    {
        Socket[] sockets;
        USBC_CDC virtualSerialPort;
        void ProgramStarted()
        {
            sockets = new Socket[] { Socket.GetSocket(14, false, null, null) };
            GT.Timer timer = new GT.Timer(1);
            timer.Tick += new GT.Timer.TickEventHandler(timer_Tick);
            timer.Start();
            virtualSerialPort = USBClientController.StandardDevices.StartCDC();
        }
        private string buildString()
        {
            int cInput = 0;
            string result = "";
            for (int i = 0; i < sockets.Length; i++)
            {
                Socket socket = sockets[i];
                result += cInput++ + ":" + (int)System.Math.Round(socket.AnalogInput3.ReadVoltage() * 1024 / 3.3) + "\n";
                result += cInput++ + ":" + (int)System.Math.Round(socket.AnalogInput4.ReadVoltage() * 1024 / 3.3) + "\n";
                result += cInput++ + ":" + (int)System.Math.Round(socket.AnalogInput5.ReadVoltage() * 1024 / 3.3) + "\n";
            }
            return result;
        }
        private void timer_Tick(Gadgeteer.Timer timer)
        {
            if (virtualSerialPort != null)
            {
                virtualSerialPort.Write(System.Text.Encoding.UTF8.GetBytes(buildString()), 0, buildString().Length);
            }
        }
    }

the exception


    #### Exception System.Exception - CLR_E_DRIVER_NOT_REGISTERED (2) ####
    #### Message: 
    #### Microsoft.SPOT.Hardware.NativeEventDispatcher::.ctor [IP: 0000] ####
    #### GHIElectronics.NETMF.System.InternalEvent::.cctor [IP: 0014] ####
An unhandled exception of type 'System.Exception' occurred in Microsoft.SPOT.Hardware.dll

Thanks.

I have no idea how I managed to post in the wrong section, can one of the admins be kind enough to move this to .NET?

Thank you.

Please use different posts for each question. Why? Easier for everyone to help you and you get more points anyways :slight_smile:

Q1: try different cables
Q2: are you using 4.2? QFE2 will be release tomorrow so give it a try then let us know if you still have problems
Q3: CDC is part of premium features.

This means that using the same PC to USB cable, as well as using the same USB module to mainboard cable, it works with hydra no problems.
Should I still try different cables?

I am using 4.1 at the moment. I believe. How do I acquire these premium features?
And is CDC a premium feature for hydra only? Because for Spider it worked out of the box without having anything premium.

@ Jammer - Spider is premium, Hydra is open hardware like Cerberus so they do not have premium features.

Products now have a little logo showing premium vs open http://www.ghielectronics.com/catalog/category/274/

Nice logo!

Any guidance how to bring the spider back to life?

At the moment with all 4 dips off, it does not show up in the device manager, though the power LED is on.

i`de try flashing the spider to the latest sdk 4.2[qef2] there is a utility to do that under firmware updated from start / program files in windows. see http://www.tinyclr.com/forum/topic?id=8499 for links to latest release. assuming you want to be at the latest release that is.

you could check the relaease in mfdeploy if you then wanted. ansd if thats ok ide do the simple led flasher code thing just to make sure the spider is all working, then at least youll know the spider is ok, and can go from there

Does it show up as an unknown device?

Do you have the GHI Gadgeteer camera? If so, plug that in the DP, and then the DP into USB of your computer. It should show up as a USB camera.

It does not show up as anything, at all, its just not in the device manager, no matter what, though the red LED is on.

We have been given a second spider, but as it appears the same scenario is happening. Second device is no longer visible in the device manager too, on none of the machines, no matter what the dip switch positions are, pushing or holding reset while the device is connected or disconnected doesn’t seem to help either. This happened after putting the device in to CDC mode, then disconnecting it from USB and reconnecting. Reset does not help.

As I said, if I disconnected the UsbSP module from the spider, and connect it to a different board, the different board comes up instantly, confirming that the USB module is fine. I have also tried hard powered UsbDP module, but that doesn’t help either.

Assuming they are damaged, how did it happen?! What is your spider connected to?

First time we had UsbSP module and Wifi Module connected, second time, only the UsbSP module, nothing else.

I do not see any possible way of the device being physically damaged, as we only worked with the software part, nothing to do with the hardware. I think its more of a software bricking then hardware fault.
Can a sequence of disconnecting the device from Usb, or resetting during deployment have anything to do with this?

The second device was completely dead yesterday, and after checking with my team mate I was surprised it came back to life.
Yesterday it was not coming up on the device manager at all, no matter what switch position, port, usb module or how many times we pressed the reset button. Today, magically it started showing up as Unknown device first, we tried connecting it to a different port, it didn’t came up at all, connected back to the first port a few times and it eventually showed up as EMX, installed drivers and started working.

I am 99.99% sure its not a hardware issue, as we are just trying to send back some data over CDC, once that is done, we can start implementing hardware.

We still have the first device which refuses to work.

Also, judging other devices of a similar nature, usually there are built in protection against possible short circuit?

You are saying you see absolutely nothing on device manger and you have tried multiple computers?

I am 99% sure it’s more likely a hardware issue, probably due to you trying to pull too much power through the SP module from your PC. Wifi module sucks juice like no other. But here’s one thing I would try. Leave CDC alone for a while, put a LED blinkie app on the board for a while and make sure that works and make sure you can move that board around to your other PCs. The CDC driver may be affecting this, and by moving back to a vanilla non CDC app you can prove that.

@ Gus:

Yes, absolutely nothing in device manager. Tried multiple machines, multiple OSes.

@ Brett

If only the device would come up in device manager, I would.