Hello,



I'm trying to do a software that connect in a server and after acess the internet.


I'm doing the dial with the Palm using Sony/Ericsson internal modem.

But I'm not doing to do the autentication PPP.

After dial to be ready the phone wait a autentication PPP but I dont know how I do this!!!

I'll show you my source code:

What Am I doing wrong?

Best regards,

Source Code:

        MdmInfoPtr ModemInfo    =(MdmInfoPtr)MemPtrNew(sizeof(MdmInfoType));
        ModemInfo->portID            = gRefNum;
        ModemInfo->initialBaud       = 9600;
        ModemInfo->cmdTimeOut        = 5000;
        ModemInfo->dtWaitSec         = -1;
        ModemInfo->dcdWaitSec        = -1;
        ModemInfo->volume            = mdmVolumeLow;
        ModemInfo->pulse             = true;
        ModemInfo->hwHShake  = true;
        ModemInfo->autoBaud  = true;
        ModemInfo->connectBaud       = 0;

Erro=MdmDial(ModemInfo,NULL,"ATZH&F0&R1&C1&D2L3", "ATDT*99***1#");

        Word lInterfaceError=-1;
        Word lAppNetRefNum=-1;

if(SysLibFind("Net.lib",&lAppNetRefNum)==0){

if(NetLibOpen(lAppNetRefNum,&lInterfaceError)!=errNone){
...
}


              UInt32 lCreator;
              UInt16 lInstance = 0;

              if(NetLibIFGet(lAppNetRefNum,0,&lCreator,&lInstance)!=errNone){
                   lCreator = netIFCreatorPPP;
                   char user[3];
                   MemSet(user,sizeof(user),0);
                   StrPrintF(user,"%s","IP");
                   if(NetLibIFSettingSet(lAppNetRefNum,lCreator,lInstance,
                             netIFSettingUsername,user,StrLen(user))!=0){
                                  ...
                          }
                   char pass[4];
                   MemSet(pass,sizeof(pass),0);
                   StrPrintF(pass,"%s","tim");
                   if(NetLibIFSettingSet(lAppNetRefNum,lCreator,lInstance,
                             netIFSettingPassword,pass,StrLen(pass))!=0){
                                  ...
                          }
                   if(NetLibIFAttach(lAppNetRefNum,lCreator,lInstance,
                             (SysTicksPerSecond()*5))    !=errNone){
                             ...
                          }
               }

_________________________________________________________________
MSN Hotmail, o maior webmail do Brasil.  http://www.hotmail.com


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

Reply via email to