PPP connection fails (update)
Posted: Wed Jun 09, 2010 10:22 pm
Hi all,
Just thought it might be useful to anyone else in the future having the same issue with PPP connection over GPRS.
I worked with the modem manufacturer and traced it to the use of the MAGIC number LCP option in the packet. In the Nerburner PPP code it was being set to ZERO's to indicate to the network that we don't want to use them. This is standard practice and should have worked. They suggested I reply with the same magic number and it now connects to the GPRS network each time and I can now do TCP/IP connections etc.
This is the section in the code that I used. I have suggested to Netburner support that this be added as an option in PPPoptions so that this can be done at the programming level. For now I have simply commented the MEMSET line out but I am going to add an option for this before I roll out the code. When I detect that the network failed to connect, I can try the opposite option on the next attempt.
case LCP_OPT_MAGIC:
PPPDBIPRINTF("LCP_OPT_MAGIC read and is GOOD(ACK)\r\n" );
// memset( ( option_start + 2 ), 0x0, ( *( option_start + 1 ) ) - 2 );
options_ok_mask |= maskv;
Hope this helps anyone else in the future.!
Dave...
Just thought it might be useful to anyone else in the future having the same issue with PPP connection over GPRS.
I worked with the modem manufacturer and traced it to the use of the MAGIC number LCP option in the packet. In the Nerburner PPP code it was being set to ZERO's to indicate to the network that we don't want to use them. This is standard practice and should have worked. They suggested I reply with the same magic number and it now connects to the GPRS network each time and I can now do TCP/IP connections etc.
This is the section in the code that I used. I have suggested to Netburner support that this be added as an option in PPPoptions so that this can be done at the programming level. For now I have simply commented the MEMSET line out but I am going to add an option for this before I roll out the code. When I detect that the network failed to connect, I can try the opposite option on the next attempt.
case LCP_OPT_MAGIC:
PPPDBIPRINTF("LCP_OPT_MAGIC read and is GOOD(ACK)\r\n" );
// memset( ( option_start + 2 ), 0x0, ( *( option_start + 1 ) ) - 2 );
options_ok_mask |= maskv;
Hope this helps anyone else in the future.!
Dave...