# GPRS connection how?

**URL:** <https://forum.sierrawireless.com/t/gprs-connection-how/578>\
**Category:** Open AT\
**Created:** [July 20, 2006, 6:27am UTC](https://forum.sierrawireless.com/t/gprs-connection-how/578 "2006-07-20T06:27:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ybdragon](https://avatars.discourse-cdn.com/v4/letter/y/e95f7d/32.png) [@ybdragon](https://forum.sierrawireless.com/u/ybdragon)\
**Post date:** [July 20, 2006, 6:27am UTC](https://forum.sierrawireless.com/t/gprs-connection-how/578/1 "2006-07-20T06:27:53Z")

</div>

Hi

I write a little program and first i just want to connect to the internet via gprs

Here is my code: [authors.aspalliance.com/aylar/Vi … odeID=5799](http://authors.aspalliance.com/aylar/ViewPasteCode.aspx?PasteCodeID=5799)

The cgatt handler doesn’t activated, I don’t know why, because the adl\_CmdCreate returns 0. The dialConnectStart returns -10 but it’s wrong because I havent any pin number. Somebody could help me fix this problem, or give a working sample code?

---

<div class="post-metadata">

**Author:** ![jan](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jan](https://forum.sierrawireless.com/u/jan)\
**Post date:** [July 20, 2006, 8:38am UTC](https://forum.sierrawireless.com/t/gprs-connection-how/578/2 "2006-07-20T08:38:50Z")

</div>

Hi,

I think it might be because the response is not “OK” or “ERROR”. Try to substitute “OK”,“ERROR” by “\*”. I think that should be the way to get all responses in the handler function. (ADL has more detailed error reporting enabled by default, so you probably get “+CME ERROR: …”)

Best Regards,  
Jan

---

<div class="post-metadata">

**Author:** ![ybdragon](https://avatars.discourse-cdn.com/v4/letter/y/e95f7d/32.png) [@ybdragon](https://forum.sierrawireless.com/u/ybdragon)\
**Post date:** [July 20, 2006, 8:44am UTC](https://forum.sierrawireless.com/t/gprs-connection-how/578/3 "2006-07-20T08:44:19Z")

</div>

> [@jan](#):
>
> Hi,
> 
> I think it might be because the response is not “OK” or “ERROR”. Try to substitute “OK”,“ERROR” by “\*”. I think that should be the way to get all responses in the handler function. (ADL has more detailed error reporting enabled by default, so you probably get “+CME ERROR: …”)
> 
> Best Regards,  
> Jan

You are right. \* is working but I get ERROR and the connection fails. Whats the problem. Why I get ERROR. Whats wrong with my code?

---

<div class="post-metadata">

**Author:** ![jan](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jan](https://forum.sierrawireless.com/u/jan)\
**Post date:** [July 20, 2006, 9:06am UTC](https://forum.sierrawireless.com/t/gprs-connection-how/578/4 "2006-07-20T09:06:59Z")

</div>

Hi again,

I think you are sending the command to early… When I used this I did send it on ADL\_SIM\_STATE\_FULL\_INIT in the SIM\_Handler function… But I found a still better way without AT+CGATT… You might want to look into this thread (look for AT+WGPRS=0,0): [http://www.wavecom.com/modules/movie/scenes/forums/viewtopic.php?t=149&postdays=0&postorder=asc&highlight=wgprs&start=30](http://www.wavecom.com/modules/movie/scenes/forums/viewtopic.php?t=149&postdays=0&postorder=asc&highlight=wgprs&start=30)

Best Regards,  
Jan
