Main Site Documentation

SOLVED - Cobra 1 and SD Card


#1

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?


#2

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


#3

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


#4

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


#5

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


#6

@ PiWi - that would only be needed in gadgeteer


#7

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


#8

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

Not?


#9

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?


#10

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


#11

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


#12

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


#13

@ 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.


#14

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…