Emulate sd card

Hi!

I saw that when angstrom is up an external device appears in my pc. I don’t know if this feature can be used to emulate a sd card. My intention is read from one sd card writer and then send the data through wifi or ethernet (something like http://www.eye.fi/)

Thank you!

Hi,

Most sd-card adapters present sd-cards as usb mass storage devices.
Linux mass storage gadget allows you to specify the backing store to
use. The following information is probably outdated but should give
you a better understanding of how to do things
http://www.linux-usb.org/gadget/file_storage.html so all you really
need to do is to use /dev/mmc?? as backing store of your gadget.

Greetings

Hi! Thank your for your message. The problem is that my interface is directly to the sd pinout (mosi, miso, cs and clk pins) not USB.
My camera saves images into a SD card but I want the beaglebone to act as SD card. So the camera thinks that is writing into the sd card
and I can catch the image in real time.

Greetings

2012/8/28 Kees Jongenburger <kees.jongenburger@gmail.com>

Hi! Thank your for your message. The problem is that my interface is
directly to the sd pinout (mosi, miso, cs and clk pins) not USB.

SD pinout is CMD, CLK, and DATA (1 or 4, usually), unless you're camera
uses the SPI mode.

My camera saves images into a SD card but I want the beaglebone to
act as SD card. So the camera thinks that is writing into the sd
card and I can catch the image in real time.

I don't think the MMC/SD IP block can act as a device, only as a host.
The SPI interface in Linux (if you're camera does SPI mode for the SD)
can only act as a SPI master.

So, no, you can't make a Beagle act like an SD card, at least not
without quite a lot of bare metal programming (ie: the SPI IP block
should be able to be a SPI slave but Linux doesn't support that).

Really, the best device for this use case would be an FPGA or similar
that connects to the Beagle and to the camera. The FPGA can simulate
the SD card and cache the image in memory, then alert the Beagle that it
has something to fetch. The FPGA and Beagle can talk to each other on
SPI or I2C or similar. FPGAs (and their ilk) are great at this kind of
thing.

-Andrew

I was looking the arduino sd library and it uses the pins I mentioned (SPI). I did not know that cameras works in other mode so I am going to search more about this feature.
There is no problem to use other devices, I will try with arduino (I don’t have any fpga now but I can’t wait :P)

Thank you!

2012/8/28 Andrew Bradford <andrew@bradfordembedded.com>

Have a read through the SD physical spec [1]. It's good "bedtime
reading." :wink: It'll put you to sleep.

[1]: https://www.sdcard.org/downloads/pls/

Generally, as far as I'm aware of, Arduino acts as a SD host, not a
device. Acting as the device isn't as easy as acting as the host, since
the host sets the clock and the device has quite hard real-time
requirements (this goes the same for a SPI slave, too) unless you only
support very limited fixed size transactions (which is not always
possible depending on the host's desires if you can't change them).

Let us know how you make out, I'm curious to hear.

-Andrew