I'm using GSM Modem To post the data over the GPRS for specific website.

when i'm posting the data using VODAFONE IN (APN: www) Sim card it pos the data in i'm recieved HTTP 200 ok Response

But in other case when i'm posting the data using AIRTEL IN (APN : airtelgprs.com)

but data is not posted i'm recieving

HTTP 400 bad request

  • \$\begingroup\$ So what do you expect from us? Use Vodafone. \$\endgroup\$ Nov 17 '16 at 8:18
  • \$\begingroup\$ Hello sir , in this case i want to know about why this issue ocuuring both service provider provides the same gprs connection . \$\endgroup\$ Nov 17 '16 at 8:54
  • 1
    \$\begingroup\$ I summerize you question. "It works with Vodafone, it does not work with Airtel. Why?" \$\endgroup\$ Nov 17 '16 at 9:11
  • \$\begingroup\$ In this situation i have also confused, i'm not able to conclude the what is the issue. if any person have face the same issue.i have one quetion that is there any issue from the service provider or server. \$\endgroup\$ Nov 17 '16 at 11:24
  • 1
    \$\begingroup\$ Post the exact HTTP request you're sending and the exact response you received. If you're getting any reply at all from a server then your GPRS settings are okay. The issue is with what you sent to the server. Though usually if you have no active data subscription, your network provider will intercept your request... \$\endgroup\$ Nov 17 '16 at 18:56

There isn't much information in your question, but I'll explain one common way you can solve this type of problem. In short: You need to get more troubleshooting data, and then use your critical thinking skills to find the cause of the problem by using that data.

Remember that responses like "HTTP 400 Bad Request" come from the HTTP server. Therefore you need to find out why the HTTP server didn't like what it received, when you used the Airtel SIM.

One way you can do that, is to setup your own HTTP server (if the server you are currently using is not already under your control). Then you can look in its access log (or use tcpdump or wireshark etc. which is my preferred option) to capture what the HTTP server is receiving in each case.

The response from the HTTP server was different between your two tests. Therefore it must have received something different when using the two different SIMs. By capturing the HTTP request received at the server when using the Vodafone SIM, then doing the same thing with the Airtel SIM, and analysing / comparing those 2 sets of data, you will find what is causing the HTTP server to respond differently in your 2 tests.

  • \$\begingroup\$ Thanks For Sharing Your Idea sir. i'll check as per your suggetion. \$\endgroup\$ Nov 18 '16 at 5:21
  • 2
    \$\begingroup\$ Thanks a lot to give support . i have solved this issue. when i'm sending data through microcontroller like "HTTP1.1 \r\n\r\n" it send the data like "HTTP1.1/ \r\r\n\r\r\n" when i'm using syntax sprintf(*str, "HTTP1.1 \r\n\r\n"); \$\endgroup\$ Dec 28 '16 at 4:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.