Question

(!!!Important)"AT"+"GPRS"==>"Internet" Only... [EMC, njabin, BigRAT, ...]

Asked by: zicon5

(!!!Important)"AT"+"GPRS"==>"Internet" Only...

Dear All.
I'm interested in accessing internet from my microcontroller, or from a dumb Serial Editor (e.g. Hyperterminal) that means, I should use the AT commands.
I've a TCP/IP Stack from SII Seiko.

I've already read over than 25 posts, that almost all have the same question, but not a unique & COMPLETE answer...
SO, Please, Please, try to make this post complete in order to make it reference for the connection to the internet via GPRS
without any API, nor Windows Services, nor Softwares...
Simply, by AT commands.

The question about connecting to the modem is trivial, & already anwered several times.
The modem is functionning in GSM, Voice Calls, SMS, ...

Of course, the problem is that After dialing the number via Hyperterminal, I get CONNECT & The negotiation sequence that fails & yields to NO CARRIER.

Also, It would be very kind from your part "njabin", if you upload the PPP linux negotiation doc to some server & mention its URL.
Also, a description of RASDIAL.EXE, could help.

For the moment, I've read in several datasheet that the following sequence is necessary for accessing the GPRS:

AT+COPS=0             /// Automatic OPerator Selection.
AT%CGPPP=1               /// 0=No negotiation, 1=PAP, 2=CHAP, 3=automatic
AT%CGPCO=1,"PAP,<username>,<password>",1       ///First 1=ASCII, PAP, second 1==CID
AT+CGATT=1                        ///ATTach to GPRS PDN.

AT+CGDCONT=1,"IP","<APN>"    ///APN is provided by your operator.
AT+CGACT=1,1             // First 1 ==activate Context, Second 1=CID
ATD *99***1#            ///1==CID

& as usual, I get the CONNECT
& the negotiation sequence delimited by ~==7eH.
& after spme seconds, NO CARRIER...

thanks a lot in advance for your help.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-06-07 at 03:44:32ID20640236
Tags

gprs

Topic

General Packet Radio Service (GPRS)

Participating Experts
5
Points
0
Comments
19

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. GPRS communication
    hi everyone, I am developing a GPRS application on ppc2002.i havent worked on GPRS before sending at commands at the hyperterminal is not working please help e throught this. waiting in anticipication regards mahesh
  2. GPRS setup
    can anyone please tell me howto set up the GPRS. I have a Wavecom GSM/GPRS modem i want to connect to the internet using this wireless modem.I have the GPRS account activated.My machine runs on windows 2000. help me out
  3. SMS over GPRS
    I'm trying to send sms over gprs with a modem connected to pc through a serial cable. The AT command that I use are the follow: AT+CGSMS = 0; AT+CMGF = 1; AT+CMGS = "PhoneNumber" > Testo del messaggio ^Z(CTRL+Z) I have tried to send command with hyperterminal a...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: BigRatPosted on 2003-06-08 at 08:58:03ID: 8676680

"& the negotiation sequence delimited by ~==7eH."

That is the SP asking for the establishment of a Point-to-Point protocol connection.

I don't see how you can enter the correct establishment sequence which a normal PPP stack will make in HyperTerminal?

What does the TCP/IP stack ask for the transport layer, ie: what form of serial protocol does it support?

 

by: zicon5Posted on 2003-06-09 at 01:44:41ID: 8680235

Dear BigRat.
Maybe, I made it a little bit confusing. I re-explain:

Before automating everything with the microcontroller, I'm testing the connection with Hyperterminal.
So, I'm doing two disjoint experiences:
1- PC + Hyperterminal +RS232 direct cable+ Modem
2- uC + TCP/IP stack + Modem.

Both of these solutions didn't work.

NB: I'm not using any negotiation sequence, nor RAS, ...
Plz, Tell me, what should I do? & if it's necessary to negotiate the PPP connection? & how?

 

by: njabinPosted on 2003-06-12 at 04:17:56ID: 8707588

Hi zicon5 ,
     You use the HyperTerminal to send the AT commands, if the AT commands is right, the GSM/GPRS modem will return "CONNECT". If you use the PC to connect with the modem, after the "connect", you can get the "NO CARRIER" .
This is right, you dont worry about it. If you want to use your TCP/IP stack, you must create a PPP link. As for the PPP source code, you you want to get it , give me your email, I can send it to you.
     If you have any question, PLZ contact with me.
   BR/njabin

 

by: zjh0910Posted on 2003-06-12 at 08:33:00ID: 8709813

hi njabin :
            i  meet some question about the ppp ,too. do you help me?  my email: zjh0910@sina.com . thank you!

 

by: zicon5Posted on 2003-06-12 at 10:32:28ID: 8710902

Hi Njabin.
10x, for ur response.
U said I must create the PPP link, HOW? isn't it the jov of the TCP/IP & PPP Protocol STack S7600.
I don't think that I should negotiate myself for the connection as describe in MC AN724, otherwise, what is the S7600 for?

Thanks in advance for any illustration.
My email is n5pascal@hotmail.com.

 

by: njabinPosted on 2003-06-12 at 18:50:01ID: 8714068

Hi zicon5 ,
     Yes, you does not create a PPP link by yoursekf, because the S7600 has supportted it. So when you complete the AT commands, you can set the S7600 active.
     You can refer the documents:
http://www.thomtronics.com/pdf/ch/ieasy2_data_ch.pdf
http://www.nist.gov/pc2001/PC%202001%20Speaker%20Slides.pdf/PC%20%202001%20Svetlana%20Avramov.pdf

       If you have any question ,PLZ contact with me.
       Best Regards,
njabin

 

by: zicon5Posted on 2003-06-13 at 04:37:55ID: 8716718

Dear Njabin,
I'm Ok, with you, concerning the no need of implementing manual negotiation, cos this is the work of S7600.
But, the problem is :
The uC enters the loop & doesn't get out...
I see the semicolon on the LCD & nothing else (Not the colons)
Also, the same for the second loop, the uC loops in it...
 
I'm spying the serial Data coming & going thru the modem, everything is OK.
That means, the serial port of the Seiko is 100% working...
 
I'm using the GPRS compatible modem Enabler-G from Enfora.
This is a code Snippet:
 
 
 lcd_putc(';');

 // (Register 0x60) wait for PPP to be Up
 while(!(ReadSeiko(PPP_Control_Status)&0x01))
      delay_ms(5);
 
 lcd_putc(':');
 
 while(ReadSeiko(Our_IP_Address_L) == 0); // detect when ready to proceed
 
  delay_ms(500); //I added it.
 
 
So, what do u you think? What does forbid the PPP to be up? & forbid allocating of an IP @??????????
 
10x

 

by: njabinPosted on 2003-06-13 at 05:01:49ID: 8716940

Hi zicon5 ,
     I want to ask what kinds of authorization you adopt?
 Because you have not seen the colon, so the problem will happen on the function of the ReadSeiko(PPP_Control_Status). I think it is not authorized because the password or username is wrong.
    As for the IP, because the funcrion of the  ReadSeiko(Our_IP_Address_L) does not work, so you did not get the IP.
    BR/njabin

 

by: zicon5Posted on 2003-06-13 at 07:02:49ID: 8717842

Hello Njabin,
Actually, My operator is Swisscom,
I memorized the Context, APN in the SIM.
The user name & password are gprs, & gprs...

The code snippet I use:

WriteSeiko(PPP_Control_Status,0x01);      // reset PPP
WriteSeiko(PPP_Control_Status,0x00);
WriteSeiko(PPP_Control_Status,0x20);      // set PAP mode
delay_ms(5);


      strcpy(user,"gprs");
      i=4;
      WriteSeiko(PAP_String,i);      // Write string length to PAP register

      // Write "Username" to PAP register in S-7600A
      for(j=0; j < i; j++)
            WriteSeiko(PAP_String,user[j]);


      //Determine length of "Password" and write it to the PAP register

      WriteSeiko(PAP_String,i);      // Write string length to PAP register

      // Write "Password" to PAP register in S-7600A
                strcpy(pass,"gprs");
      for(j=0; j < i; j++)
            WriteSeiko(PAP_String,pass[j]);

      WriteSeiko(PAP_String,0x00);// Write final NULL character to PAP register


    strcpy(tampon,"ATD*99#");
    S_Putchaine(tampon,7);
    S_Putc('\r');            // end with CR      

I see while sniffing the serial output of the modem, the commands flowing right, & the response is OK.
I even see the negotiation sequence, that is several times from 1st side, & then  several times from second side. (Because Echo is on.)
BUT THE RESULT IS NO CARRIER.

I even tried to connect thru GSM & not GPRS, the result was CONNECT & NOT NO CARRIER, but, Also, the IP is null...

If you have a solution, maybe using the GSM, say it plz...
10x for u response.

 

by: zicon5Posted on 2003-06-13 at 12:05:14ID: 8719989

I didn't mention, all the code, but, of course before the Dial (ATD*99#), I only make activation of Context, with AT+CGACT=1,1...

All other AT commands were entered & saved (memorized into the SIM), like +CGATT=1, CGAATT=1, %CGPPP=3 or 1 (tried both), %CGPCO=1,"IP","gprs.swisscom.ch", +CBST=7,0,1, +COPS=0

 

by: njabinPosted on 2003-06-15 at 22:09:37ID: 8729405

Hi zicon5,
      Here you said "I even tried to connect thru GSM & not GPRS", I assertain that the ways to the GSM and GPRS are different.
If you adopt the GSM to dial out, you use the CSD methods, But the GPRS will be support the CSD and PSD, usually adopt PSD.From you give the code, you adopt the CSD method to the dial out. You should config the PDP, usually you should adopt: AT+CGCONT="cid","IP","APN",here the cid is the number for your GPRS modem,the APN will be provied by your SP. Then you will send the commands of the "ATD*99#".Then will start the PPP procedure,here you will set the username and password for the authorization method.
     From your said, I think the problem is the authorization did not pass, so the PPP is low. If you can capture the PPP packets, you would find the problem for the PPP low.
     If you can give me the information for the errors, I would help you to analyse them.
    BR/njabin

 

by: zicon5Posted on 2003-06-16 at 04:01:11ID: 8730941

Hello Njabin.
10x 4 answer.
See a format version of the output in your email.

While sniffing the Output of the modem, after having all the commands, & the result is OK  I see on the screen:
 
#0ACONNECT (len=8)

#0A~}# !}!}!} }2}"}&} } } } }#}$#}'}"}(}" ~~}# !}"}!} }*}"}&} } } } 1}/~~}# !}"}"} }*}"}&} } } } 6~~ }#!}"}#} }*}"}&} } } }  ~~}# !}!}!} }2}"}&} } } } }#}$#}'}"}(}" ~~#03 ##02#04#00#05#00U~~ #03!#01#01#00#04#00~~#03!#03#05#00#0A#03#06#0Av#1E@~~ #03!#01#02#00#04dX~~#03!#02#06#00#0A#03#06#0Av#1E@r~~ #03!#01#02#00#04dX~~#03!#01#02#00#04dX~~ #03!#01#02#00#04dX~~#03!#01#02#00#04dX~~ #03!#01#02#00#04dX~~#03!#01#02#00#04dX~~ #03!#01#02#00#04dX~~#03!#01#02#00#04dX~~ #03!#01#02#00#04dX~~}# !}%}!} }%}#1~~}# !}%}!} }%}#1~ (len=394)

#0ANO CARRIER (len=11)

#0A

As you see:

It's LCP, & then PAP, & then IPCP, & Then LCP!!!!

or in Hexa

 
 
#0A#43#4F#4E#4E#45#43#54 (len=8)

#0A#7E#FF#7D#23#C0#21#7D#21#7D#21#7D#20#7D#32#7D#22#7D#26#7D#20#7D#20#7D#20#7D#20#7D#23#7D#24#C0#23#7D#27#7D#22#7D#28#7D#22#DD#94#7E#7E#FF#7D#23#C0#21#7D#22#7D#21#7D#20#7D#2A#7D#22#7D#26#7D#20#7D#20#7D#20#7D#20#31#7D#2F#7E#7E#FF#7D#23#C0#21#7D#22#7D#22#7D#20#7D#2A#7D#22#7D#26#7D#20#7D#20#7D#20#7D#20#36#D9#7E#7E#FF#7D#23#C0#21#7D#22#7D#23#7D#20#7D#2A#7D#22#7D#26#7D#20#7D#20#7D#20#7D#20#CB#94#7E#7E#FF#7D#23#C0#21#7D#21#7D#21#7D#20#7D#32#7D#22#7D#26#7D#20#7D#20#7D#20#7D#20#7D#23#7D#24#C0#23#7D#27#7D#22#7D#28#7D#22#DD#94#7E#7E#FF#03#C0#23#02#04#00#05#00#DC#55#7E#7E#FF#03#80#21#01#01#00#04#00#B7#7E#7E#FF#03#80#21#03#05#00#0A#03#06#0A#76#14#6F#17#AC#7E#7E#FF#03#80#21#01#02#00#04#64#58#7E#7E#FF#03#80#21#02#06#00#0A#03#06#0A#76#14#6F#37#56#7E#7E#FF#03#80#21#01#02#00#04#64#58#7E#7E#FF#03#80#21#01#02#00#04#64#58#7E#7E#FF#03#80#21#01#02#00#04#64#58#7E#7E#FF#03#80#21#01#02#00#04#64#58#7E#7E#FF#03#80#21#01#02#00#04#64#58#7E#7E#FF#03#80#21#01#02#00#04#64#58#7E#7E#FF#03#80#21#01#02#00#04#64#58#7E#7E#FF#03#80#21#01#02#00#04#64#58#7E#7E#FF#03#80#21#01#02#00#04#64#58#7E#7E#FF#7D#23#C0#21#7D#25#7D#21#7D#20#7D#25#7D#23#9A#31#7E#7E#FF#7D#23#C0#21#7D#25#7D#21#7D#20#7D#25#7D#23#9A#31#7E (len=394)

#0A#4E#4F#20#43#41#52#52#49#45#52 (len=11)

#0A

 

by: zicon5Posted on 2003-06-17 at 01:56:14ID: 8738735

Hello,
 
Yes, I solved the problem, it was an error in the PAP_String, who was not getting the correct password.
Now, the uC trespass the 2 loops of PPP & IP.

<b>BUT</b>, the new problem, is the uC loops indefinitely inside the loop waiting for socket establishment.
for(temp=0;temp<3;temp++)
      {
            WriteSeiko(Socket_Index,0x00);      // Use Socket 0
            
            
            WriteSeiko(Socket_Status_H,0x00);             //Ensure that Snd_Busy bit is not busy
            
            
            WriteSeiko(Socket_Config_Status_L,0x10);// Reset socket
            delay_ms(5);
            WriteSeiko(Our_Port_L,PORT_L);// Write the port address
      WriteSeiko(Their_Port_L,PORT_L);      // for both the server
            WriteSeiko(Our_Port_H,PORT_H);// and the client
            WriteSeiko(Their_Port_H,PORT_H);

      WriteSeiko(Socket_Config_Status_L,0x02);// Use TCP client mode
            
            WriteSeiko(Socket_Activate,0x01);// Activate socket

                                 lcd_putc('.');            
                        
            // Loop to wait for socket to be connected with the server
            while(1)
            {
                  delay_ms(5);
                   
                   j = ReadSeiko(Socket_Status_M);

                  if(j&0x10)
                  {
                        i = 0;
                        break;
                  }
//                  else if(j&0xe0)
//                        break;
            }
      }
      CONNECTED = 1;
lcd_putc('U');



I see the point ONE TIME, but not the U.
What do you think, forbidding from getting the socket.
<u>I'm using the IP @of google as server: 216.239.33.100 & 80 as port number</u>

 

by: njabinPosted on 2003-06-17 at 03:48:18ID: 8739289

Hi zicon5,
    I think you should better to get the web site from the DNS firstly.
    How do you get the IP(216.239.33.100 )? For the DNS server, the web site usually is dynamic IP-address.

   " j = ReadSeiko(Socket_Status_M);"
    Here , what does stand for the return value ?

    BR/njabin

 

by: zicon5Posted on 2003-06-17 at 04:49:45ID: 8739573

Hi Njabin,
Actually, I used ping google.com in order to translate that domain name to an IP address, using the internet DNS.
I use to verifiy:
in my web browser: http://216.239.33.100:80
80 is the port number.

Maybe, there's some security on that server, that's why it's not responding...
Do you a permanent IP address, that's fix, without security...??????????

The j is the Socket_Status_M which should be 0x10 that means the bit four is 1 ==> the socket establishes a
connection to a host machine....
I wait until the establishment of the connection.

 

by: rammuruPosted on 2003-10-21 at 01:40:39ID: 9589198

HI NJABIN

I have the following same problem. Please send me PPP source code, my mail id rammuru@hotmail.com, million thanks in advance

"Hi zicon5 ,
     You use the HyperTerminal to send the AT commands, if the AT commands is right, the GSM/GPRS modem will return "CONNECT". If you use the PC to connect with the modem, after the "connect", you can get the "NO CARRIER" .
This is right, you dont worry about it. If you want to use your TCP/IP stack, you must create a PPP link. As for the PPP source code, you you want to get it , give me your email, I can send it to you.
     If you have any question, PLZ contact with me.
   BR/njabin "

 

by: GhostModPosted on 2004-05-26 at 14:52:04ID: 11166287

PAQed, with points refunded (75)

GhostMod
Community Support Moderator

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...