Reading out huge txt-File from SD-Card

Hi there,

i want to read out a huge (lets say 2mb) txt-File from SD-Card and send it via bluetooth module to my smartphone.

My way to write huge heaps of data to the txt-File on the SD-Card is to split the data into smaller parts and append them one after another in the txt-File.

How can i do that for reading from the txt-file? To my understanding the max. size of readout data is limited by several buffers and the size of the atmegas memory.

Im using an ATmega UNO board and HC-06 for bluetooth.

The below web server code shows a method of reading data off the SD card into larger data packets.

//zoomkat 12/26/12
//SD server test code
//open serial monitor to see what the arduino receives
//address will look like when submited
//for use with W5100 based ethernet shields

#include <SD.h>
#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address
byte ip[] = { 
  192, 168, 1, 102 }; // ip in lan
byte gateway[] = { 
  192, 168, 1, 1 }; // internet access via router
byte subnet[] = { 
  255, 255, 255, 0 }; //subnet mask
EthernetServer server(84); //server port
String readString; 


void setup(){


  // disable w5100 while setting up SD
  Serial.print("Starting SD..");
  if(!SD.begin(4)) Serial.println("failed");
  else Serial.println("ok");

  Ethernet.begin(mac, ip, gateway, gateway, subnet);

void loop(){
  // Create a client connection
  EthernetClient client = server.available();
  if (client) {
    while (client.connected()) {
      if (client.available()) {
        char c =;

        //read char by char HTTP request
        if (readString.length() < 100) {
          //store characters to string 
          readString += c; 
        //if HTTP request has ended
        if (c == '\n') {

          Serial.println(readString); //print to serial monitor for debuging 

            client.println("HTTP/1.1 200 OK"); //send new page
          //client.println("Content-Type: text/html");
          client.println("Content-Type: image/jpeg");
          //client.println("Content-Type: image/gif");
          //client.println("Content-Type: application/x-javascript");
          //client.println("Content-Type: text");


          //File myFile ="boom.htm");
          File myFile ="HYPNO.JPG");
          //File myFile ="BLUEH_SL.GIF");
          //File myFile ="SERVOSLD.HTM");

          if (myFile) {

            byte clientBuf[64];
            int clientCount = 0;

              clientBuf[clientCount] =;

              if(clientCount > 63)
                // Serial.println("Packet");
                clientCount = 0;
            //final <64 byte cleanup packet
            if(clientCount > 0) client.write(clientBuf,clientCount);            
            // close the file:
          //stopping client