![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
![]() |
|
How to Connect To Internet Through GPRS
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
i am using a wince device which has an in built GPRS modem. now i want to connect to the internet over GPRS ,for this i have downloaded the AT command set for my wince device.and i have wriiten an application which opens the comport and writes the AT commands and reads back response from the port. i am succesful to some extent , For example in the below code, all the commands return proper response ,but how do i develope a PPP link after i get 'Connect' as response from Server. BOOL bHangup = FALSE; CString strInit; CString res; strInit = "AT"; port.Send(strInit); Sleep(1000); strInit ="AT+CGATT?"; res=OnSendAndWait(strInit); AfxMessageBox(_T("AT+CGATT? Response = ") +res); strInit = "AT+CGATT=1\r"; //GPRS res=OnSendAndWait(strInit); AfxMessageBox(res); strInit = "AT+CGDCONT=1,\"IP\",\"airtelgprs.com\""; res=OnSendAndWait(strInit); AfxMessageBox(_T("AT+CGDCONT=1 Response = ") +res); strInit = "AT+IPR=57600"; res=OnSendAndWait(strInit); AfxMessageBox(_T("AT+IPR=57600") + res); strInit = "ATS0=0"; res=OnSendAndWait(strInit); AfxMessageBox(_T("ATS0=0") + res); strInit = "AT+IFC=2,2"; res=OnSendAndWait(strInit); AfxMessageBox(_T("AT+IFC=2,2") + res); strInit = "ATD*99***1#"; res=OnSendAndWait(strInit); AfxMessageBox(_T("ATD*99***1 Response = ") + res); the above AT command returns response as, 'CONNECT' , now i know that i have to send something(LCP ,CHAP or something else) back to the server and build a PPP link, can anyone help me in writing this code, how to send a LCP packet to the server?? what would be its response?? what should i send back in order to establist the Link? |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
The Point to Point Protocol (PPP) On this site, you can find a good description of PPP packets for initialisation. I have a similar project, and i am on this state. But i have a lot of problem. I use C source that you can find on this site : SourceForge.net: uC/IP - TCP/IP for microcontrollers |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|