I've solved my problem.

The problem happens when sending more than 64KB of data. It works fine when sending over bluetooth. When using IR, there is no error using ExgSend, but, something happens and data is sent incomplete.

What I did is sending in chunks of 64KB, instead of trying to send everything. It now works fine on both, IR and bluetooth.

I hope this helps someone facing the same problem

Miguel

Miguel Angel Sotomayor Hernandez escribió:

Hi all,
I'm using Exchange Manager to share some data between two palms. I'm having this problem:

I'm using "?_beam;_btobex:" as a prefix in the name of the "file" to be sent so users can choose amongst beaming using IR or sending using only bluetooth (no sms or mail or anything else). When I select bluetooth it works just fine, sending "files" up to a few Kb. When I select beaming using IR the information is incomplete. The only difference is what I choose in the dialog (Beaming or Bluetooth). As you can see, this error doesn't depend on my application, but the exchange manager.

Does anyone know the reason of this behavior? should I use another prefix for IR beaming (while still preserving bluetooth)? why chosing ir beaming sends incomplete information while chosing bluetooth sends it complete?

Here is my function:

Err EnviaDatosDispositivo(Char *dbName, void *buffer, UInt32 tam){
   ExgSocketType exgSocket;
   Err error;
   Char name[51];
     MemSet(&exgSocket, sizeof(exgSocket), 0);
   StrCopy(name, "?_beam;_btobex:"); // only works when using bluetooth
   //StrCopy(name, "_beam:");
   StrCat(name, dbName);
   StrCat(name, ".");
   StrCat(name, libExtensionReportes);
     exgSocket.description="Reporte Storecheck";
   exgSocket.name=name;

     error = ExgPut(&exgSocket);
     if(!error){
                  while(!error && (tam>0)){
UInt32 bytesEnviados = ExgSend(&exgSocket, buffer, tam ,&error);
           tam -= bytesEnviados;
           buffer = buffer + bytesEnviados;
                 }
       if(error)
           FrmAlert(ConexionAlert);
       error = ExgDisconnect(&exgSocket, error);
             if(error)
           FrmAlert(ConexionAlert);


   }

   return error;

}

Thanks in advance

Miguel


--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to