SOLVED - Cobra 1 and SD Card

I’ve downloaded the latest SDKs, and updated my Cobra 1 to the latest firmware, and I’m trying to update my WebSocket project.

I have this line of code to create an instance of the SDCard:


private static GHI.IO.Storage.SDCard sdCard;
sdCard = new GHI.IO.Storage.SDCard();

And I get this exception:


    #### Exception System.Exception - 0xffffffff (1) ####
    #### Message: 
    #### GHI.IO.Storage.SDCard::NativeConstructor [IP: 0000] ####
    #### GHI.IO.Storage.SDCard::.ctor [IP: 0017] ####
    #### JDI.WebSocket.MFConsoleApp.Program::InitializeSDCard [IP: 000c] ####
    #### JDI.WebSocket.MFConsoleApp.Program::Main [IP: 0004] ####

This is so simple! What could I be doing wrong?

It doesn’t look you are doing something wrong. Maybe an implementation issue on Cobra I

btw. Is cobra 1 based on EMX? I have an application running fine on EMX with 4.3 and use the same code.

@ RobvanSchelven - Yes, it is EMX, and should work.

Did you try to create it a new thread ?

For further details please see https://www.ghielectronics.com/community/forum/topic?id=16569&page=2#msg165490

@ PiWi - that would only be needed in gadgeteer

Thanks PiWi and Gus. I’ll try it on another Cobra 1, and see if I have the same problem.

According to this post you should use another library: https://www.ghielectronics.com/community/forum/topic?id=16806&page=1#msg166736

Not?

I tried another Cobra 1, and I updated to the latest R3 release, but I’m still getting an exception when executing this code:


private static GHI.IO.Storage.SDCard sdCard = new GHI.IO.Storage.SDCard();

Has anyone else tried the latest version of GHI SDK on a Cobra 1 or other non-Gadgeteer EMX board?

Hi,
have a look on this thread
https://www.ghielectronics.com/community/forum/topic?id=16806
Cheers
Roland

I just did it, on Corba 1 and EMX Deplopement board, they work fine.
Tried with SDHC 8 and 16G
and SDXC 64G

Any links to the update process, I seem to be blind for it

@ RoSchmi - I don’t think that thread applies here because it is for a Gadgeteer “main” board.

@ Dat - Ok, thanks I must be doing something wrong. I’ll have another look.

It works now! I switched USB ports on my computer and it started to work. Perhaps there is a power issue with the previous port?

Thanks everyone for you help and suggestions.

Now I need to get secure networking working…