• AVR Freaks

Hot!Getting 603 response from server, used web server address instead of Server IP address

Author
yo123
Starting Member
  • Total Posts : 59
  • Reward points : 0
  • Joined: 2017/04/19 09:52:08
  • Location: 0
  • Status: offline
2019/08/20 00:06:12 (permalink)
0

Getting 603 response from server, used web server address instead of Server IP address

Hi,
Earlier I used IP address and PORT number to send the data from sim808 to server and I am able to post it with 200 response from server. But now some technical problem I have to use address "ghanatagadi.in" instead of IP and PORT. But server response with 603 error.
Below attached is the set of command and their response that I used in my code. What change should I do in at+httppara command for response 200.
Please guide me where I am wrong.
Thanking you.

Attached Image(s)

#1

11 Replies Related Threads

    pcbbc
    Super Member
    • Total Posts : 1246
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: offline
    Re: Getting 603 response from server, used web server address instead of Server IP address 2019/08/22 08:19:26 (permalink)
    0
    ghanatagadi.in doesn’t appear to be resolvable as a public address via DNS.
    Are you using a private DNS?
    How is the module obtaining your DNS server address?
    #2
    yo123
    Starting Member
    • Total Posts : 59
    • Reward points : 0
    • Joined: 2017/04/19 09:52:08
    • Location: 0
    • Status: offline
    Re: Getting 603 response from server, used web server address instead of Server IP address 2019/08/23 01:55:05 (permalink)
    0
    Sorry its "ghantagadi.in" . I found command that supports DNS auto parsing.
    Like "at+cipstart" .given below in attachment. And yes it is private DNS.
    I don't know much about this obtaining DNS server address.
    Thanking you.
    post edited by yo123 - 2019/08/23 03:08:04

    Attached Image(s)

    #3
    ric
    Super Member
    • Total Posts : 23545
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Getting 603 response from server, used web server address instead of Server IP address 2019/08/23 04:34:53 (permalink)
    0
    Are you sure you are accessing a "private DNS", or are you just trying to say this is a private domain name?
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #4
    yo123
    Starting Member
    • Total Posts : 59
    • Reward points : 0
    • Joined: 2017/04/19 09:52:08
    • Location: 0
    • Status: offline
    Re: Getting 603 response from server, used web server address instead of Server IP address 2019/08/27 04:04:50 (permalink)
    0
    Sorry this is not private server..
    I used the At+cdnsgip command to get the IP of server and use that IP in httppara command. In blow function I used IP that I got from at+cdnsgip command.

    void GPRS()
    {
    UART1_Write_CText("AT+CSQ\r\n");
    delay_ms(1000);
    UART1_Write_CText("AT+CREG?\r\n");
    delay_ms(1000);
    UART1_Write_CText("AT+CGATT=1\r\n");
    delay_ms(2000);
    UART1_Write_CText("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"\r\n");
    delay_ms(3000);
    UART1_Write_CText("AT+SAPBR=3,1,\"APN\",\"\"\r\n");
    delay_ms(3000);
    UART1_Write_CText("AT+SAPBR=3,1,\"USER\",\"\"\r\n");
    delay_ms(3000);
    UART1_Write_CText("AT+SAPBR=3,1,\"PWD\",\"\"\r\n");
    delay_ms(3000);
    UART1_Write_CText("AT+SAPBR=1,1\r\n");
    delay_ms(4000);
    UART1_Write_CText("AT+SAPBR=2,1\r\n");
    delay_ms(3000);
    }
    void send_data()
    {
    UART1_Write_CText("AT+HTTPINIT\r\n"); // Initialize HTTP
    delay_ms(2000);

    UART1_Write_CText("AT+HTTPPARA=\"URL\",\"https://IP: PORT/api/Save/DustBinDetails?ID=xxxxxxxxxx&LT=20.3665645&LO=500.966545&DIST=17&TEMP=43434&S1=HI5656&S2=HO3232\"\r\n"); // Send PARA command
    delay_ms(3000);
    UART1_Write_CText("AT+HTTPPARA=\"CID\",1\r\n");
    delay_ms(3000);
    UART1_Write_CText("AT+HTTPACTION=1\r\n");
    delay_ms(25000);
    UART1_Write_CText("AT+HTTPTERM\r\n");
    delay_ms(3000);
    }

    You can tell me your working method.
    Thanking you
    #5
    yo123
    Starting Member
    • Total Posts : 59
    • Reward points : 0
    • Joined: 2017/04/19 09:52:08
    • Location: 0
    • Status: offline
    Re: Getting 603 response from server, used web server address instead of Server IP address 2019/08/27 04:13:17 (permalink)
    0
    As I read data sheet I came to know that at+httppara command is used for fully qualified domain name and IP address.. so this is not a fqdn so I have to used IP address any how.
    There is also one command At+cipstart that can resolve IP address. But I don't know how to use it , in case of below link

    "https://IP: PORT/api/Save/DustBinDetails?ID=xxxxxxxxxx&LT=20.3665645&LO=500.966545&DIST=17&TEMP=43434&S1=HI5656&S2=HO3232" 
    [/code]
    In above case how to use at+cipstart command.
     
    #6
    pcbbc
    Super Member
    • Total Posts : 1246
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: offline
    Re: Getting 603 response from server, used web server address instead of Server IP address 2019/08/27 05:27:17 (permalink)
    0
    At least ghantagadi.in is resolvable via public DNS.
     
    yo123As I read data sheet I came to know that at+httppara command is used for fully qualified domain name and IP address.. so this is not a fqdn so I have to used IP address any how.

    What makes you think "this is not a fqdn"?  Because you are missing the server name?  Add the server name at the start in that case.
     
    Where are you reading this?
     
    sim808 is not a Microchip product, so you'd do better asking on their support forums (if they have any) or at the very least link to the full documentation you are using (rahter than just supplying the odd page from it) so we are all looking at the same reference material.
     
    There is also one command At+cipstart that can resolve IP address. But I don't know how to use it , in case of below link

    That command, at least according to this reference, is to start a TCP or UDP connection.  It is NOT for (directly) resolving a host name and returing you the IP address.
     
    What IP were you using when you used an IP address and port and it was working?  Presumably 202.65.157.253:4044 which is where ghantagadi.in resolves to?
     
    Fairly sure, that if AT+CIPSTART can resolve host names, AT+HTTPPARA should be able to also.  No reason for it not to.
    My guess is still that this is either that the DNS lookup is failing, or that your server is not configured correctly.
    i.e. It's NOT a problem with the sim808 or your PIC application.
     
    Look in your server logs.  See if you are at least getting an attempted connection.
     
    Additionally I don't seem to be able to make a connection to either of the following addresses from my desktop browser:
    https://ghantagadi.in:4044/api/Save/DustBinDetails?ID=xxxxxxxxxx&LT=20.3665645&LO=500.966545&DIST=17&TEMP=43434&S1=HI5656&S2=HO3232
    https://202.65.157.253:4044/api/Save/DustBinDetails?ID=xxxxxxxxxx&LT=20.3665645&LO=500.966545&DIST=17&TEMP=43434&S1=HI5656&S2=HO3232

    Im getting an SSL error PR_END_OF_FILE_ERROR.
     
    However HTTP (i.e. not HTTPS) requests to the above are returning:
    <Error>
    <Message>The requested resource does not support http method 'GET'.</Message>
    </Error>

    OK - so I did a GET and not a POST - fair enough.
    Where you perhaps initially trying with only HTTP?
    #7
    yo123
    Starting Member
    • Total Posts : 59
    • Reward points : 0
    • Joined: 2017/04/19 09:52:08
    • Location: 0
    • Status: offline
    Re: Getting 603 response from server, used web server address instead of Server IP address 2019/08/29 02:58:57 (permalink)
    0
    Now, see I can open this link from desktop browser
    https://ghantagadi.in:444/api/Save/DustBinDetails?ID=0001&LT=20.3665645&LO=500.966545&DIST=25&TEMP=43434&S1=HI5656&S2=HO3232
     
    I also tried from Android app and response got.
    Http/1.1 200 ok
    But still I could not send from my code,
    sad: sad
     
    #8
    pcbbc
    Super Member
    • Total Posts : 1246
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: offline
    Re: Getting 603 response from server, used web server address instead of Server IP address 2019/08/29 03:52:53 (permalink)
    0
    And when you try....
    https://202.65.157.253:44...1=HI5656&S2=HO3232
    ...what happens?
     
    What about http instead of https?  Start with the simplest case first...
     
    What about the answers to my other questions?
    Where are you reading this? (i.e. supply links to documentation you are using)
    Look in your server logs.  See if you are at least getting an attempted connection.

     
    You're probably not going to crack this just by trying random stuff and hoping it works.
    This post seems to confirm (as I expected) error 603 is some kind of DNS issue.
    +HTTPACTION:0,603,0 ----> ERROR
    Error 603 - DNS Problem.

     
    What DNS servers are you getting supplied with on the module?
    My guess is that your mobile data providers supplied DNS is not correctly resolving ghantagadi.in
    Have you tried the SIM in a mobile device and seeing if that can reach your servers from its browser?
    #9
    yo123
    Starting Member
    • Total Posts : 59
    • Reward points : 0
    • Joined: 2017/04/19 09:52:08
    • Location: 0
    • Status: offline
    Re: Getting 603 response from server, used web server address instead of Server IP address 2019/08/29 05:01:04 (permalink)
    0
    pcbbc
    And when you try....
    https://202.65.157.253:44...1=HI5656&S2=HO3232
    ...what happens?
     
    What about http instead of https?  Start with the simplest case first...
     
    What about the answers to my other questions?
    Where are you reading this? (i.e. supply links to documentation you are using)
    Look in your server logs.  See if you are at least getting an attempted connection.

     
    You're probably not going to crack this just by trying random stuff and hoping it works.
    This post seems to confirm (as I expected) error 603 is some kind of DNS issue.
    +HTTPACTION:0,603,0 ----> ERROR
    Error 603 - DNS Problem.

     
    What DNS servers are you getting supplied with on the module?
    My guess is that your mobile data providers supplied DNS is not correctly resolving ghantagadi.in
    Have you tried the SIM in a mobile device and seeing if that can reach your servers from its browser?


    https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.elecrow.com/wiki/images/2/20/SIM800_Series_AT_Command_Manual_V1.09.pdf&ved=2ahUKEwix-qvBg6jkAhXO8HMBHXUXAD0QFjACegQIAhAB&usg=AOvVaw3Ylp8mdy26_qTxuILL55y3.
    Page no. 258 for At+httppara command.
    Page no. 221 for At+cipstart command
    I will let you know other things..
     
    #10
    pcbbc
    Super Member
    • Total Posts : 1246
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: offline
    Re: Getting 603 response from server, used web server address instead of Server IP address 2019/08/29 05:34:38 (permalink)
    0
    What does:
    AT+CDNSCFG=?
    Say your mobile networks DNS servers are?
     
    You could try:
    AT+CDNSCFG="8.8.8.8","8.8.4.4"
    To set google's DNS servers.  Maybe you would have more luck?
     
    Or:
    AT+CDNSGIP="ghantagadi.in"
    To see if the device can actually resolve your host name.
    #11
    yo123
    Starting Member
    • Total Posts : 59
    • Reward points : 0
    • Joined: 2017/04/19 09:52:08
    • Location: 0
    • Status: offline
    Re: Getting 603 response from server, used web server address instead of Server IP address 2019/09/05 10:16:15 (permalink)
    0
    thanks this post
    https://alselectro.wordpr...g-sim900a-gsm-arduino/
    i tried as given in post and get 200 response, see below quote.
    this is because of 'At+httppara' command supports only http:// not https://
    and thanks to pcbbcSmile: Smile.now  i will update command for https:// soon.

    AT+CGATT=1

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

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

    OK
    AT+SAPBR=1,1

    ERROR
    AT+SAPBR=2,1

    +SAPBR: 1,1,"100.81.131.28"

    OK
    AT+HTTPINIT

    ERROR
    AT+HTTPPARA="CID",1

    OK
    AT+HTTPPARA="URL","http://api.thingspeak.com/apps/thinghttp/send_request?api_key=IZ0D8FT08N8WDMLP"

    OK
    AT+HTTPACTION=0

    OK

    +HTTPACTION: 0,200,14
    AT+HTTPREAD=0,20

    +HTTPREAD: 14
    2,212,922 hits
    OK
    AT+HTTPTERM

    OK
    AT+SAPBR=0,1

    OK



     
    #12
    Jump to:
    © 2019 APG vNext Commercial Version 4.5