element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Internet of Things
  • Technologies
  • More
Internet of Things
Forum GPRS module HTTP GET/POST
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Internet of Things to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 8 replies
  • Subscribers 511 subscribers
  • Views 27896 views
  • Users 0 members are here
  • internet
  • post
  • sim800l
  • gsm
  • gprs
  • iot
  • get
  • arduino
  • module
Related

GPRS module HTTP GET/POST

Former Member
Former Member over 9 years ago

Hello Everyone,

I've been working on a LoNet mini GSM module (SIM800L), interfacing it with Arduino.

I've inserted the SIM mobile card with Internet connection available.

Through serial monitor I'm communicating with it with no problems, but when it comes to make a GET or a POST request to a webserver page it returns Network Error (601).

Here it is:

 

AT+SAPBR=3,1,"CONTYPE","GPRS"

OK

 

AT+HTTPINIT

OK

 

AT+HTTPPARA="CID",1

OK

 

AT+HTTPPARA="URL","http://<Public_Ip_Address>:8080/folder/savedata.php"

OK

 

AT+HTTPACTION=0

OK

+HTTPACTION: 0,601,0      //601: Network Error

 

AT+HTTPREAD=1,100000

OK

 

And no response of the "echo" of the php page...

Do you have any suggestion?

Thanks in advance.

Attachments:
image
image
  • Sign in to reply
  • Cancel
Parents
  • BigG
    BigG over 9 years ago

    Usually after this command AT+SAPBR=3,1,"CONTYPE","GPRS" you  enter your "APN", "USR" & "PWD" details also using SAPBR=3,1 etc. These details must match the SIM card / mobile phone provider.

     

    Then it is recommended to check that your device has now received an IP address. Sometimes this is not straight away. Use AT+SAPBR=2,1 to query and this will return your IP address which you should check for confirmation.

     

    Once you have IP address you can enter AT+HTTPINIT, AT+HTTPPARA="CID",1 etc.

     

    Now to use GET you have to include a "?" after the URL to provide your php script with a key=value pairing.

     

    Thus in your case it is something like, AT+HTTPPARA="URL","http://<Public_Ip_Address>:8080/folder/savedata.php?A=1001" where A is the key and 1001 is the value.

     

    Now send the AT+HTTPACTION=0 and you should get a +HTTPACTION: 0,200,1000 response where 200 is the OK and 1000 is the payload size. AT+HTTPREAD will allow you to read the response if it is required.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 9 years ago in reply to BigG

    Hi BigG, thanks to your response, it is very useful to me...

    What I still don't understand is:

     

    why do I have to set APN (access point name), USR, PSW, if I don't connect to the Internet using an Access Point?

    I want to connect to the Internet using GPRS directly, without passing through a Lan or through a Router which I have to connet to.

    Thanks again.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 9 years ago in reply to BigG

    Hi BigG, thanks to your response, it is very useful to me...

    What I still don't understand is:

     

    why do I have to set APN (access point name), USR, PSW, if I don't connect to the Internet using an Access Point?

    I want to connect to the Internet using GPRS directly, without passing through a Lan or through a Router which I have to connet to.

    Thanks again.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube