Finally,I have my app working,receiving data from a pc in my palm.
code:
error=SysLibFind("Serial Library",&refno);
if (error==0)
{
error=SerOpen(refno,port,baud);
if (error==0 )
{
error=SerReceiveWait(refno,sizeof(gSerialBuffer),-1);
SerReceiveCheck(refno,&bytes);
if(bytes>0) {
error=SerReceive(refno,gSerialBuffer,bytes,0/*timeout*/,&error);
SetFieldTextFromStr(EntradaHc1Field,gSerialBuffer); }
SerClose(refno); }
}
}
I think the problem was that I use to open the serial port in a function
placed in utils.c,and then put the code to receive data in clinica.c (main
for my app).I don`t know if this is correct(correct me if i'm wrong) but
the only thing i did was move this code from clinica.c to utils.c and put
it like i show it.
thank you for all of you who answer me and interest in my problem.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/