Odd characters appearing in FTP uploaded data when using GPRSBee

Hi,
We have a Mbili with a GPRSBee (rev. 6) uploading data (~50K) every half hour (using FTP lib) and this works fine however we have a small issue with odd characters appearing in the uploaded output at regular intervals (see below);

14283,1011
14414,1010
14545,1010
14�@��678,1010
14809,1011
14941,1011
15074,1011

It isn’t effecting the data received however it does effect the programs used to post process the data.

The following is a code excerpt from the part that does the uploading to the server:

void uploadData2() {
  Serial.println(F("Uploading burst data via FTP"));

  Serial.println(F("Switching on.."));
  bool retval = gprsbee.on();
  Serial.print(F("...done. Retval = " ));
  Serial.println(retval);
  
  if (!gprsbee.openFTP(APN, SERVER, USERNAME, PASSWORD)) {
    Serial.println(F("Failed to open connection"));
    gprsbee.off();
    return;
  }

  if (!gprsbee.sendCommandWaitForOK("AT+FTPPUTOPT=\"APPE\"")) {
    Serial.println(F("Failed Append command "));
    gprsbee.off();
    return;
  }

  if (!gprsbee.openFTPfile(dateString, FTPPATH)) {
    Serial.println(F("Failed to open file on FTP server"));
    gprsbee.off();
    return;
  }

  // Append data to the FTP file.
  char myData[1360];
  tempFile = SD.open("temp.txt",FILE_READ);
  if (tempFile) {
    dataSize = tempFile.size();
    Serial.print(F("\nFileSize> "));Serial.println(dataSize);

      while (dataSize >= 1358) {
        for (int i = 0; i < 1358; i++) {
          myData[i]=tempFile.read();
          dataSize--;
        }
        if (!gprsbee.sendFTPdata((uint8_t *)myData, strlen(myData))) {
          Serial.println(F("Failed to upload data"));
          gprsbee.off();
          return;
        }
        Serial.print(F("\nFileSize> "));Serial.println(dataSize);
      }

      //send the remaining data
      Serial.println(F("sending remaining data"));
      memset(myData,0,sizeof(myData));
      dataLeft = dataSize;
      for (int i = 0; i < dataLeft; i++) {
        myData[i]=tempFile.read();
        dataSize--;
      }
      
      if (!gprsbee.sendFTPdata((uint8_t *)myData, strlen(myData))) {
        Serial.println(F("Failed to upload data"));
        gprsbee.off();
        return;
      }
      Serial.print(F("\nFileSize> "));Serial.println(dataSize);
  }
  else {
    Serial.println(F("Cant Open File"));
  }  
      
  if (!gprsbee.closeFTPfile()) {
    Serial.println(F("Failed to close file. The file upload may still have succeeded."));
    gprsbee.off();
    return;
  }

  if (!gprsbee.closeFTP()) {
    Serial.println(F("Failed to close the connection. The file upload may still have succeeded."));
    gprsbee.off();
    return;
  }
  
  Serial.println(F("Done"));
  gprsbee.off();
}

I assume i doing something wrong with the way i am setting up the myData char array. Can anybody see what i am doing wrong here.

Any help is much appreciated.

Cheers.

Anybody have any thoughts on this…