Using SD Card Reader with ethernet at the same time

Hello everyone,
for a project I need to save events as a txt file in sd card. both Ethernet and Sd Card needs to be active.
but because of SPI limitation I can not run them at the same time. in arduino ethernet shield page there is an explanation that if I want to use them together I need to use proper libraries.

do you have any idea that which libraries make this possible. or what kind of coding help to solve this issue.

thanks for help..

I use the ethernet and SD card on the ethernet shield. I have used both the ethernet library included with the IDE, and the newest library from Wiznet with good results. I have used both the SD library included with the IDE and the newest SdFat library with good results. I have tried all these in different combinations with good results.

Here is a web server I am currently testing running on a Due and ethernet shield. Most of the pages are stored on a SD card, and uploaded to a web browser on request. It is just a test to show the web browser can request a variety of different types of files (htm, js, css, jpg, ico) and they will be uploaded correctly.

You can find the code for the server here.

I can not run them at the same time

And you never will, libraries or not, because there is only a single SPI link. To do them at the same time you need a CPU with two SPI ports.

You will be able to interleave reads/writes between the two devices however, and the libraries SurferTim points to might be that clever.

Graynomad:
And you never will, libraries or not, because there is only a single SPI link. To do them at the same time you need a CPU with two SPI ports.

You will be able to interleave reads/writes between the two devices however, and the libraries SurferTim points to might be that clever.

Not "might be that clever". They work fine together. The link to my server above is still good.

Unless you have a processor that has more than one core, there is never such a thing as "at the same time". But my code is close enough that they work in harmony with each other. Does that sound better?

thank you for your valuable share SurferTim. I will immediately try these libraries and your code..
regards..

Dear SurferTim thank you again your great information. I just modified only Setup block on my sketch according to server code you provided. and it works perfect.

If you plan on exposing your Arduino to the internet, and didn't use at least the timeout function from my server code, it will lock up. I'm watching a couple clients attempting to crash my server right now.

The client IP function I use now is working out well. I know who is accessing my server, at least by IP address. If you want to hide from me, you should use a proxy server.