I am storing some values from the arduino into a file(.txt) on the SD card. I am unable to access this file from my Gen2. My main aim is to transfer the data in the file from the SD card to my PC and for the purpose of transferring this data I need the Gen2. Please help!
I don't understand... you have an Arduino shield with SD and you want to read that SD in Galileo? Would you please elaborate e little bit more? How are you developing you Galileo code (Arduino, XDK)?
This message was posted on behalf of Intel Corporation
On the Galileo, in order to have access to the content of the SD card from the Terminal console you have to access the folder: /media/mmcblk0p1
Let us know if this is what you want to accomplish.
I am assuming that you mean that you wrote these files using an Arduino on the card you use to boot Galileo -- If the files are on that card -- they are in the FAT32 partition...skip to the end, if you don't care to know why...
The stock Galileo 2 microSD card has two partitions -- the boot partition is a FAT32 partition, which is used because Windows users need a partition that Windows can read and write natively. Galileo and Edison run Linux, so -- the other partition is a Linux partition. The Linux on Galileo can read both partitions, but -- your Windows PC and the Arduino SD card library can only deal with the FAT32 partition. The Linux partition name is irrelevant and even if you were to use that -- it is mounted at '/media/card', so that would be the root of the FAT32 partition. (It already has the folders 'boot', 'firmware' and 'win-driver' and the bzimage file.)
You can create a folder there -- name it what you like and write there, or just write to the root using the Arduino SD library. You cannot write to the other partition, however and a Windows machine cannot read or write them, either. Mine has about 33MB -- not a lot, really. This is the root ("\") in Windows and in the Arduino SD library -- it is important to keep that straight because in Galileo 2's Linux it is NOT "/". (It is "/media/card/", but ONLY to Linux).
In that image -- /dev/mmcblk0p1 is the partition you must write to -- however, this is Linux and the name means nothing whatsoever to the Arduino SD library and it only "sees" that partition. Partition names -- are not important to you unless you are actually partitioning -- you do not use them in file operations in Windows or Linux.
As you are attempting things -- I want to suggest that you learn at the same time how to get your bearings. For example, before you try to write to an SD card, try to read from it, or at least get a directory listing. (I think that when you have it right, you should see the three folders and bzimage file.) Next, I would try to use the Arduino SD library to create a folder and then -- write there. Notice the last Linux command I ran -- I got a listing of the /media/card directory -- that is your folder, with my 'jinzai' folder added to it. That is how I can transfer files between Windows and Galileo. ;-)
Finally -- if this is NOT the microSD card used to boot the Galileo, then your issue lies elsewhere. If you boot from that card, you cannot take it out and put another in because Linux has many mount points on it and they cannot be unmounted while running Linux. Windows and Linux have completely different notions of devices and filesystems and it pays to learn as much as you can about both, but -- it is not an easy task by any means.