-3

Post method is run perfect using postman.

error while post the data on server using arduino sim900a module gprs.

Arduino code

mySerial.println("AT+CGATT?");

  delay(100);

  ShowSerialData();

  mySerial.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");

  delay(1000);

  ShowSerialData();

  mySerial.println("AT+SAPBR=3,1,\"APN\",\"www\"");

  delay(4000);

  ShowSerialData();

  mySerial.println("AT+SAPBR=1,1");

  delay(2000);

  ShowSerialData();

 mySerial.println("AT+HTTPINIT"); 

  delay(2000); 

  ShowSerialData();

 mySerial.println("AT+HTTPPARA=\"CID\",1");

  delay(2000);

  ShowSerialData();

  mySerial.println("AT+HTTPPARA=\"URL\",\"http://service.arctechnos.com\"");

  delay(1000);

  ShowSerialData();

  mySerial.println("AT+HTTPDATA=150,10000");

  delay(4000);

   ShowSerialData();

mySerial.println("POST /Service1.svc/insert HTTP/1.1");

mySerial.println("Host: service.arctechnos.com");

mySerial.println("Connection: open\r\nContent-Type: application/json");

String xyz = "{\"Data\":\"abcde\"}";

int abc = xyz.length();

String xy = "Content-Length: "+(String)abc+"\r\n";

 mySerial.println(xy);

 delay(10);

 mySerial.println(xyz); 

  delay(1000);

   ShowSerialData();

 mySerial.println("AT+HTTPACTION=1");

  delay(2000);

  ShowSerialData();

  mySerial.println("AT+HTTPREAD");

  delay(300);

  ShowSerialData();

Output of code:

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

OK
AT+SAPBR=3,1,"APN","www"

OK
AT+SAPBR=1,1

ERROR
AT+HTTPINIT

ERROR
AT+HTTPPARA="CID",1

OK
AT+HTTPPARA="URL","http://service.arctechnos.com"

OK
AT+HTTPDATA=150,10000

DOWNLOAD

OK
AT+HTTPACTION=1

OK

+HTTPACTION:1,403,1233
AT+HTTPREAD

+HTTPREAD:1233
<!DOCTYPE html PUBLIC "-//W3C//D
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>403 - Forbidden: Access is denied.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;} 
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;} 
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} 
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative

what is wrong in my code?

  • 4
    Also, it helps to actually ask a question. – Majenko Apr 7 '17 at 18:22
  • 3
    If you want people to look at your code, please edit your question (click "edit") and mark the code as code. In the editing box, highlight the code and press ctrl-k. Or highlight the code and click the {} icon in the toolbar at the top of the editing box. To highlight text click-drag across it or use the arrow keys while holding the shift key. Also, ask a question and say what symptoms are occurring and how they differ from what you want. – James Waldby - jwpat7 Apr 7 '17 at 18:39
  • 1
    question still missing, what is expected missing... – mico Apr 7 '17 at 18:55
  • 1
    @EnricBlanco i done changes as you required now pls unhold my question – yagnesh patel Apr 8 '17 at 11:17
  • 1
    Voting to reopen question. – Enric Blanco Apr 8 '17 at 11:23
1

HTTP 403 sub error 1233 means:

SMTP, command not implemented

SMTP service does not have the desired command implemented. Either your or their fault.

  • i get http 403 sub error 1233 not 1123.i post data using postman it works fine but using arduino is not working. – yagnesh patel Apr 7 '17 at 19:18
  • sorry, mixed up the numbers – mico Apr 7 '17 at 19:21

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