I have question regarding Vx520 and PPP connection. I have to create PPP X.25 connection to my client, it requires Login and Password. I tried to set up PSTN connection (using ceStartDialIF functions for CE_COMM_TECH_DIALONLY device). It doesn't work with CE_COMM_TECH_PPPDIAL, besides there is no possibility to define username and password in CE_COMM_TECH_DIALONLY connection, in the CE_COMM_TECH_PPPDIAL there is no possibility to define phone number to my client. Please explain me how to implement PPP connection via PSTN that uses credentials and X.25 protocol. I know how to configure ETHERNET and GPRS, but it is very hard to create such connection via PSTN.
Asked
Active
Viewed 631 times
1
-
what did you try so far? – GottZ Oct 09 '15 at 16:16
-
I don't know what is the proper flow of the PPP over PSTN. Is it realized over PPPDIAL or is there another way to create the PPP connection? – Marcin Głogowski Oct 09 '15 at 16:23
-
I used EOS-Dial-Download project downloaded from VeriFone DevNet as a base. I don't know how to pass X.25 option, login and password there – Marcin Głogowski Oct 09 '15 at 16:32
1 Answers
0
Ok, I produced such code - is it ok to make PSTN/PPP connection?
int iCount;
int iBuffer;
stNIInfo *pniInfo;
unsigned int retLen;
char chBuffer[50];
// Register with CommEngine
ceRegister();
// Fetch number of Network Interfaces (NWIF)
iCount = ceGetNWIFCount();
// Allocate space
pniInfo = new stNIInfo[niCount];
// NWInfo
ceGetNWIFInfo(pniInfo, niCount, &retLen);
//Search for driver types and keep the handle
for (int z = 0; z < niCount; z++)
{
// uwaga: dla GPRS należy jeszcze sprawdzać comm technology
if (pniInfo[z].niDeviceDriverType == CE_DRV_TYPE_PPP)
iPPPHandle = pniInfo[z].niHandle;
}
//In the case of a string type:
ceSetDDParamValue(iPPPHandle,INI_DIAL_PRIMARY,"002222229000",sizeof("002222229000"));
ceGetDDParamValue(iPPPHandle, INI_DIAL_PRIMARY, sizeof(chBuffer), chBuffer, &retLen);
stNI_PPPConfig pppCon;
pppCon.ncAuthType = PPP_AUTH_PAP;
strcpy(pppCon.ncUsername,"User1");
strcpy(pppCon.ncPassword,"!21wsed@@");
// set login & password for the PPP connection
ceSetNWParamValue(iPPPHandle, "PPP_CONFIG", (const void *)&pppCon, sizeof(pppCon));
//open network interface
ceStartNWIF(iPPPHandle, CE_OPEN);

Marcin Głogowski
- 11
- 2