PPP on a connectme

Hello,

I am trying to get dial-in ppp to work on the serial-port of a connect-me module.

The problem is that PPPSetPeerAddr isn’t working (returns failure code 31 == SET_ADDRESS_ERROR) (the ip address does not seem to matter, i have tried a bunch different ones from diffrenet classes (192.168.x.y, 10.x.y.z) )

If I remove the PPPSetPeerAddr, PPPSetAuth fails instead, with code 1 (UNIT_OUT_OF_RANGE)

Does anyone here have a suggestion ?
Is there any special thing i need to configure to get ppp to work in the connectme ?

This is what I do (cut from examples/ppp/iproute)

/* set PPP interface operation mode, IP address, gateway, subnet mask */
if (PPPCreateDevice (PPP_COMPORT1, PPP_DIRECT_SERIAL_MODE, nvR.ipAddrPpp1, subnet_mask)!= 0)
{
printf ("APP: PPPCreateDevice1 failed.
") ;
return ;
}

if (PPPCreateDevice (PPP_COMPORT2, PPP_MODEM_MODE, nvR.ipAddrPpp2, subnet_mask)!= 0)
{
printf ("APP: PPPCreateDevice2 failed.
") ;
return ;
}

if (PPPSetVJ(PPP_COMPORT1, ENABLE_VJ_COMPRESSION) != 0)
{
printf ("APP: PPPSetVJ failed.
") ;
return;
}

if (PPPSetPeerAddr(PPP_COMPORT1, nvR.ipAddrPpp1peer) != 0)
{
printf ("APP: PPPSetPeerAddr 1 failed.
");
return;
}

/* Set PPP authentication requirements */
if (PPPSetAuth(PPP_COMPORT1, MY_PAP_NAME, MY_PASSWORD, MY_CHAP_NAME, MY_SECRET, ACCEPT_CHAP|ACCEPT_PAP|REQUIRE_CHAP|REQUIRE_PAP) != 0)
{
printf ("APP: PPPSetAuth[1] failed.
");
return;
}

/* initialize serial port */
if (PPPSerialInit(PPP_COMPORT1, ACTIVE_CONNECTION_MODE, COM1_BAUD_RATE) != 0)
{
printf ("APP: PPPModemInit[1] failed.
");
return;
}